diff --git a/.github/ISSUE_TEMPLATE/rfi_request.md b/.github/ISSUE_TEMPLATE/rfi_request.md
new file mode 100644
index 00000000..8ad25ac6
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/rfi_request.md
@@ -0,0 +1,27 @@
+---
+name: Request for Information
+about: Request specific information about capabilities of the framework
+title: "[RFI]-"
+labels: RFI
+assignees: ''
+
+---
+
+**What is your request?**
+Please provide as much detail as possible.
+
+
+**What is the intended use case**
+- [ ] Essentials Standalone Application
+- [ ] Essentials + SIMPL Windows Hybrid
+
+**User Interface Requirements**
+- [ ] Not Applicable (logic only)
+- [ ] Crestron Smart Graphics Touchpanel
+- [ ] Cisco Touch10
+- [ ] Mobile Control
+- [ ] Crestron CH5 Touchpanel interface
+
+
+**Additional context**
+Add any other context or screenshots about the request here.
diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs
index aa4f43f7..a8002f7e 100644
--- a/PepperDashEssentials/ControlSystem.cs
+++ b/PepperDashEssentials/ControlSystem.cs
@@ -36,6 +36,7 @@ namespace PepperDash.Essentials
Thread.MaxNumberOfUserThreads = 400;
Global.ControlSystem = this;
DeviceManager.Initialize(this);
+ SecretsManager.Initialize();
SystemMonitor.ProgramInitialization.ProgramInitializationUnderUserControl = true;
}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs
index 284b8043..dcb66a2e 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Bridges/JoinMaps/VideoCodecControllerJoinMap.cs
@@ -2,1785 +2,2594 @@
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges.JoinMaps
{
- public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced
- {
- #region Status
+ public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced
+ {
+ #region Digital
- [JoinName("IsOnline")]
- public JoinDataComplete IsOnline =
- new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 1,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Device is Online",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("1")]
+ public JoinDataComplete Dtmf1 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 11,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 1",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("2")]
+ public JoinDataComplete Dtmf2 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 12,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 2",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("3")]
+ public JoinDataComplete Dtmf3 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 13,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 3",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("4")]
+ public JoinDataComplete Dtmf4 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 14,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 4",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("5")]
+ public JoinDataComplete Dtmf5 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 15,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 5",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("6")]
+ public JoinDataComplete Dtmf6 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 16,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 6",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("7")]
+ public JoinDataComplete Dtmf7 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 17,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 7",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("8")]
+ public JoinDataComplete Dtmf8 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 18,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 8",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("9")]
+ public JoinDataComplete Dtmf9 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 19,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 9",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("0")]
+ public JoinDataComplete Dtmf0 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 20,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 0",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("*")]
+ public JoinDataComplete DtmfStar = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 21,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF *",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("#")]
+ public JoinDataComplete DtmfPound = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 22,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF #",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("EndCall")]
+ public JoinDataComplete EndCall = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 24,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Hang Up",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("HookState")]
+ public JoinDataComplete HookState = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 31,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Hook State",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("SpeedDialStart")]
+ public JoinDataComplete SpeedDialStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 41,
+ JoinSpan = 4
+ },
+ new JoinMetadata
+ {
+ Description = "Speed Dial",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("IncomingCall")]
+ public JoinDataComplete IncomingCall = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 50,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Incoming Call",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("IncomingAnswer")]
+ public JoinDataComplete IncomingAnswer = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 51,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Answer Incoming Call",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("IncomingReject")]
+ public JoinDataComplete IncomingReject = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 52,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Reject Incoming Call",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("ManualDial")]
+ public JoinDataComplete ManualDial = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 71,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial manual string",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialPhoneCall")]
+ public JoinDataComplete DialPhone = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 72,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial Phone",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("PhoneHookState")]
+ public JoinDataComplete PhoneHookState = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 72,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial Phone",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("EndPhoneCall")]
+ public JoinDataComplete HangUpPhone = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 73,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Hang Up PHone",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectorySearchBusy")]
+ public JoinDataComplete DirectorySearchBusy = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 100,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Search Busy FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryEntryIsContact")]
+ public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Selected Entry Is Contact FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryLineSelected")]
+ public JoinDataComplete DirectoryLineSelected = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Line Selected FB",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryIsRoot")]
+ public JoinDataComplete DirectoryIsRoot = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 102,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory is on Root FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryHasChanged")]
+ public JoinDataComplete DirectoryHasChanged = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 103,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory has changed FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryRoot")]
+ public JoinDataComplete DirectoryRoot = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 104,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Go to Directory Root",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryFolderBack")]
+ public JoinDataComplete DirectoryFolderBack = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 105,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Go back one directory level",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryDialSelectedLine")]
+ public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 106,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial selected directory line",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+
+ [JoinName("CameraTiltUp")]
+ public JoinDataComplete CameraTiltUp = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 111,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Tilt Up",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraTiltDown")]
+ public JoinDataComplete CameraTiltDown = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 112,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Tilt Down",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraPanLeft")]
+ public JoinDataComplete CameraPanLeft = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 113,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Pan Left",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraPanRight")]
+ public JoinDataComplete CameraPanRight = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 114,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Pan Right",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraZoomIn")]
+ public JoinDataComplete CameraZoomIn = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 115,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Zoom In",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraZoomOut")]
+ public JoinDataComplete CameraZoomOut = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 116,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Zoom Out",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraPresetSave")]
+ public JoinDataComplete CameraPresetSave = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 121,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Save Selected Preset",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraModeAuto")]
+ public JoinDataComplete CameraModeAuto = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 131,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Mode Auto",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraModeManual")]
+ public JoinDataComplete CameraModeManual = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 132,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Mode Manual",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraModeOff")]
+ public JoinDataComplete CameraModeOff = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 133,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Mode Off",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraSelfView")]
+ public JoinDataComplete CameraSelfView = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 141,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Self View Toggle/FB",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraLayout")]
+ public JoinDataComplete CameraLayout = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 142,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Layout Toggle",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraSupportsAutoMode")]
+ public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 143,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Supports Auto Mode FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraSupportsOffMode")]
+ public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 144,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Supports Off Mode FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("UpdateMeetings")]
+ public JoinDataComplete UpdateMeetings = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 160,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Update Meetings",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialMeeting1")]
+ public JoinDataComplete DialMeeting1 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 161,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Join first meeting",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialMeeting2")]
+ public JoinDataComplete DialMeeting2 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 162,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Join second meeting",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialMeeting3")]
+ public JoinDataComplete DialMeeting3 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 163,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Join third meeting",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("MicMuteOn")]
+ public JoinDataComplete MicMuteOn = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 171,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Mic Mute On",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("MicMuteOff")]
+ public JoinDataComplete MicMuteOff = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 172,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Mic Mute Off",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("MicMuteToggle")]
+ public JoinDataComplete MicMuteToggle = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 173,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Mic Mute Toggle",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeUp")]
+ public JoinDataComplete VolumeUp = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 174,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Up",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeDown")]
+ public JoinDataComplete VolumeDown = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 175,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Down",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeMuteOn")]
+ public JoinDataComplete VolumeMuteOn = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 176,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Mute On",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeMuteOff")]
+ public JoinDataComplete VolumeMuteOff = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 177,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Mute Off",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeMuteToggle")]
+ public JoinDataComplete VolumeMuteToggle = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 178,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Mute Toggle",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("SourceShareStart")]
+ public JoinDataComplete SourceShareStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 201,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Start Sharing & Feedback",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("SourceShareEnd")]
+ public JoinDataComplete SourceShareEnd = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 202,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Stop Sharing & Feedback",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("AutoShareWhileInCall")]
+ public JoinDataComplete SourceShareAutoStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 203,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "When high, will autostart sharing when a call is joined",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("RecievingContent")]
+ public JoinDataComplete RecievingContent = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 204,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Recieving content from the far end",
+ JoinType = eJoinType.Digital,
+ JoinCapabilities = eJoinCapabilities.ToSIMPL
+ });
+
+ [JoinName("SelfviewPosition")]
+ public JoinDataComplete SelfviewPosition = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 211,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "advance selfview position",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("ParticipantAudioMuteToggleStart")]
+ public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 501,
+ JoinSpan = 50
+ },
new JoinMetadata
{
- Description = "Device is Online",
+ Description = "Toggles the participant's audio mute status",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
- #endregion
-
- [JoinName("CallDirection")]
- public JoinDataComplete CallDirection =
- new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
+ [JoinName("ParticipantVideoMuteToggleStart")]
+ public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 801,
+ JoinSpan = 50
+ },
new JoinMetadata
{
- Description = "Current Call Direction",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CameraLayout")]
- public JoinDataComplete CameraLayout =
- new JoinDataComplete(new JoinData { JoinNumber = 142, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Layout Toggle",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraLayoutStringFb")]
- public JoinDataComplete CameraLayoutStringFb =
- new JoinDataComplete(new JoinData { JoinNumber = 141, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Layout Fb",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("CameraModeAuto")]
- public JoinDataComplete CameraModeAuto =
- new JoinDataComplete(new JoinData { JoinNumber = 131, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Mode Auto",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraModeManual")]
- public JoinDataComplete CameraModeManual =
- new JoinDataComplete(new JoinData { JoinNumber = 132, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Mode Manual",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraModeOff")]
- public JoinDataComplete CameraModeOff =
- new JoinDataComplete(new JoinData { JoinNumber = 133, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Mode Off",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraNumberSelect")]
- public JoinDataComplete CameraNumberSelect =
- new JoinDataComplete(new JoinData { JoinNumber = 60, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Number Select/FB",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("CameraPanLeft")]
- public JoinDataComplete CameraPanLeft =
- new JoinDataComplete(new JoinData { JoinNumber = 113, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Pan Left",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraPanRight")]
- public JoinDataComplete CameraPanRight =
- new JoinDataComplete(new JoinData { JoinNumber = 114, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Pan Right",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraPresetNames")]
- public JoinDataComplete CameraPresetNames =
- new JoinDataComplete(new JoinData { JoinNumber = 121, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Preset Names - XSIG, max of 15",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CameraPresetSelect")]
- public JoinDataComplete CameraPresetSelect =
- new JoinDataComplete(new JoinData { JoinNumber = 121, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Preset Select",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("CameraPresetSave")]
- public JoinDataComplete CameraPresetSave =
- new JoinDataComplete(new JoinData { JoinNumber = 121, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Save Selected Preset",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraSelfView")]
- public JoinDataComplete CameraSelfView =
- new JoinDataComplete(new JoinData { JoinNumber = 141, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Self View Toggle/FB",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraSupportsAutoMode")]
- public JoinDataComplete CameraSupportsAutoMode =
- new JoinDataComplete(new JoinData { JoinNumber = 143, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Supports Auto Mode FB",
+ Description = "Toggles the participant's video mute status",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
- [JoinName("CameraSupportsOffMode")]
- public JoinDataComplete CameraSupportsOffMode =
- new JoinDataComplete(new JoinData { JoinNumber = 144, JoinSpan = 1 },
+ [JoinName("ParticipantPinToggleStart")]
+ public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 1101,
+ JoinSpan = 50
+ },
new JoinMetadata
{
- Description = "Camera Supports Off Mode FB",
+ Description = "Toggles the participant's pin status",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
- [JoinName("CameraTiltDown")]
- public JoinDataComplete CameraTiltDown =
- new JoinDataComplete(new JoinData { JoinNumber = 112, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Tilt Down",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraTiltUp")]
- public JoinDataComplete CameraTiltUp =
- new JoinDataComplete(new JoinData { JoinNumber = 111, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Tilt Up",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraZoomIn")]
- public JoinDataComplete CameraZoomIn =
- new JoinDataComplete(new JoinData { JoinNumber = 115, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Zoom In",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraZoomOut")]
- public JoinDataComplete CameraZoomOut =
- new JoinDataComplete(new JoinData { JoinNumber = 116, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Zoom Out",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CurrentCallName")]
- public JoinDataComplete CurrentCallData =
- new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Call Data - XSIG",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CurrentDialString")]
- public JoinDataComplete CurrentDialString =
- new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Dial String",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CurrentParticipants")]
- public JoinDataComplete CurrentParticipants =
- new JoinDataComplete(new JoinData { JoinNumber = 151, JoinSpan = 1 },
- new JoinMetadata()
- {
- Description = "Current Participants XSig",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CurrentSource")]
- public JoinDataComplete CurrentSource =
- new JoinDataComplete(new JoinData { JoinNumber = 201, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Source",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DialMeeting1")]
- public JoinDataComplete DialMeeting1 =
- new JoinDataComplete(new JoinData { JoinNumber = 161, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Join first meeting",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DialMeeting2")]
- public JoinDataComplete DialMeeting2 =
- new JoinDataComplete(new JoinData { JoinNumber = 162, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Join second meeting",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DialMeeting3")]
- public JoinDataComplete DialMeeting3 =
- new JoinDataComplete(new JoinData { JoinNumber = 163, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Join third meeting",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryDialSelectedLine")]
- public JoinDataComplete DirectoryDialSelectedLine =
- new JoinDataComplete(new JoinData { JoinNumber = 106, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial selected directory line",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryEntries")]
- public JoinDataComplete DirectoryEntries =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Entries - XSig, 255 entries",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectoryEntryIsContact")]
- public JoinDataComplete DirectoryEntryIsContact =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Selected Entry Is Contact FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryEntrySelectedName")]
- public JoinDataComplete DirectoryEntrySelectedName =
- new JoinDataComplete(new JoinData { JoinNumber = 356, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Selected Directory Entry Name",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectoryEntrySelectedNumber")]
- public JoinDataComplete DirectoryEntrySelectedNumber =
- new JoinDataComplete(new JoinData { JoinNumber = 357, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Selected Directory Entry Number",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectoryFolderBack")]
- public JoinDataComplete DirectoryFolderBack =
- new JoinDataComplete(new JoinData { JoinNumber = 105, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Go back one directory level",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryHasChanged")]
- public JoinDataComplete DirectoryHasChanged =
- new JoinDataComplete(new JoinData { JoinNumber = 103, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory has changed FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryIsRoot")]
- public JoinDataComplete DirectoryIsRoot =
- new JoinDataComplete(new JoinData { JoinNumber = 102, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory is on Root FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryLineSelected")]
- public JoinDataComplete DirectoryLineSelected =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Line Selected FB",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryRoot")]
- public JoinDataComplete DirectoryRoot =
- new JoinDataComplete(new JoinData { JoinNumber = 104, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Go to Directory Root",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryRowCount")]
- public JoinDataComplete DirectoryRowCount =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Row Count FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("DirectorySearchBusy")]
- public JoinDataComplete DirectorySearchBusy =
- new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Search Busy FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectorySearchString")]
- public JoinDataComplete DirectorySearchString =
- new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Search String",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectorySelectRow")]
- public JoinDataComplete DirectorySelectRow =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Select Row",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("DirectorySelectedFolderName")]
- public JoinDataComplete DirectorySelectedFolderName =
- new JoinDataComplete(new JoinData { JoinNumber = 358, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Selected Directory Folder Name",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("0")]
- public JoinDataComplete Dtmf0 =
- new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 0",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("1")]
- public JoinDataComplete Dtmf1 =
- new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 1",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("2")]
- public JoinDataComplete Dtmf2 =
- new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 2",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("3")]
- public JoinDataComplete Dtmf3 =
- new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 3",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("4")]
- public JoinDataComplete Dtmf4 =
- new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 4",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("5")]
- public JoinDataComplete Dtmf5 =
- new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 5",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("6")]
- public JoinDataComplete Dtmf6 =
- new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 6",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("7")]
- public JoinDataComplete Dtmf7 =
- new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 7",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("8")]
- public JoinDataComplete Dtmf8 =
- new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 8",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("9")]
- public JoinDataComplete Dtmf9 =
- new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 9",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("#")]
- public JoinDataComplete DtmfPound =
- new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF #",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("*")]
- public JoinDataComplete DtmfStar =
- new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF *",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("EndCall")]
- public JoinDataComplete EndCall =
- new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Hang Up",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("HookState")]
- public JoinDataComplete HookState =
- new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Hook State",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("IncomingAnswer")]
- public JoinDataComplete IncomingAnswer =
- new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Answer Incoming Call",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("IncomingCall")]
- public JoinDataComplete IncomingCall =
- new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Incoming Call",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("IncomingCallName")]
- public JoinDataComplete IncomingCallName =
- new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Incoming Call Name",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("IncomingCallNumber")]
- public JoinDataComplete IncomingCallNumber =
- new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Incoming Call Number",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("IncomingReject")]
- public JoinDataComplete IncomingReject =
- new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Reject Incoming Call",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
-
- [JoinName("ManualDial")]
- public JoinDataComplete ManualDial =
- new JoinDataComplete(new JoinData { JoinNumber = 71, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial manual string",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("Meeting Count Fb")]
- public JoinDataComplete MeetingCount =
- new JoinDataComplete(new JoinData { JoinNumber = 161, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Meeting Count",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("MicMuteOff")]
- public JoinDataComplete MicMuteOff =
- new JoinDataComplete(new JoinData { JoinNumber = 172, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Mic Mute Off",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("MicMuteOn")]
- public JoinDataComplete MicMuteOn =
- new JoinDataComplete(new JoinData { JoinNumber = 171, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Mic Mute On",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("MicMuteToggle")]
- public JoinDataComplete MicMuteToggle =
- new JoinDataComplete(new JoinData { JoinNumber = 173, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Mic Mute Toggle",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("MinutesBeforeMeetingStart")]
- public JoinDataComplete MinutesBeforeMeetingStart =
- new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Minutes before meeting start that a meeting is joinable",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("ParticipantCount")]
- public JoinDataComplete ParticipantCount =
- new JoinDataComplete(new JoinData { JoinNumber = 151, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Participant Count",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("Schedule")]
- public JoinDataComplete Schedule =
- new JoinDataComplete(new JoinData { JoinNumber = 102, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Schedule Data - XSIG",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("AutoShareWhileInCall")]
- public JoinDataComplete SourceShareAutoStart =
- new JoinDataComplete(new JoinData { JoinNumber = 203, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "When high, will autostart sharing when a call is joined",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("SourceShareEnd")]
- public JoinDataComplete SourceShareEnd =
- new JoinDataComplete(new JoinData { JoinNumber = 202, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Stop Sharing & Feedback",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("SourceShareStart")]
- public JoinDataComplete SourceShareStart =
- new JoinDataComplete(new JoinData { JoinNumber = 201, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Start Sharing & Feedback",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("RecievingContent")]
- public JoinDataComplete RecievingContent =
- new JoinDataComplete(new JoinData { JoinNumber = 204, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Recieving content from the far end",
- JoinType = eJoinType.Digital,
- JoinCapabilities = eJoinCapabilities.ToSIMPL
- });
-
- [JoinName("SelfviewPosition")]
- public JoinDataComplete SelfviewPosition =
- new JoinDataComplete(new JoinData { JoinNumber = 211, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "advance selfview position",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("SelfviewPositionFb")]
- public JoinDataComplete SelfviewPositionFb =
- new JoinDataComplete(new JoinData { JoinNumber = 211, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "advance selfview position",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("SpeedDialStart")]
- public JoinDataComplete SpeedDialStart =
- new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 4 },
- new JoinMetadata
- {
- Description = "Speed Dial",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("UpdateMeetings")]
- public JoinDataComplete UpdateMeetings =
- new JoinDataComplete(new JoinData { JoinNumber = 160, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Update Meetings",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeDown")]
- public JoinDataComplete VolumeDown =
- new JoinDataComplete(new JoinData { JoinNumber = 175, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Down",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeLevel")]
- public JoinDataComplete VolumeLevel =
- new JoinDataComplete(new JoinData { JoinNumber = 174, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Level",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("VolumeMuteOff")]
- public JoinDataComplete VolumeMuteOff =
- new JoinDataComplete(new JoinData { JoinNumber = 177, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Mute Off",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeMuteOn")]
- public JoinDataComplete VolumeMuteOn =
- new JoinDataComplete(new JoinData { JoinNumber = 176, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Mute On",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeMuteToggle")]
- public JoinDataComplete VolumeMuteToggle =
- new JoinDataComplete(new JoinData { JoinNumber = 178, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Mute Toggle",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeUp")]
- public JoinDataComplete VolumeUp =
- new JoinDataComplete(new JoinData { JoinNumber = 174, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Up",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DialPhoneCall")]
- public JoinDataComplete DialPhone =
- new JoinDataComplete(new JoinData { JoinNumber = 72, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial Phone",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("PhoneHookState")]
- public JoinDataComplete PhoneHookState =
- new JoinDataComplete(new JoinData { JoinNumber = 72, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial Phone",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("EndPhoneCall")]
- public JoinDataComplete HangUpPhone =
- new JoinDataComplete(new JoinData { JoinNumber = 73, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Hang Up PHone",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("PhoneString")]
- public JoinDataComplete PhoneDialString =
- new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Phone Dial String",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Serial
- });
-
- public VideoCodecControllerJoinMap(uint joinStart)
- : base(joinStart, typeof(VideoCodecControllerJoinMap))
- {
- }
-
- public VideoCodecControllerJoinMap(uint joinStart, Type type)
- : base(joinStart, type)
- {
- }
- }
+
+ #endregion
+
+
+
+ #region Analog
+
+ [JoinName("MinutesBeforeMeetingStart")]
+ public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 41,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Minutes before meeting start that a meeting is joinable",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("CameraNumberSelect")]
+ public JoinDataComplete CameraNumberSelect = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 60,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Number Select/FB",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("DirectoryRowCount")]
+ public JoinDataComplete DirectoryRowCount = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Row Count FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("DirectorySelectRow")]
+ public JoinDataComplete DirectorySelectRow = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Select Row",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("CameraPresetSelect")]
+ public JoinDataComplete CameraPresetSelect = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 121,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Preset Select",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("ParticipantCount")]
+ public JoinDataComplete ParticipantCount = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 151,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Participant Count",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("Meeting Count Fb")]
+ public JoinDataComplete MeetingCount = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 161,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Meeting Count",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("VolumeLevel")]
+ public JoinDataComplete VolumeLevel = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 174,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Level",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ #endregion
+
+
+
+ #region Serials
+
+ [JoinName("CurrentDialString")]
+ public JoinDataComplete CurrentDialString = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 1,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Dial String",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("PhoneString")]
+ public JoinDataComplete PhoneDialString = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 2,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Phone Dial String",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CurrentCallName")]
+ public JoinDataComplete CurrentCallData = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 2,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Call Data - XSIG",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CallDirection")]
+ public JoinDataComplete CallDirection = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 22,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Call Direction",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("IncomingCallName")]
+ public JoinDataComplete IncomingCallName = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 51,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Incoming Call Name",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("IncomingCallNumber")]
+ public JoinDataComplete IncomingCallNumber = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 52,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Incoming Call Number",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+
+ [JoinName("DirectorySearchString")]
+ public JoinDataComplete DirectorySearchString = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 100,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Search String",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectoryEntries")]
+ public JoinDataComplete DirectoryEntries = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Entries - XSig, 255 entries",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("Schedule")]
+ public JoinDataComplete Schedule = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 102,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Schedule Data - XSIG",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CameraPresetNames")]
+ public JoinDataComplete CameraPresetNames = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 121,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Preset Names - XSIG, max of 15",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CameraLayoutStringFb")]
+ public JoinDataComplete CameraLayoutStringFb = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 141,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Layout Fb",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CurrentParticipants")]
+ public JoinDataComplete CurrentParticipants = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 151,
+ JoinSpan = 1
+ },
+ new JoinMetadata()
+ {
+ Description = "Current Participants XSig",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CurrentSource")]
+ public JoinDataComplete CurrentSource = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 201,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Source",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("SelfviewPositionFb")]
+ public JoinDataComplete SelfviewPositionFb = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 211,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "advance selfview position",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectoryEntrySelectedName")]
+ public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 356,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Selected Directory Entry Name",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectoryEntrySelectedNumber")]
+ public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 357,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Selected Directory Entry Number",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectorySelectedFolderName")]
+ public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 358,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Selected Directory Folder Name",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ #endregion
+
+
+ public VideoCodecControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(VideoCodecControllerJoinMap))
+ {
+ }
+
+ public VideoCodecControllerJoinMap(uint joinStart, Type type)
+ : base(joinStart, type)
+ {
+ }
+ }
}
namespace PepperDash_Essentials_Core.Bridges.JoinMaps
{
- [Obsolete("Use PepperDash.Essentials.Core.Bridges.JoinMaps")]
- public class VideoCodecControllerJoinMap :JoinMapBaseAdvanced
- {
+ [Obsolete("Use PepperDash.Essentials.Core.Bridges.JoinMaps")]
+ public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced
+ {
- #region Status
+ #region Digital
- [JoinName("IsOnline")]
- public JoinDataComplete IsOnline =
- new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
+ [JoinName("IsOnline")]
+ public JoinDataComplete IsOnline = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 1,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Device is Online",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("1")]
+ public JoinDataComplete Dtmf1 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 11,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 1",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("2")]
+ public JoinDataComplete Dtmf2 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 12,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 2",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("3")]
+ public JoinDataComplete Dtmf3 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 13,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 3",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("4")]
+ public JoinDataComplete Dtmf4 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 14,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 4",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("5")]
+ public JoinDataComplete Dtmf5 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 15,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 5",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("6")]
+ public JoinDataComplete Dtmf6 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 16,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 6",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("7")]
+ public JoinDataComplete Dtmf7 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 17,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 7",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("8")]
+ public JoinDataComplete Dtmf8 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 18,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 8",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("9")]
+ public JoinDataComplete Dtmf9 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 19,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 9",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("0")]
+ public JoinDataComplete Dtmf0 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 20,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF 0",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("*")]
+ public JoinDataComplete DtmfStar = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 21,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF *",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("#")]
+ public JoinDataComplete DtmfPound = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 22,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "DTMF #",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("EndCall")]
+ public JoinDataComplete EndCall = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 24,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Hang Up",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("HookState")]
+ public JoinDataComplete HookState = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 31,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Hook State",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("SpeedDialStart")]
+ public JoinDataComplete SpeedDialStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 41,
+ JoinSpan = 4
+ },
+ new JoinMetadata
+ {
+ Description = "Speed Dial",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("IncomingCall")]
+ public JoinDataComplete IncomingCall = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 50,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Incoming Call",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("IncomingAnswer")]
+ public JoinDataComplete IncomingAnswer = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 51,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Answer Incoming Call",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("IncomingReject")]
+ public JoinDataComplete IncomingReject = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 52,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Reject Incoming Call",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("ManualDial")]
+ public JoinDataComplete ManualDial = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 71,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial manual string",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialPhoneCall")]
+ public JoinDataComplete DialPhone = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 72,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial Phone",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("PhoneHookState")]
+ public JoinDataComplete PhoneHookState = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 72,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial Phone",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("EndPhoneCall")]
+ public JoinDataComplete HangUpPhone = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 73,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Hang Up PHone",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectorySearchBusy")]
+ public JoinDataComplete DirectorySearchBusy = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 100,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Search Busy FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryEntryIsContact")]
+ public JoinDataComplete DirectoryEntryIsContact = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Selected Entry Is Contact FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryLineSelected")]
+ public JoinDataComplete DirectoryLineSelected = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Line Selected FB",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryIsRoot")]
+ public JoinDataComplete DirectoryIsRoot = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 102,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory is on Root FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryHasChanged")]
+ public JoinDataComplete DirectoryHasChanged = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 103,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory has changed FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryRoot")]
+ public JoinDataComplete DirectoryRoot = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 104,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Go to Directory Root",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryFolderBack")]
+ public JoinDataComplete DirectoryFolderBack = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 105,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Go back one directory level",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DirectoryDialSelectedLine")]
+ public JoinDataComplete DirectoryDialSelectedLine = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 106,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Dial selected directory line",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+
+ [JoinName("CameraTiltUp")]
+ public JoinDataComplete CameraTiltUp = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 111,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Tilt Up",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraTiltDown")]
+ public JoinDataComplete CameraTiltDown = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 112,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Tilt Down",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraPanLeft")]
+ public JoinDataComplete CameraPanLeft = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 113,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Pan Left",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraPanRight")]
+ public JoinDataComplete CameraPanRight = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 114,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Pan Right",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraZoomIn")]
+ public JoinDataComplete CameraZoomIn = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 115,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Zoom In",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraZoomOut")]
+ public JoinDataComplete CameraZoomOut = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 116,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Zoom Out",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraPresetSave")]
+ public JoinDataComplete CameraPresetSave = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 121,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Save Selected Preset",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraModeAuto")]
+ public JoinDataComplete CameraModeAuto = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 131,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Mode Auto",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraModeManual")]
+ public JoinDataComplete CameraModeManual = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 132,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Mode Manual",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraModeOff")]
+ public JoinDataComplete CameraModeOff = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 133,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Mode Off",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraSelfView")]
+ public JoinDataComplete CameraSelfView = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 141,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Self View Toggle/FB",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraLayout")]
+ public JoinDataComplete CameraLayout = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 142,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Layout Toggle",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraSupportsAutoMode")]
+ public JoinDataComplete CameraSupportsAutoMode = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 143,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Supports Auto Mode FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("CameraSupportsOffMode")]
+ public JoinDataComplete CameraSupportsOffMode = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 144,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Supports Off Mode FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("UpdateMeetings")]
+ public JoinDataComplete UpdateMeetings = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 160,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Update Meetings",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialMeeting1")]
+ public JoinDataComplete DialMeeting1 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 161,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Join first meeting",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialMeeting2")]
+ public JoinDataComplete DialMeeting2 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 162,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Join second meeting",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("DialMeeting3")]
+ public JoinDataComplete DialMeeting3 = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 163,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Join third meeting",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("MicMuteOn")]
+ public JoinDataComplete MicMuteOn = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 171,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Mic Mute On",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("MicMuteOff")]
+ public JoinDataComplete MicMuteOff = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 172,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Mic Mute Off",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("MicMuteToggle")]
+ public JoinDataComplete MicMuteToggle = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 173,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Mic Mute Toggle",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeUp")]
+ public JoinDataComplete VolumeUp = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 174,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Up",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeDown")]
+ public JoinDataComplete VolumeDown = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 175,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Down",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeMuteOn")]
+ public JoinDataComplete VolumeMuteOn = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 176,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Mute On",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeMuteOff")]
+ public JoinDataComplete VolumeMuteOff = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 177,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Mute Off",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("VolumeMuteToggle")]
+ public JoinDataComplete VolumeMuteToggle = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 178,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Mute Toggle",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("SourceShareStart")]
+ public JoinDataComplete SourceShareStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 201,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Start Sharing & Feedback",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("SourceShareEnd")]
+ public JoinDataComplete SourceShareEnd = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 202,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Stop Sharing & Feedback",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("AutoShareWhileInCall")]
+ public JoinDataComplete SourceShareAutoStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 203,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "When high, will autostart sharing when a call is joined",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("RecievingContent")]
+ public JoinDataComplete RecievingContent = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 204,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Recieving content from the far end",
+ JoinType = eJoinType.Digital,
+ JoinCapabilities = eJoinCapabilities.ToSIMPL
+ });
+
+ [JoinName("SelfviewPosition")]
+ public JoinDataComplete SelfviewPosition = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 211,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "advance selfview position",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Digital
+ });
+
+ [JoinName("ParticipantAudioMuteToggleStart")]
+ public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 500,
+ JoinSpan = 50
+ },
new JoinMetadata
{
- Description = "Device is Online",
+ Description = "Toggles the participant's audio mute status",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
- #endregion
-
- [JoinName("CallDirection")]
- public JoinDataComplete CallDirection =
- new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
+ [JoinName("ParticipantVideoMuteToggleStart")]
+ public JoinDataComplete ParticipantVideoMuteToggleStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 800,
+ JoinSpan = 50
+ },
new JoinMetadata
{
- Description = "Current Call Direction",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CameraLayout")]
- public JoinDataComplete CameraLayout =
- new JoinDataComplete(new JoinData { JoinNumber = 142, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Layout Toggle",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraLayoutStringFb")]
- public JoinDataComplete CameraLayoutStringFb =
- new JoinDataComplete(new JoinData { JoinNumber = 141, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Layout Fb",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("CameraModeAuto")]
- public JoinDataComplete CameraModeAuto =
- new JoinDataComplete(new JoinData { JoinNumber = 131, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Mode Auto",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraModeManual")]
- public JoinDataComplete CameraModeManual =
- new JoinDataComplete(new JoinData { JoinNumber = 132, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Mode Manual",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraModeOff")]
- public JoinDataComplete CameraModeOff =
- new JoinDataComplete(new JoinData { JoinNumber = 133, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Mode Off",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraNumberSelect")]
- public JoinDataComplete CameraNumberSelect =
- new JoinDataComplete(new JoinData { JoinNumber = 60, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Number Select/FB",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("CameraPanLeft")]
- public JoinDataComplete CameraPanLeft =
- new JoinDataComplete(new JoinData { JoinNumber = 113, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Pan Left",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraPanRight")]
- public JoinDataComplete CameraPanRight =
- new JoinDataComplete(new JoinData { JoinNumber = 114, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Pan Right",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraPresetNames")]
- public JoinDataComplete CameraPresetNames =
- new JoinDataComplete(new JoinData { JoinNumber = 121, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Preset Names - XSIG, max of 15",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CameraPresetSelect")]
- public JoinDataComplete CameraPresetSelect =
- new JoinDataComplete(new JoinData { JoinNumber = 121, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Preset Select",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("CameraPresetSave")]
- public JoinDataComplete CameraPresetSave =
- new JoinDataComplete(new JoinData { JoinNumber = 121, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Save Selected Preset",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraSelfView")]
- public JoinDataComplete CameraSelfView =
- new JoinDataComplete(new JoinData { JoinNumber = 141, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Self View Toggle/FB",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraSupportsAutoMode")]
- public JoinDataComplete CameraSupportsAutoMode =
- new JoinDataComplete(new JoinData { JoinNumber = 143, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Supports Auto Mode FB",
+ Description = "Toggles the participant's video mute status",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
- [JoinName("CameraSupportsOffMode")]
- public JoinDataComplete CameraSupportsOffMode =
- new JoinDataComplete(new JoinData { JoinNumber = 144, JoinSpan = 1 },
+ [JoinName("ParticipantPinToggleStart")]
+ public JoinDataComplete ParticipantPinToggleStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 1100,
+ JoinSpan = 50
+ },
new JoinMetadata
{
- Description = "Camera Supports Off Mode FB",
+ Description = "Toggles the participant's pin status",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital
});
- [JoinName("CameraTiltDown")]
- public JoinDataComplete CameraTiltDown =
- new JoinDataComplete(new JoinData { JoinNumber = 112, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Tilt Down",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraTiltUp")]
- public JoinDataComplete CameraTiltUp =
- new JoinDataComplete(new JoinData { JoinNumber = 111, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Tilt Up",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraZoomIn")]
- public JoinDataComplete CameraZoomIn =
- new JoinDataComplete(new JoinData { JoinNumber = 115, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Zoom In",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CameraZoomOut")]
- public JoinDataComplete CameraZoomOut =
- new JoinDataComplete(new JoinData { JoinNumber = 116, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Camera Zoom Out",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("CurrentCallName")]
- public JoinDataComplete CurrentCallData =
- new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Call Data - XSIG",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CurrentDialString")]
- public JoinDataComplete CurrentDialString =
- new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Dial String",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CurrentParticipants")]
- public JoinDataComplete CurrentParticipants =
- new JoinDataComplete(new JoinData { JoinNumber = 151, JoinSpan = 1 },
- new JoinMetadata()
- {
- Description = "Current Participants XSig",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("CurrentSource")]
- public JoinDataComplete CurrentSource =
- new JoinDataComplete(new JoinData { JoinNumber = 201, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Source",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DialMeeting1")]
- public JoinDataComplete DialMeeting1 =
- new JoinDataComplete(new JoinData { JoinNumber = 161, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Join first meeting",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DialMeeting2")]
- public JoinDataComplete DialMeeting2 =
- new JoinDataComplete(new JoinData { JoinNumber = 162, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Join second meeting",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DialMeeting3")]
- public JoinDataComplete DialMeeting3 =
- new JoinDataComplete(new JoinData { JoinNumber = 163, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Join third meeting",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryDialSelectedLine")]
- public JoinDataComplete DirectoryDialSelectedLine =
- new JoinDataComplete(new JoinData { JoinNumber = 106, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial selected directory line",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryEntries")]
- public JoinDataComplete DirectoryEntries =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Entries - XSig, 255 entries",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectoryEntryIsContact")]
- public JoinDataComplete DirectoryEntryIsContact =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Selected Entry Is Contact FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryEntrySelectedName")]
- public JoinDataComplete DirectoryEntrySelectedName =
- new JoinDataComplete(new JoinData { JoinNumber = 356, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Selected Directory Entry Name",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectoryEntrySelectedNumber")]
- public JoinDataComplete DirectoryEntrySelectedNumber =
- new JoinDataComplete(new JoinData { JoinNumber = 357, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Selected Directory Entry Number",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectoryFolderBack")]
- public JoinDataComplete DirectoryFolderBack =
- new JoinDataComplete(new JoinData { JoinNumber = 105, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Go back one directory level",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryHasChanged")]
- public JoinDataComplete DirectoryHasChanged =
- new JoinDataComplete(new JoinData { JoinNumber = 103, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory has changed FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryIsRoot")]
- public JoinDataComplete DirectoryIsRoot =
- new JoinDataComplete(new JoinData { JoinNumber = 102, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory is on Root FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryLineSelected")]
- public JoinDataComplete DirectoryLineSelected =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Line Selected FB",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryRoot")]
- public JoinDataComplete DirectoryRoot =
- new JoinDataComplete(new JoinData { JoinNumber = 104, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Go to Directory Root",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectoryRowCount")]
- public JoinDataComplete DirectoryRowCount =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Row Count FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("DirectorySearchBusy")]
- public JoinDataComplete DirectorySearchBusy =
- new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Search Busy FB",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DirectorySearchString")]
- public JoinDataComplete DirectorySearchString =
- new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Search String",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("DirectorySelectRow")]
- public JoinDataComplete DirectorySelectRow =
- new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Directory Select Row",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("DirectorySelectedFolderName")]
- public JoinDataComplete DirectorySelectedFolderName =
- new JoinDataComplete(new JoinData { JoinNumber = 358, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Selected Directory Folder Name",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("0")]
- public JoinDataComplete Dtmf0 =
- new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 0",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("1")]
- public JoinDataComplete Dtmf1 =
- new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 1",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("2")]
- public JoinDataComplete Dtmf2 =
- new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 2",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("3")]
- public JoinDataComplete Dtmf3 =
- new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 3",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("4")]
- public JoinDataComplete Dtmf4 =
- new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 4",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("5")]
- public JoinDataComplete Dtmf5 =
- new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 5",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("6")]
- public JoinDataComplete Dtmf6 =
- new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 6",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("7")]
- public JoinDataComplete Dtmf7 =
- new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 7",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("8")]
- public JoinDataComplete Dtmf8 =
- new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 8",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("9")]
- public JoinDataComplete Dtmf9 =
- new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF 9",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("#")]
- public JoinDataComplete DtmfPound =
- new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF #",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("*")]
- public JoinDataComplete DtmfStar =
- new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "DTMF *",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("EndCall")]
- public JoinDataComplete EndCall =
- new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Hang Up",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("HookState")]
- public JoinDataComplete HookState =
- new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Hook State",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("IncomingAnswer")]
- public JoinDataComplete IncomingAnswer =
- new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Answer Incoming Call",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("IncomingCall")]
- public JoinDataComplete IncomingCall =
- new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Incoming Call",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("IncomingCallName")]
- public JoinDataComplete IncomingCallName =
- new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Incoming Call Name",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("IncomingCallNumber")]
- public JoinDataComplete IncomingCallNumber =
- new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Incoming Call Number",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("IncomingReject")]
- public JoinDataComplete IncomingReject =
- new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Reject Incoming Call",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
-
- [JoinName("ManualDial")]
- public JoinDataComplete ManualDial =
- new JoinDataComplete(new JoinData { JoinNumber = 71, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial manual string",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("Meeting Count Fb")]
- public JoinDataComplete MeetingCount =
- new JoinDataComplete(new JoinData { JoinNumber = 161, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Meeting Count",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("MicMuteOff")]
- public JoinDataComplete MicMuteOff =
- new JoinDataComplete(new JoinData { JoinNumber = 172, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Mic Mute Off",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("MicMuteOn")]
- public JoinDataComplete MicMuteOn =
- new JoinDataComplete(new JoinData { JoinNumber = 171, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Mic Mute On",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("MicMuteToggle")]
- public JoinDataComplete MicMuteToggle =
- new JoinDataComplete(new JoinData { JoinNumber = 173, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Mic Mute Toggle",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("MinutesBeforeMeetingStart")]
- public JoinDataComplete MinutesBeforeMeetingStart =
- new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Minutes before meeting start that a meeting is joinable",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("ParticipantCount")]
- public JoinDataComplete ParticipantCount =
- new JoinDataComplete(new JoinData { JoinNumber = 151, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Current Participant Count",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("Schedule")]
- public JoinDataComplete Schedule =
- new JoinDataComplete(new JoinData { JoinNumber = 102, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Schedule Data - XSIG",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("AutoShareWhileInCall")]
- public JoinDataComplete SourceShareAutoStart =
- new JoinDataComplete(new JoinData { JoinNumber = 203, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "When high, will autostart sharing when a call is joined",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("SourceShareEnd")]
- public JoinDataComplete SourceShareEnd =
- new JoinDataComplete(new JoinData { JoinNumber = 202, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Stop Sharing & Feedback",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("SourceShareStart")]
- public JoinDataComplete SourceShareStart =
- new JoinDataComplete(new JoinData { JoinNumber = 201, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Start Sharing & Feedback",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("RecievingContent")]
- public JoinDataComplete RecievingContent =
- new JoinDataComplete(new JoinData { JoinNumber = 204, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Recieving content from the far end",
- JoinType = eJoinType.Digital,
- JoinCapabilities = eJoinCapabilities.ToSIMPL
- });
-
- [JoinName("SelfviewPosition")]
- public JoinDataComplete SelfviewPosition =
- new JoinDataComplete(new JoinData { JoinNumber = 211, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "advance selfview position",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("SelfviewPositionFb")]
- public JoinDataComplete SelfviewPositionFb =
- new JoinDataComplete(new JoinData { JoinNumber = 211, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "advance selfview position",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Serial
- });
-
- [JoinName("SpeedDialStart")]
- public JoinDataComplete SpeedDialStart =
- new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 4 },
- new JoinMetadata
- {
- Description = "Speed Dial",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("UpdateMeetings")]
- public JoinDataComplete UpdateMeetings =
- new JoinDataComplete(new JoinData { JoinNumber = 160, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Update Meetings",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeDown")]
- public JoinDataComplete VolumeDown =
- new JoinDataComplete(new JoinData { JoinNumber = 175, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Down",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeLevel")]
- public JoinDataComplete VolumeLevel =
- new JoinDataComplete(new JoinData { JoinNumber = 174, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Level",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Analog
- });
-
- [JoinName("VolumeMuteOff")]
- public JoinDataComplete VolumeMuteOff =
- new JoinDataComplete(new JoinData { JoinNumber = 177, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Mute Off",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeMuteOn")]
- public JoinDataComplete VolumeMuteOn =
- new JoinDataComplete(new JoinData { JoinNumber = 176, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Mute On",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeMuteToggle")]
- public JoinDataComplete VolumeMuteToggle =
- new JoinDataComplete(new JoinData { JoinNumber = 178, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Mute Toggle",
- JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("VolumeUp")]
- public JoinDataComplete VolumeUp =
- new JoinDataComplete(new JoinData { JoinNumber = 174, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Volume Up",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("DialPhoneCall")]
- public JoinDataComplete DialPhone =
- new JoinDataComplete(new JoinData { JoinNumber = 72, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial Phone",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("PhoneHookState")]
- public JoinDataComplete PhoneHookState =
- new JoinDataComplete(new JoinData { JoinNumber = 72, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Dial Phone",
- JoinCapabilities = eJoinCapabilities.ToSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("EndPhoneCall")]
- public JoinDataComplete HangUpPhone =
- new JoinDataComplete(new JoinData { JoinNumber = 73, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Hang Up PHone",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Digital
- });
-
- [JoinName("PhoneString")]
- public JoinDataComplete PhoneDialString =
- new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
- new JoinMetadata
- {
- Description = "Phone Dial String",
- JoinCapabilities = eJoinCapabilities.FromSIMPL,
- JoinType = eJoinType.Serial
- });
-
- public VideoCodecControllerJoinMap(uint joinStart)
- : base(joinStart, typeof(VideoCodecControllerJoinMap))
- {
- }
-
- public VideoCodecControllerJoinMap(uint joinStart, Type type)
- : base(joinStart, type)
- {
- }
- }
- }
+ #endregion
+
+
+
+ #region Analog
+
+ [JoinName("MinutesBeforeMeetingStart")]
+ public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 41,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Minutes before meeting start that a meeting is joinable",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("CameraNumberSelect")]
+ public JoinDataComplete CameraNumberSelect = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 60,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Number Select/FB",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("DirectoryRowCount")]
+ public JoinDataComplete DirectoryRowCount = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Row Count FB",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("DirectorySelectRow")]
+ public JoinDataComplete DirectorySelectRow = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Select Row",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("CameraPresetSelect")]
+ public JoinDataComplete CameraPresetSelect = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 121,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Preset Select",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("ParticipantCount")]
+ public JoinDataComplete ParticipantCount = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 151,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Participant Count",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("Meeting Count Fb")]
+ public JoinDataComplete MeetingCount = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 161,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Meeting Count",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ [JoinName("VolumeLevel")]
+ public JoinDataComplete VolumeLevel = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 174,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Volume Level",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Analog
+ });
+
+ #endregion
+
+
+
+ #region Serials
+
+ [JoinName("CurrentDialString")]
+ public JoinDataComplete CurrentDialString = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 1,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Dial String",
+ JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("PhoneString")]
+ public JoinDataComplete PhoneDialString = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 2,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Phone Dial String",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CurrentCallName")]
+ public JoinDataComplete CurrentCallData = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 2,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Call Data - XSIG",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CallDirection")]
+ public JoinDataComplete CallDirection = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 22,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Call Direction",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("IncomingCallName")]
+ public JoinDataComplete IncomingCallName = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 51,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Incoming Call Name",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("IncomingCallNumber")]
+ public JoinDataComplete IncomingCallNumber = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 52,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Incoming Call Number",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+
+ [JoinName("DirectorySearchString")]
+ public JoinDataComplete DirectorySearchString = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 100,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Search String",
+ JoinCapabilities = eJoinCapabilities.FromSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectoryEntries")]
+ public JoinDataComplete DirectoryEntries = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 101,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Directory Entries - XSig, 255 entries",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("Schedule")]
+ public JoinDataComplete Schedule = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 102,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Schedule Data - XSIG",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CameraPresetNames")]
+ public JoinDataComplete CameraPresetNames = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 121,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Camera Preset Names - XSIG, max of 15",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CameraLayoutStringFb")]
+ public JoinDataComplete CameraLayoutStringFb = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 141,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Layout Fb",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CurrentParticipants")]
+ public JoinDataComplete CurrentParticipants = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 151,
+ JoinSpan = 1
+ },
+ new JoinMetadata()
+ {
+ Description = "Current Participants XSig",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("CurrentSource")]
+ public JoinDataComplete CurrentSource = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 201,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Current Source",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("SelfviewPositionFb")]
+ public JoinDataComplete SelfviewPositionFb = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 211,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "advance selfview position",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectoryEntrySelectedName")]
+ public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 356,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Selected Directory Entry Name",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectoryEntrySelectedNumber")]
+ public JoinDataComplete DirectoryEntrySelectedNumber = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 357,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Selected Directory Entry Number",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ [JoinName("DirectorySelectedFolderName")]
+ public JoinDataComplete DirectorySelectedFolderName = new JoinDataComplete(
+ new JoinData
+ {
+ JoinNumber = 358,
+ JoinSpan = 1
+ },
+ new JoinMetadata
+ {
+ Description = "Selected Directory Folder Name",
+ JoinCapabilities = eJoinCapabilities.ToSIMPL,
+ JoinType = eJoinType.Serial
+ });
+
+ #endregion
+
+
+ public VideoCodecControllerJoinMap(uint joinStart)
+ : base(joinStart, typeof(VideoCodecControllerJoinMap))
+ {
+ }
+
+ public VideoCodecControllerJoinMap(uint joinStart, Type type)
+ : base(joinStart, type)
+ {
+ }
+ }
+}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs
index 8380a290..7648a379 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs
@@ -25,6 +25,7 @@ namespace PepperDash.Essentials.Core
public GenericComm(DeviceConfig config)
: base(config)
{
+
PropertiesConfig = CommFactory.GetControlPropertiesConfig(config);
var commPort = CommFactory.CreateCommForDevice(config);
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/DeviceConfig.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/DeviceConfig.cs
index bb95da01..1d9ed1c2 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/DeviceConfig.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/DeviceConfig.cs
@@ -30,7 +30,19 @@ namespace PepperDash.Essentials.Core.Config
[JsonProperty("properties")]
[JsonConverter(typeof(DevicePropertiesConverter))]
- public JToken Properties { get; set; }
+ public JToken Properties { get; set; }
+
+ public DeviceConfig(DeviceConfig dc)
+ {
+ Key = dc.Key;
+ Uid = dc.Uid;
+ Name = dc.Name;
+ Group = dc.Group;
+ Type = dc.Type;
+ Properties = JToken.FromObject(dc.Properties);
+ }
+
+ public DeviceConfig() {}
}
///
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigWriter.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigWriter.cs
index cb361d28..c6224859 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigWriter.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Essentials/ConfigWriter.cs
@@ -1,162 +1,162 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-using Crestron.SimplSharp.CrestronIO;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using PepperDash.Core;
-
-namespace PepperDash.Essentials.Core.Config
-{
- ///
- /// Responsible for updating config at runtime, and writing the updates out to a local file
- ///
- public class ConfigWriter
- {
- public const string LocalConfigFolder = "LocalConfig";
-
- public const long WriteTimeout = 30000;
-
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Crestron.SimplSharp.CrestronIO;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core.Config
+{
+ ///
+ /// Responsible for updating config at runtime, and writing the updates out to a local file
+ ///
+ public class ConfigWriter
+ {
+ public const string LocalConfigFolder = "LocalConfig";
+
+ public const long WriteTimeout = 30000;
+
public static CTimer WriteTimer;
- static CCriticalSection fileLock = new CCriticalSection();
-
- ///
- /// Updates the config properties of a device
- ///
- ///
- ///
- ///
- public static bool UpdateDeviceProperties(string deviceKey, JToken properties)
- {
- bool success = false;
-
- // Get the current device config
- var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(deviceKey));
-
- if (deviceConfig != null)
- {
- // Replace the current properties JToken with the new one passed into this method
- deviceConfig.Properties = properties;
-
- Debug.Console(1, "Updated properties of device: '{0}'", deviceKey);
-
- success = true;
- }
-
- ResetTimer();
-
- return success;
- }
-
- public static bool UpdateDeviceConfig(DeviceConfig config)
- {
- bool success = false;
-
- var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(config.Key));
-
- if (deviceConfig != null)
- {
- deviceConfig = config;
-
- Debug.Console(1, "Updated config of device: '{0}'", config.Key);
-
- success = true;
- }
-
- ResetTimer();
-
- return success;
- }
-
- public static bool UpdateRoomConfig(DeviceConfig config)
- {
- bool success = false;
-
- var deviceConfig = ConfigReader.ConfigObject.Rooms.FirstOrDefault(d => d.Key.Equals(config.Key));
-
- if (deviceConfig != null)
- {
- deviceConfig = config;
-
- Debug.Console(1, "Updated config of device: '{0}'", config.Key);
-
- success = true;
- }
-
- ResetTimer();
-
- return success;
- }
-
- ///
- /// Resets (or starts) the write timer
- ///
- static void ResetTimer()
- {
- if (WriteTimer == null)
- WriteTimer = new CTimer(WriteConfigFile, WriteTimeout);
-
- WriteTimer.Reset(WriteTimeout);
-
- Debug.Console(1, "Config File write timer has been reset.");
- }
-
- ///
- /// Writes the current config to a file in the LocalConfig subfolder
- ///
- ///
- private static void WriteConfigFile(object o)
- {
- var filePath = Global.FilePathPrefix + LocalConfigFolder + Global.DirectorySeparator + "configurationFile.json";
-
- var configData = JsonConvert.SerializeObject(ConfigReader.ConfigObject);
-
- WriteFile(filePath, configData);
- }
-
- ///
- /// Writes
- ///
- ///
- ///
- public static void WriteFile(string filePath, string configData)
- {
- if (WriteTimer != null)
- WriteTimer.Stop();
-
- Debug.Console(0, Debug.ErrorLogLevel.Notice, "Writing Configuration to file");
-
- Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to write config file: '{0}'", filePath);
-
- try
- {
- if (fileLock.TryEnter())
- {
- using (StreamWriter sw = new StreamWriter(filePath))
- {
- sw.Write(configData);
- sw.Flush();
- }
- }
- else
- {
- Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to enter FileLock");
- }
- }
- catch (Exception e)
- {
- Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Config write failed: \r{0}", e);
- }
- finally
- {
- if (fileLock != null && !fileLock.Disposed)
- fileLock.Leave();
-
- }
- }
-
-
- }
+ static CCriticalSection fileLock = new CCriticalSection();
+
+ ///
+ /// Updates the config properties of a device
+ ///
+ ///
+ ///
+ ///
+ public static bool UpdateDeviceProperties(string deviceKey, JToken properties)
+ {
+ bool success = false;
+
+ // Get the current device config
+ var deviceConfig = ConfigReader.ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(deviceKey));
+
+ if (deviceConfig != null)
+ {
+ // Replace the current properties JToken with the new one passed into this method
+ deviceConfig.Properties = properties;
+
+ Debug.Console(1, "Updated properties of device: '{0}'", deviceKey);
+
+ success = true;
+ }
+
+ ResetTimer();
+
+ return success;
+ }
+
+ public static bool UpdateDeviceConfig(DeviceConfig config)
+ {
+ bool success = false;
+
+ var deviceConfigIndex = ConfigReader.ConfigObject.Devices.FindIndex(d => d.Key.Equals(config.Key));
+
+ if (deviceConfigIndex >= 0)
+ {
+ ConfigReader.ConfigObject.Devices[deviceConfigIndex] = config;
+
+ Debug.Console(1, "Updated config of device: '{0}'", config.Key);
+
+ success = true;
+ }
+
+ ResetTimer();
+
+ return success;
+ }
+
+ public static bool UpdateRoomConfig(DeviceConfig config)
+ {
+ bool success = false;
+
+ var roomConfigIndex = ConfigReader.ConfigObject.Rooms.FindIndex(d => d.Key.Equals(config.Key));
+
+ if (roomConfigIndex >= 0)
+ {
+ ConfigReader.ConfigObject.Rooms[roomConfigIndex] = config;
+
+ Debug.Console(1, "Updated room of device: '{0}'", config.Key);
+
+ success = true;
+ }
+
+ ResetTimer();
+
+ return success;
+ }
+
+ ///
+ /// Resets (or starts) the write timer
+ ///
+ static void ResetTimer()
+ {
+ if (WriteTimer == null)
+ WriteTimer = new CTimer(WriteConfigFile, WriteTimeout);
+
+ WriteTimer.Reset(WriteTimeout);
+
+ Debug.Console(1, "Config File write timer has been reset.");
+ }
+
+ ///
+ /// Writes the current config to a file in the LocalConfig subfolder
+ ///
+ ///
+ private static void WriteConfigFile(object o)
+ {
+ var filePath = Global.FilePathPrefix + LocalConfigFolder + Global.DirectorySeparator + "configurationFile.json";
+
+ var configData = JsonConvert.SerializeObject(ConfigReader.ConfigObject);
+
+ WriteFile(filePath, configData);
+ }
+
+ ///
+ /// Writes
+ ///
+ ///
+ ///
+ public static void WriteFile(string filePath, string configData)
+ {
+ if (WriteTimer != null)
+ WriteTimer.Stop();
+
+ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Writing Configuration to file");
+
+ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to write config file: '{0}'", filePath);
+
+ try
+ {
+ if (fileLock.TryEnter())
+ {
+ using (StreamWriter sw = new StreamWriter(filePath))
+ {
+ sw.Write(configData);
+ sw.Flush();
+ }
+ }
+ else
+ {
+ Debug.Console(0, Debug.ErrorLogLevel.Error, "Unable to enter FileLock");
+ }
+ }
+ catch (Exception e)
+ {
+ Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Config write failed: \r{0}", e);
+ }
+ finally
+ {
+ if (fileLock != null && !fileLock.Disposed)
+ fileLock.Leave();
+
+ }
+ }
+
+
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs
index 7b4f1c99..81988199 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/ReconfigurableDevice.cs
@@ -7,6 +7,8 @@ using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
namespace PepperDash.Essentials.Core.Devices
{
@@ -52,6 +54,8 @@ namespace PepperDash.Essentials.Core.Devices
Name = config.Name;
}
+
+
///
/// Used by the extending class to allow for any custom actions to be taken (tell the ConfigWriter to write config, etc)
///
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/JsonExtensions.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/JsonExtensions.cs
new file mode 100644
index 00000000..cdf723ea
--- /dev/null
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Extensions/JsonExtensions.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+
+namespace PepperDash.Essentials.Core
+{
+ public static class JsonExtensions
+ {
+ public static List FindTokens(this JToken containerToken, string name)
+ {
+ List matches = new List();
+ FindTokens(containerToken, name, matches);
+ return matches;
+ }
+
+ private static void FindTokens(JToken containerToken, string name, List matches)
+ {
+ if (containerToken.Type == JTokenType.Object)
+ {
+ foreach (JProperty child in containerToken.Children())
+ {
+ if (child.Name == name)
+ {
+ matches.Add(child.Value);
+ }
+ FindTokens(child.Value, name, matches);
+ }
+ }
+ else if (containerToken.Type == JTokenType.Array)
+ {
+ foreach (JToken child in containerToken.Children())
+ {
+ FindTokens(child, name, matches);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
index 3f38e2d5..ec041853 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
@@ -7,6 +7,8 @@ using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.GeneralIO;
using Crestron.SimplSharp.Reflection;
using PepperDash.Core;
+using Newtonsoft.Json.Linq;
+using Newtonsoft.Json;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.CrestronIO;
@@ -83,33 +85,81 @@ namespace PepperDash.Essentials.Core
var wrapper = new DeviceFactoryWrapper() { CType = cType, Description = description, FactoryMethod = method };
DeviceFactory.FactoryMethods.Add(typeName, wrapper);
- }
-
- ///
- /// The factory method for Core "things". Also iterates the Factory methods that have
- /// been loaded from plugins
- ///
- ///
- ///
- public static IKeyed GetDevice(DeviceConfig dc)
- {
- var key = dc.Key;
- var name = dc.Name;
- var type = dc.Type;
- var properties = dc.Properties;
-
- var typeName = dc.Type.ToLower();
-
- // Check for types that have been added by plugin dlls.
- if (FactoryMethods.ContainsKey(typeName))
- {
- Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading '{0}' from Essentials Core", dc.Type);
- return FactoryMethods[typeName].FactoryMethod(dc);
- }
-
- return null;
- }
-
+ }
+
+ private static void CheckForSecrets(IEnumerable obj)
+ {
+ foreach (var prop in obj.Where(prop => prop.Value as JObject != null))
+ {
+ if (prop.Name.ToLower() == "secret")
+ {
+ var secret = GetSecret(prop.Children().First().ToObject());
+ //var secret = GetSecret(JsonConvert.DeserializeObject(prop.Children().First().ToString()));
+ prop.Parent.Replace(secret);
+ }
+ var recurseProp = prop.Value as JObject;
+ if (recurseProp == null) return;
+ CheckForSecrets(recurseProp.Properties());
+ }
+ }
+
+ private static string GetSecret(SecretsPropertiesConfig data)
+ {
+ var secretProvider = SecretsManager.GetSecretProviderByKey(data.Provider);
+ if (secretProvider == null) return null;
+ var secret = secretProvider.GetSecret(data.Key);
+ if (secret != null) return (string) secret.Value;
+ Debug.Console(1,
+ "Unable to retrieve secret {0}{1} - Make sure you've added it to the secrets provider",
+ data.Provider, data.Key);
+ return String.Empty;
+ }
+
+
+ ///
+ /// The factory method for Core "things". Also iterates the Factory methods that have
+ /// been loaded from plugins
+ ///
+ ///
+ ///
+ public static IKeyed GetDevice(DeviceConfig dc)
+ {
+ try
+ {
+ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loading '{0}' from Essentials Core", dc.Type);
+
+ var localDc = new DeviceConfig(dc);
+
+ var key = localDc.Key;
+ var name = localDc.Name;
+ var type = localDc.Type;
+ var properties = localDc.Properties;
+ //var propRecurse = properties;
+
+ var typeName = localDc.Type.ToLower();
+
+
+ var jObject = properties as JObject;
+ if (jObject != null)
+ {
+ var jProp = jObject.Properties();
+
+ CheckForSecrets(jProp);
+ }
+
+ Debug.Console(2, "typeName = {0}", typeName);
+ // Check for types that have been added by plugin dlls.
+ return !FactoryMethods.ContainsKey(typeName) ? null : FactoryMethods[typeName].FactoryMethod(localDc);
+ }
+ catch (Exception ex)
+ {
+ Debug.Console(0, Debug.ErrorLogLevel.Error, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message);
+
+ Debug.Console(2, "{0}", ex.StackTrace);
+ return null;
+ }
+ }
+
///
/// Prints the type names and associated metadata from the FactoryMethods collection.
///
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
index e4c775d0..e65b081b 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj
@@ -209,6 +209,7 @@
+
@@ -320,6 +321,10 @@
+
+
+
+
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/IRoutingInputsExtensions.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/IRoutingInputsExtensions.cs
index e795018a..0c375825 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/IRoutingInputsExtensions.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Routing/IRoutingInputsExtensions.cs
@@ -123,25 +123,34 @@ namespace PepperDash.Essentials.Core
// No direct tie? Run back out on the inputs' attached devices...
// Only the ones that are routing devices
var attachedMidpoints = destDevInputTies.Where(t => t.SourcePort.ParentDevice is IRoutingInputsOutputs);
+
+ //Create a list for tracking already checked devices to avoid loops, if it doesn't already exist from previous iteration
+ if (alreadyCheckedDevices == null)
+ alreadyCheckedDevices = new List();
+ alreadyCheckedDevices.Add(destination as IRoutingInputsOutputs);
+
foreach (var inputTieToTry in attachedMidpoints)
{
- Debug.Console(2, destination, "Trying to find route on {0}", inputTieToTry.SourcePort.ParentDevice.Key);
var upstreamDeviceOutputPort = inputTieToTry.SourcePort;
var upstreamRoutingDevice = upstreamDeviceOutputPort.ParentDevice as IRoutingInputsOutputs;
+ Debug.Console(2, destination, "Trying to find route on {0}", upstreamRoutingDevice.Key);
+
// Check if this previous device has already been walked
- if (!(alreadyCheckedDevices != null && alreadyCheckedDevices.Contains(upstreamRoutingDevice)))
- {
- // haven't seen this device yet. Do it. Pass the output port to the next
- // level to enable switching on success
- var upstreamRoutingSuccess = upstreamRoutingDevice.GetRouteToSource(source, upstreamDeviceOutputPort,
- alreadyCheckedDevices, signalType, cycle, routeTable);
- if (upstreamRoutingSuccess)
- {
- Debug.Console(2, destination, "Upstream device route found");
- goodInputPort = inputTieToTry.DestinationPort;
- break; // Stop looping the inputs in this cycle
- }
- }
+ if (alreadyCheckedDevices.Contains(upstreamRoutingDevice))
+ {
+ Debug.Console(2, destination, "Skipping input {0} on {1}, this was already checked", upstreamRoutingDevice.Key, destination.Key);
+ continue;
+ }
+ // haven't seen this device yet. Do it. Pass the output port to the next
+ // level to enable switching on success
+ var upstreamRoutingSuccess = upstreamRoutingDevice.GetRouteToSource(source, upstreamDeviceOutputPort,
+ alreadyCheckedDevices, signalType, cycle, routeTable);
+ if (upstreamRoutingSuccess)
+ {
+ Debug.Console(2, destination, "Upstream device route found");
+ goodInputPort = inputTieToTry.DestinationPort;
+ break; // Stop looping the inputs in this cycle
+ }
}
}
@@ -163,10 +172,6 @@ namespace PepperDash.Essentials.Core
//Debug.Console(2, destination, "Exiting cycle {0}", cycle);
return true;
}
-
- if(alreadyCheckedDevices == null)
- alreadyCheckedDevices = new List();
- alreadyCheckedDevices.Add(destination as IRoutingInputsOutputs);
Debug.Console(2, destination, "No route found to {0}", source.Key);
return false;
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/CrestronSecretsProvider.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/CrestronSecretsProvider.cs
new file mode 100644
index 00000000..3e0a5964
--- /dev/null
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/CrestronSecretsProvider.cs
@@ -0,0 +1,97 @@
+using System;
+using Crestron.SimplSharp;
+using Crestron.SimplSharp.CrestronDataStore;
+using PepperDash.Core;
+
+
+namespace PepperDash.Essentials.Core
+{
+ public class CrestronSecretsProvider : ISecretProvider
+ {
+ public string Key { get; set; }
+ //Added for reference
+ private static readonly bool SecureSupported;
+ public CrestronSecretsProvider(string key)
+ {
+ Key = key;
+ }
+
+ static CrestronSecretsProvider()
+ {
+ //Added for future encrypted reference
+ SecureSupported = CrestronSecureStorage.Supported;
+
+ CrestronDataStoreStatic.InitCrestronDataStore();
+ if (SecureSupported)
+ {
+ //doThingsFuture
+ }
+ }
+
+ ///
+ /// Set secret for item in the CrestronSecretsProvider
+ ///
+ /// Secret Key
+ /// Secret Value
+ public bool SetSecret(string key, object value)
+ {
+ var secret = value as string;
+ if (String.IsNullOrEmpty(secret))
+ {
+ Debug.Console(2, this, "Unable to set secret for {0}:{1} - value is empty.", Key, key);
+ return false;
+ }
+ var setErrorCode = CrestronDataStoreStatic.SetLocalStringValue(key, secret);
+ switch (setErrorCode)
+ {
+ case CrestronDataStore.CDS_ERROR.CDS_SUCCESS:
+ Debug.Console(1, this,"Secret Successfully Set for {0}:{1}", Key, key);
+ return true;
+ default:
+ Debug.Console(2, this, Debug.ErrorLogLevel.Notice, "Unable to set secret for {0}:{1} - {2}", Key, key, setErrorCode.ToString());
+ return false;
+ }
+ }
+
+ ///
+ /// Retrieve secret for item in the CrestronSecretsProvider
+ ///
+ /// Secret Key
+ /// ISecret Object containing key, provider, and value
+ public ISecret GetSecret(string key)
+ {
+ string mySecret;
+ var getErrorCode = CrestronDataStoreStatic.GetLocalStringValue(key, out mySecret);
+
+ switch (getErrorCode)
+ {
+ case CrestronDataStore.CDS_ERROR.CDS_SUCCESS:
+ Debug.Console(2, this, "Secret Successfully retrieved for {0}:{1}", Key, key);
+ return new CrestronSecret(key, mySecret, this);
+ default:
+ Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Unable to retrieve secret for {0}:{1} - {2}",
+ Key, key, getErrorCode.ToString());
+ return null;
+ }
+ }
+ }
+
+ ///
+ /// Special container class for CrestronSecret provider
+ ///
+ public class CrestronSecret : ISecret
+ {
+ public ISecretProvider Provider { get; private set; }
+ public string Key { get; private set; }
+
+ public object Value { get; private set; }
+
+ public CrestronSecret(string key, string value, ISecretProvider provider)
+ {
+ Key = key;
+ Value = value;
+ Provider = provider;
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/Interfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/Interfaces.cs
new file mode 100644
index 00000000..43c6a230
--- /dev/null
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/Interfaces.cs
@@ -0,0 +1,24 @@
+using PepperDash.Core;
+
+namespace PepperDash.Essentials.Core
+{
+ ///
+ /// All ISecrecretProvider classes must implement this interface.
+ ///
+ public interface ISecretProvider : IKeyed
+ {
+ bool SetSecret(string key, object value);
+
+ ISecret GetSecret(string key);
+ }
+
+ ///
+ /// interface for delivering secrets in Essentials.
+ ///
+ public interface ISecret
+ {
+ ISecretProvider Provider { get; }
+ string Key { get; }
+ object Value { get; }
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/SecretsManager.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/SecretsManager.cs
new file mode 100644
index 00000000..bcb46ff5
--- /dev/null
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/SecretsManager.cs
@@ -0,0 +1,281 @@
+using System;
+using System.Collections.Generic;
+using Crestron.SimplSharp;
+using PepperDash.Core;
+
+
+namespace PepperDash.Essentials.Core
+{
+ public static class SecretsManager
+ {
+ public static Dictionary Secrets { get; private set; }
+
+ ///
+ /// Initialize the SecretsManager
+ ///
+ public static void Initialize()
+ {
+
+ AddSecretProvider("default", new CrestronSecretsProvider("default"));
+
+ CrestronConsole.AddNewConsoleCommand(SetSecretProcess, "setsecret",
+ "Adds secrets to secret provider",
+ ConsoleAccessLevelEnum.AccessOperator);
+
+ CrestronConsole.AddNewConsoleCommand(UpdateSecretProcess, "updatesecret",
+ "Updates secrets in secret provider",
+ ConsoleAccessLevelEnum.AccessAdministrator);
+
+ CrestronConsole.AddNewConsoleCommand(DeleteSecretProcess, "deletesecret",
+ "Deletes secrets in secret provider",
+ ConsoleAccessLevelEnum.AccessAdministrator);
+ }
+
+ static SecretsManager()
+ {
+ Secrets = new Dictionary();
+ }
+
+ ///
+ /// Get Secret Provider from dictionary by key
+ ///
+ /// Dictionary Key for provider
+ /// ISecretProvider
+ public static ISecretProvider GetSecretProviderByKey(string key)
+ {
+ ISecretProvider secret;
+
+ Secrets.TryGetValue(key, out secret);
+
+ if (secret == null)
+ {
+ Debug.Console(1, "SecretsManager unable to retrieve SecretProvider with the key '{0}'", key);
+ }
+ return secret;
+ }
+
+ ///
+ /// Add secret provider to secrets dictionary
+ ///
+ /// Key of new entry
+ /// New Provider Entry
+ public static void AddSecretProvider(string key, ISecretProvider provider)
+ {
+ if (!Secrets.ContainsKey(key))
+ {
+ Secrets.Add(key, provider);
+ Debug.Console(1, "Secrets provider '{0}' added to SecretsManager", key);
+ }
+ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Unable to add Provider '{0}' to Secrets. Provider with that key already exists", key );
+ }
+
+ ///
+ /// Add secret provider to secrets dictionary, with optional overwrite parameter
+ ///
+ /// Key of new entry
+ /// New provider entry
+ /// true to overwrite any existing providers in the dictionary
+ public static void AddSecretProvider(string key, ISecretProvider provider, bool overwrite)
+ {
+ if (!Secrets.ContainsKey(key))
+ {
+ Secrets.Add(key, provider);
+ Debug.Console(1, "Secrets provider '{0}' added to SecretsManager", key);
+
+ }
+ if (overwrite)
+ {
+ Secrets.Add(key, provider);
+ Debug.Console(1, Debug.ErrorLogLevel.Notice, "Provider with the key '{0}' already exists in secrets. Overwriting with new secrets provider.", key);
+
+ }
+ Debug.Console(0, Debug.ErrorLogLevel.Notice, "Unable to add Provider '{0}' to Secrets. Provider with that key already exists", key);
+ }
+
+ private static void SetSecretProcess(string cmd)
+ {
+ string response;
+ var args = cmd.Split(' ');
+
+ if (args.Length == 0)
+ {
+ //some Instructional Text
+ response = "Adds secrets to secret provider. Format 'setsecret ";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+ }
+
+ if (args.Length == 1 && args[0] == "?")
+ {
+ response = "Adds secrets to secret provider. Format 'setsecret ";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+ }
+
+ if (args.Length < 3)
+ {
+ response = "Improper number of arguments";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+
+ var provider = GetSecretProviderByKey(args[0]);
+
+ if (provider == null)
+ {
+ //someFail
+ response = "Provider key invalid";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+
+ var key = args[1];
+ var secret = args[2];
+
+ if (provider.GetSecret(key) == null)
+ {
+
+ response = provider.SetSecret(key, secret)
+ ? String.Format(
+ "Secret successfully set for {0}:{1}",
+ provider.Key, key)
+ : String.Format(
+ "Unable to set secret for {0}:{1}",
+ provider.Key, key);
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+ }
+ response =
+ String.Format(
+ "Unable to set secret for {0}:{1} - Please use the 'UpdateSecret' command to modify it");
+ CrestronConsole.ConsoleCommandResponse(response);
+ }
+
+ private static void UpdateSecretProcess(string cmd)
+ {
+ string response;
+ var args = cmd.Split(' ');
+
+ if (args.Length == 0)
+ {
+ //some Instructional Text
+ response = "Updates secrets in secret provider. Format 'updatesecret ";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+
+ if (args.Length == 1 && args[0] == "?")
+ {
+ response = "Updates secrets in secret provider. Format 'updatesecret ";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+ }
+
+
+ if (args.Length < 3)
+ {
+ //someFail
+ response = "Improper number of arguments";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+
+ var provider = GetSecretProviderByKey(args[0]);
+
+ if (provider == null)
+ {
+ //someFail
+ response = "Provider key invalid";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+
+ var key = args[1];
+ var secret = args[2];
+
+ if (provider.GetSecret(key) != null)
+ {
+ response = provider.SetSecret(key, secret)
+ ? String.Format(
+ "Secret successfully set for {0}:{1}",
+ provider.Key, key)
+ : String.Format(
+ "Unable to set secret for {0}:{1}",
+ provider.Key, key);
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+ }
+
+ response =
+ String.Format(
+ "Unable to update secret for {0}:{1} - Please use the 'SetSecret' command to create a new secret");
+ CrestronConsole.ConsoleCommandResponse(response);
+ }
+
+ private static void DeleteSecretProcess(string cmd)
+ {
+ string response;
+ var args = cmd.Split(' ');
+
+ if (args.Length == 0)
+ {
+ //some Instructional Text
+ response = "Deletes secrets in secret provider. Format 'deletesecret ";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+ if (args.Length == 1 && args[0] == "?")
+ {
+ response = "Deletes secrets in secret provider. Format 'deletesecret ";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+ }
+
+
+
+ if (args.Length < 2)
+ {
+ //someFail
+ response = "Improper number of arguments";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+
+ var provider = GetSecretProviderByKey(args[0]);
+
+ if (provider == null)
+ {
+ //someFail
+ response = "Provider key invalid";
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+ }
+
+ var key = args[1];
+
+
+ provider.SetSecret(key, "");
+ response = provider.SetSecret(key, "")
+ ? String.Format(
+ "Secret successfully deleted for {0}:{1}",
+ provider.Key, key)
+ : String.Format(
+ "Unable to delete secret for {0}:{1}",
+ provider.Key, key);
+ CrestronConsole.ConsoleCommandResponse(response);
+ return;
+
+
+ }
+ }
+
+
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/SecretsPropertiesConfig.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/SecretsPropertiesConfig.cs
new file mode 100644
index 00000000..68026aa1
--- /dev/null
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Secrets/SecretsPropertiesConfig.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+using Newtonsoft.Json;
+
+namespace PepperDash.Essentials.Core
+{
+ ///
+ /// Provide a way to easily deserialize into a secret object from config
+ ///
+ public class SecretsPropertiesConfig
+ {
+ [JsonProperty("provider")]
+ public string Provider { get; set; }
+ [JsonProperty("key")]
+ public string Key { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
index 72f84f48..8c6b2ced 100644
--- a/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
+++ b/essentials-framework/Essentials DM/Essentials_DM/Chassis/DmChassisController.cs
@@ -1,324 +1,324 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
using Crestron.SimplSharp;
using Crestron.SimplSharp.Reflection;
-using Crestron.SimplSharpPro;
-using Crestron.SimplSharpPro.DeviceSupport;
-using Crestron.SimplSharpPro.DM;
-using Crestron.SimplSharpPro.DM.Cards;
-using Crestron.SimplSharpPro.DM.Endpoints;
-using Newtonsoft.Json;
-using PepperDash.Core;
-using PepperDash.Essentials.Core;
-using PepperDash.Essentials.Core.Bridges;
-using PepperDash.Essentials.DM.Config;
-using PepperDash.Essentials.Core.Config;
-
-namespace PepperDash.Essentials.DM
-{
- ///
- /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
- ///
- ///
+using Crestron.SimplSharpPro;
+using Crestron.SimplSharpPro.DeviceSupport;
+using Crestron.SimplSharpPro.DM;
+using Crestron.SimplSharpPro.DM.Cards;
+using Crestron.SimplSharpPro.DM.Endpoints;
+using Newtonsoft.Json;
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Bridges;
+using PepperDash.Essentials.DM.Config;
+using PepperDash.Essentials.Core.Config;
+
+namespace PepperDash.Essentials.DM
+{
+ ///
+ /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
+ ///
+ ///
[Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")]
public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumericWithFeedback
{
- private const string NonePortKey = "inputCard0--None";
- public DMChassisPropertiesConfig PropertiesConfig { get; set; }
-
+ private const string NonePortKey = "inputCard0--None";
+ public DMChassisPropertiesConfig PropertiesConfig { get; set; }
+
public Switch Chassis { get; private set; }
//IroutingNumericEvent
- public event EventHandler NumericSwitchChange;
-
- // Feedbacks for EssentialDM
- public Dictionary VideoOutputFeedbacks { get; private set; }
- public Dictionary AudioOutputFeedbacks { get; private set; }
- public Dictionary VideoInputSyncFeedbacks { get; private set; }
- public Dictionary InputEndpointOnlineFeedbacks { get; private set; }
- public Dictionary OutputEndpointOnlineFeedbacks { get; private set; }
- public Dictionary InputNameFeedbacks { get; private set; }
- public Dictionary OutputNameFeedbacks { get; private set; }
- public Dictionary OutputVideoRouteNameFeedbacks { get; private set; }
- public Dictionary OutputAudioRouteNameFeedbacks { get; private set; }
- public Dictionary UsbOutputRoutedToFeebacks { get; private set; }
- public Dictionary UsbInputRoutedToFeebacks { get; private set; }
- public Dictionary OutputDisabledByHdcpFeedbacks { get; private set; }
-
- public IntFeedback SystemIdFeebdack { get; private set; }
- public BoolFeedback SystemIdBusyFeedback { get; private set; }
- public BoolFeedback EnableAudioBreakawayFeedback { get; private set; }
- public BoolFeedback EnableUsbBreakawayFeedback { get; private set; }
-
+ public event EventHandler NumericSwitchChange;
+
+ // Feedbacks for EssentialDM
+ public Dictionary VideoOutputFeedbacks { get; private set; }
+ public Dictionary AudioOutputFeedbacks { get; private set; }
+ public Dictionary VideoInputSyncFeedbacks { get; private set; }
+ public Dictionary InputEndpointOnlineFeedbacks { get; private set; }
+ public Dictionary OutputEndpointOnlineFeedbacks { get; private set; }
+ public Dictionary InputNameFeedbacks { get; private set; }
+ public Dictionary OutputNameFeedbacks { get; private set; }
+ public Dictionary OutputVideoRouteNameFeedbacks { get; private set; }
+ public Dictionary OutputAudioRouteNameFeedbacks { get; private set; }
+ public Dictionary UsbOutputRoutedToFeebacks { get; private set; }
+ public Dictionary UsbInputRoutedToFeebacks { get; private set; }
+ public Dictionary OutputDisabledByHdcpFeedbacks { get; private set; }
+
+ public IntFeedback SystemIdFeebdack { get; private set; }
+ public BoolFeedback SystemIdBusyFeedback { get; private set; }
+ public BoolFeedback EnableAudioBreakawayFeedback { get; private set; }
+ public BoolFeedback EnableUsbBreakawayFeedback { get; private set; }
+
public Dictionary InputCardHdcpStateFeedbacks { get; private set; }
public Dictionary InputStreamCardStateFeedbacks { get; private set; }
- public Dictionary OutputStreamCardStateFeedbacks { get; private set; }
-
- public Dictionary InputCardHdcpCapabilityTypes { get; private set; }
-
- // Need a couple Lists of generic Backplane ports
- public RoutingPortCollection InputPorts { get; private set; }
- public RoutingPortCollection OutputPorts { get; private set; }
-
- public Dictionary TxDictionary { get; set; }
- public Dictionary RxDictionary { get; set; }
-
- //public Dictionary InputCards { get; private set; }
- //public Dictionary OutputCards { get; private set; }
-
- public Dictionary InputNames { get; set; }
- public Dictionary OutputNames { get; set; }
- public Dictionary VolumeControls { get; private set; }
-
- public const int RouteOffTime = 500;
- Dictionary RouteOffTimers = new Dictionary();
-
- ///
- /// Text that represents when an output has no source routed to it
- ///
- public string NoRouteText = "";
-
- ///
- /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
- ///
- public static DmChassisController GetDmChassisController(string key, string name,
- string type, DMChassisPropertiesConfig properties)
- {
- try
- {
- type = type.ToLower();
- uint ipid = properties.Control.IpIdInt;
-
- DmMDMnxn chassis = null;
- switch (type) {
- case "dmmd8x8":
- chassis = new DmMd8x8(ipid, Global.ControlSystem);
- break;
- case "dmmd8x8rps":
- chassis = new DmMd8x8rps(ipid, Global.ControlSystem);
- break;
- case "dmmd8x8cpu3":
- chassis = new DmMd8x8Cpu3(ipid, Global.ControlSystem);
- break;
- case "dmmd8x8cpu3rps":
- chassis = new DmMd8x8Cpu3rps(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16":
- chassis = new DmMd16x16(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16rps":
- chassis = new DmMd16x16rps(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16cpu3":
- chassis = new DmMd16x16Cpu3(ipid, Global.ControlSystem);
- break;
- case "dmmd16x16cpu3rps":
- chassis = new DmMd16x16Cpu3rps(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32":
- chassis = new DmMd32x32(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32rps":
- chassis = new DmMd32x32rps(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32cpu3":
- chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem);
- break;
- case "dmmd32x32cpu3rps":
- chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem);
- break;
- }
-
- if (chassis == null)
- return null;
-
- var controller = new DmChassisController(key, name, chassis);
-
+ public Dictionary OutputStreamCardStateFeedbacks { get; private set; }
+
+ public Dictionary InputCardHdcpCapabilityTypes { get; private set; }
+
+ // Need a couple Lists of generic Backplane ports
+ public RoutingPortCollection InputPorts { get; private set; }
+ public RoutingPortCollection OutputPorts { get; private set; }
+
+ public Dictionary TxDictionary { get; set; }
+ public Dictionary RxDictionary { get; set; }
+
+ //public Dictionary InputCards { get; private set; }
+ //public Dictionary OutputCards { get; private set; }
+
+ public Dictionary InputNames { get; set; }
+ public Dictionary OutputNames { get; set; }
+ public Dictionary VolumeControls { get; private set; }
+
+ public const int RouteOffTime = 500;
+ Dictionary RouteOffTimers = new Dictionary();
+
+ ///
+ /// Text that represents when an output has no source routed to it
+ ///
+ public string NoRouteText = "";
+
+ ///
+ /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
+ ///
+ public static DmChassisController GetDmChassisController(string key, string name,
+ string type, DMChassisPropertiesConfig properties)
+ {
+ try
+ {
+ type = type.ToLower();
+ uint ipid = properties.Control.IpIdInt;
+
+ DmMDMnxn chassis = null;
+ switch (type) {
+ case "dmmd8x8":
+ chassis = new DmMd8x8(ipid, Global.ControlSystem);
+ break;
+ case "dmmd8x8rps":
+ chassis = new DmMd8x8rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd8x8cpu3":
+ chassis = new DmMd8x8Cpu3(ipid, Global.ControlSystem);
+ break;
+ case "dmmd8x8cpu3rps":
+ chassis = new DmMd8x8Cpu3rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16":
+ chassis = new DmMd16x16(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16rps":
+ chassis = new DmMd16x16rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16cpu3":
+ chassis = new DmMd16x16Cpu3(ipid, Global.ControlSystem);
+ break;
+ case "dmmd16x16cpu3rps":
+ chassis = new DmMd16x16Cpu3rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32":
+ chassis = new DmMd32x32(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32rps":
+ chassis = new DmMd32x32rps(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32cpu3":
+ chassis = new DmMd32x32Cpu3(ipid, Global.ControlSystem);
+ break;
+ case "dmmd32x32cpu3rps":
+ chassis = new DmMd32x32Cpu3rps(ipid, Global.ControlSystem);
+ break;
+ }
+
+ if (chassis == null)
+ return null;
+
+ var controller = new DmChassisController(key, name, chassis);
+
//
var clearInputPort = new RoutingInputPort(NonePortKey, eRoutingSignalType.AudioVideo,
eRoutingPortConnectionType.None, null, controller);
- controller.InputPorts.Add(clearInputPort);
-
- // add the cards and port names
- foreach (var kvp in properties.InputSlots)
- controller.AddInputCard(kvp.Value, kvp.Key);
-
- foreach (var kvp in properties.OutputSlots)
- controller.AddOutputCard(kvp.Value, kvp.Key);
-
- foreach (var kvp in properties.VolumeControls)
- {
- // get the card
- // check it for an audio-compatible type
- // make a something-something that will make it work
- // retire to mountain village
- var outNum = kvp.Key;
- var card = controller.Chassis.Outputs[outNum].Card;
- Audio.Output audio = null;
- if (card is DmcHdo)
- audio = (card as DmcHdo).Audio;
- else if (card is Dmc4kHdo)
- audio = (card as Dmc4kHdo).Audio;
- if (audio == null)
- continue;
-
- // wire up the audio to something here...
- controller.AddVolumeControl(outNum, audio);
- }
-
- controller.InputNames = properties.InputNames;
- controller.OutputNames = properties.OutputNames;
-
- if (!string.IsNullOrEmpty(properties.NoRouteText))
- {
- controller.NoRouteText = properties.NoRouteText;
- Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText);
- }
- else
- {
- Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText);
- }
-
- controller.PropertiesConfig = properties;
- return controller;
- }
- catch (Exception e)
- {
- Debug.Console(0, "Error creating DM chassis:\r{0}", e);
- }
-
- return null;
- }
-
- ///
- ///
- ///
- ///
- ///
- ///
- public DmChassisController(string key, string name, DmMDMnxn chassis)
- : base(key, name, chassis)
+ controller.InputPorts.Add(clearInputPort);
+
+ // add the cards and port names
+ foreach (var kvp in properties.InputSlots)
+ controller.AddInputCard(kvp.Value, kvp.Key);
+
+ foreach (var kvp in properties.OutputSlots)
+ controller.AddOutputCard(kvp.Value, kvp.Key);
+
+ foreach (var kvp in properties.VolumeControls)
+ {
+ // get the card
+ // check it for an audio-compatible type
+ // make a something-something that will make it work
+ // retire to mountain village
+ var outNum = kvp.Key;
+ var card = controller.Chassis.Outputs[outNum].Card;
+ Audio.Output audio = null;
+ if (card is DmcHdo)
+ audio = (card as DmcHdo).Audio;
+ else if (card is Dmc4kHdo)
+ audio = (card as Dmc4kHdo).Audio;
+ if (audio == null)
+ continue;
+
+ // wire up the audio to something here...
+ controller.AddVolumeControl(outNum, audio);
+ }
+
+ controller.InputNames = properties.InputNames;
+ controller.OutputNames = properties.OutputNames;
+
+ if (!string.IsNullOrEmpty(properties.NoRouteText))
+ {
+ controller.NoRouteText = properties.NoRouteText;
+ Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText);
+ }
+ else
+ {
+ Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText);
+ }
+
+ controller.PropertiesConfig = properties;
+ return controller;
+ }
+ catch (Exception e)
+ {
+ Debug.Console(0, "Error creating DM chassis:\r{0}", e);
+ }
+
+ return null;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public DmChassisController(string key, string name, DmMDMnxn chassis)
+ : base(key, name, chassis)
{
-
- Chassis = chassis;
- InputPorts = new RoutingPortCollection();
- OutputPorts = new RoutingPortCollection();
- VolumeControls = new Dictionary();
- TxDictionary = new Dictionary();
- RxDictionary = new Dictionary();
- IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange);
- Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
- Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
- Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
- Chassis.BaseEvent += ChassisOnBaseEvent;
- VideoOutputFeedbacks = new Dictionary();
- AudioOutputFeedbacks = new Dictionary();
- UsbOutputRoutedToFeebacks = new Dictionary();
- UsbInputRoutedToFeebacks = new Dictionary();
- OutputDisabledByHdcpFeedbacks = new Dictionary();
- VideoInputSyncFeedbacks = new Dictionary();
- InputNameFeedbacks = new Dictionary();
- OutputNameFeedbacks = new Dictionary();
- OutputVideoRouteNameFeedbacks = new Dictionary();
- OutputAudioRouteNameFeedbacks = new Dictionary();
- InputEndpointOnlineFeedbacks = new Dictionary();
- OutputEndpointOnlineFeedbacks = new Dictionary();
-
- SystemIdFeebdack = new IntFeedback(() => { return (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue; });
- SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; });
- EnableAudioBreakawayFeedback =
- new BoolFeedback(() => (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue);
- EnableUsbBreakawayFeedback =
- new BoolFeedback(() => (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue);
-
+
+ Chassis = chassis;
+ InputPorts = new RoutingPortCollection();
+ OutputPorts = new RoutingPortCollection();
+ VolumeControls = new Dictionary();
+ TxDictionary = new Dictionary();
+ RxDictionary = new Dictionary();
+ IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange);
+ Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
+ Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
+ Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
+ Chassis.BaseEvent += ChassisOnBaseEvent;
+ VideoOutputFeedbacks = new Dictionary();
+ AudioOutputFeedbacks = new Dictionary();
+ UsbOutputRoutedToFeebacks = new Dictionary();
+ UsbInputRoutedToFeebacks = new Dictionary();
+ OutputDisabledByHdcpFeedbacks = new Dictionary();
+ VideoInputSyncFeedbacks = new Dictionary();
+ InputNameFeedbacks = new Dictionary();
+ OutputNameFeedbacks = new Dictionary();
+ OutputVideoRouteNameFeedbacks = new Dictionary();
+ OutputAudioRouteNameFeedbacks = new Dictionary();
+ InputEndpointOnlineFeedbacks = new Dictionary();
+ OutputEndpointOnlineFeedbacks = new Dictionary();
+
+ SystemIdFeebdack = new IntFeedback(() => { return (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue; });
+ SystemIdBusyFeedback = new BoolFeedback(() => { return (Chassis as DmMDMnxn).SystemIdBusy.BoolValue; });
+ EnableAudioBreakawayFeedback =
+ new BoolFeedback(() => (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue);
+ EnableUsbBreakawayFeedback =
+ new BoolFeedback(() => (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue);
+
InputCardHdcpStateFeedbacks = new Dictionary();
InputStreamCardStateFeedbacks = new Dictionary();
- OutputStreamCardStateFeedbacks = new Dictionary();
- InputCardHdcpCapabilityTypes = new Dictionary();
-
- for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
- {
- var tempX = x;
-
- if (Chassis.Outputs[tempX] != null)
- {
- VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
- if (Chassis.Outputs[tempX].VideoOutFeedback != null)
- return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;
-
- return 0;
- });
- AudioOutputFeedbacks[tempX] = new IntFeedback(() => {
- if (Chassis.Outputs[tempX].AudioOutFeedback != null)
- return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number;
-
- return 0;
- });
- UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => {
- if (Chassis.Outputs[tempX].USBRoutedToFeedback != null)
- return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number;
-
- return 0;
- });
-
- OutputNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Outputs[tempX].NameFeedback != null)
- return Chassis.Outputs[tempX].NameFeedback.StringValue;
-
- return "";
- });
- OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Outputs[tempX].VideoOutFeedback != null)
- return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
-
- return NoRouteText;
- });
- OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Outputs[tempX].AudioOutFeedback != null)
- return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
-
- return NoRouteText;
- });
- OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => Chassis.Outputs[tempX].EndpointOnlineFeedback);
-
- OutputDisabledByHdcpFeedbacks[tempX] = new BoolFeedback(() => {
- var output = Chassis.Outputs[tempX];
-
- var hdmiTxOutput = output as Card.HdmiTx;
- if (hdmiTxOutput != null)
- return hdmiTxOutput.HdmiOutput.DisabledByHdcp.BoolValue;
-
- var dmHdmiOutput = output as Card.DmHdmiOutput;
- if (dmHdmiOutput != null)
- return dmHdmiOutput.DisabledByHdcpFeedback.BoolValue;
-
- var dmsDmOutAdvanced = output as Card.DmsDmOutAdvanced;
- if (dmsDmOutAdvanced != null)
- return dmsDmOutAdvanced.DisabledByHdcpFeedback.BoolValue;
-
- var dmps3HdmiAudioOutput = output as Card.Dmps3HdmiAudioOutput;
- if (dmps3HdmiAudioOutput != null)
- return dmps3HdmiAudioOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- var dmps3HdmiOutput = output as Card.Dmps3HdmiOutput;
- if (dmps3HdmiOutput != null)
- return dmps3HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- var dmps3HdmiOutputBackend = output as Card.Dmps3HdmiOutputBackend;
- if (dmps3HdmiOutputBackend != null)
- return dmps3HdmiOutputBackend.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- // var hdRx4kX10HdmiOutput = output as HdRx4kX10HdmiOutput;
- // if (hdRx4kX10HdmiOutput != null)
- // return hdRx4kX10HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- // var hdMdNxMHdmiOutput = output as HdMdNxMHdmiOutput;
- // if (hdMdNxMHdmiOutput != null)
- // return hdMdNxMHdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
-
- return false;
+ OutputStreamCardStateFeedbacks = new Dictionary();
+ InputCardHdcpCapabilityTypes = new Dictionary();
+
+ for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
+ {
+ var tempX = x;
+
+ if (Chassis.Outputs[tempX] != null)
+ {
+ VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Outputs[tempX].VideoOutFeedback != null)
+ return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;
+
+ return 0;
+ });
+ AudioOutputFeedbacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Outputs[tempX].AudioOutFeedback != null)
+ return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number;
+
+ return 0;
+ });
+ UsbOutputRoutedToFeebacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Outputs[tempX].USBRoutedToFeedback != null)
+ return (ushort)Chassis.Outputs[tempX].USBRoutedToFeedback.Number;
+
+ return 0;
+ });
+
+ OutputNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Outputs[tempX].NameFeedback != null)
+ return Chassis.Outputs[tempX].NameFeedback.StringValue;
+
+ return "";
+ });
+ OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Outputs[tempX].VideoOutFeedback != null)
+ return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
+
+ return NoRouteText;
+ });
+ OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Outputs[tempX].AudioOutFeedback != null)
+ return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
+
+ return NoRouteText;
+ });
+ OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => Chassis.Outputs[tempX].EndpointOnlineFeedback);
+
+ OutputDisabledByHdcpFeedbacks[tempX] = new BoolFeedback(() => {
+ var output = Chassis.Outputs[tempX];
+
+ var hdmiTxOutput = output as Card.HdmiTx;
+ if (hdmiTxOutput != null)
+ return hdmiTxOutput.HdmiOutput.DisabledByHdcp.BoolValue;
+
+ var dmHdmiOutput = output as Card.DmHdmiOutput;
+ if (dmHdmiOutput != null)
+ return dmHdmiOutput.DisabledByHdcpFeedback.BoolValue;
+
+ var dmsDmOutAdvanced = output as Card.DmsDmOutAdvanced;
+ if (dmsDmOutAdvanced != null)
+ return dmsDmOutAdvanced.DisabledByHdcpFeedback.BoolValue;
+
+ var dmps3HdmiAudioOutput = output as Card.Dmps3HdmiAudioOutput;
+ if (dmps3HdmiAudioOutput != null)
+ return dmps3HdmiAudioOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ var dmps3HdmiOutput = output as Card.Dmps3HdmiOutput;
+ if (dmps3HdmiOutput != null)
+ return dmps3HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ var dmps3HdmiOutputBackend = output as Card.Dmps3HdmiOutputBackend;
+ if (dmps3HdmiOutputBackend != null)
+ return dmps3HdmiOutputBackend.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ // var hdRx4kX10HdmiOutput = output as HdRx4kX10HdmiOutput;
+ // if (hdRx4kX10HdmiOutput != null)
+ // return hdRx4kX10HdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ // var hdMdNxMHdmiOutput = output as HdMdNxMHdmiOutput;
+ // if (hdMdNxMHdmiOutput != null)
+ // return hdMdNxMHdmiOutput.HdmiOutputPort.DisabledByHdcpFeedback.BoolValue;
+
+ return false;
});
OutputStreamCardStateFeedbacks[tempX] = new IntFeedback(() =>
{
@@ -346,105 +346,105 @@ namespace PepperDash.Essentials.DM
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "Error adding output stream card in slot: {0}. Error: {1}", tempX, iopex);
return 0;
}
- });
- }
-
- if (Chassis.Inputs[tempX] != null)
- {
- UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => {
- if (Chassis.Inputs[tempX].USBRoutedToFeedback != null)
- return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number;
-
- return 0;
- });
- VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
- if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
- return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
-
- return false;
- });
- InputNameFeedbacks[tempX] = new StringFeedback(() => {
- if (Chassis.Inputs[tempX].NameFeedback != null)
- return Chassis.Inputs[tempX].NameFeedback.StringValue;
-
- return "";
- });
-
- InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; });
-
- InputCardHdcpStateFeedbacks[tempX] = new IntFeedback(() => {
- try
- {
- var inputCard = Chassis.Inputs[tempX];
-
- if (inputCard.Card is DmcHd)
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
-
- if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
- return 0;
- }
-
- if (inputCard.Card is DmcHdDsp)
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
-
- if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
- return 0;
- }
- if (inputCard.Card is Dmc4kHdBase)
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
- return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
- }
- if (inputCard.Card is Dmc4kHdDspBase)
- {
- if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
- return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability;
- }
-
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
- if ((inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
- return 0;
- }
-
- if (inputCard.Card is Dmc4kCBase)
- {
- if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
- return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability;
- }
-
- if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
- return 0;
- }
- if (inputCard.Card is Dmc4kCDspBase)
- {
- if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
- {
- InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
- return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability;
- }
-
- if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue)
- return 1;
-
- return 0;
- }
- return 0;
- }
- catch (InvalidOperationException iopex)
- {
- Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "The Input Card in slot: {0} supports HDCP 2. Please update the configuration value in the inputCardSupportsHdcp2 object to true. Error: {1}", tempX, iopex);
- return 0;
- }
+ });
+ }
+
+ if (Chassis.Inputs[tempX] != null)
+ {
+ UsbInputRoutedToFeebacks[tempX] = new IntFeedback(() => {
+ if (Chassis.Inputs[tempX].USBRoutedToFeedback != null)
+ return (ushort)Chassis.Inputs[tempX].USBRoutedToFeedback.Number;
+
+ return 0;
+ });
+ VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
+ if (Chassis.Inputs[tempX].VideoDetectedFeedback != null)
+ return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
+
+ return false;
+ });
+ InputNameFeedbacks[tempX] = new StringFeedback(() => {
+ if (Chassis.Inputs[tempX].NameFeedback != null)
+ return Chassis.Inputs[tempX].NameFeedback.StringValue;
+
+ return "";
+ });
+
+ InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; });
+
+ InputCardHdcpStateFeedbacks[tempX] = new IntFeedback(() => {
+ try
+ {
+ var inputCard = Chassis.Inputs[tempX];
+
+ if (inputCard.Card is DmcHd)
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+
+ if ((inputCard.Card as DmcHd).HdmiInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ return 0;
+ }
+
+ if (inputCard.Card is DmcHdDsp)
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+
+ if ((inputCard.Card as DmcHdDsp).HdmiInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ return 0;
+ }
+ if (inputCard.Card is Dmc4kHdBase)
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
+ return (int)(inputCard.Card as Dmc4kHdBase).HdmiInput.HdcpReceiveCapability;
+ }
+ if (inputCard.Card is Dmc4kHdDspBase)
+ {
+ if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.Hdcp2_2Support;
+ return (int)(inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpReceiveCapability;
+ }
+
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+ if ((inputCard.Card as Dmc4kHdDspBase).HdmiInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ return 0;
+ }
+
+ if (inputCard.Card is Dmc4kCBase)
+ {
+ if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+ return (int)(inputCard.Card as Dmc4kCBase).DmInput.HdcpReceiveCapability;
+ }
+
+ if ((inputCard.Card as Dmc4kCBase).DmInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+ return 0;
+ }
+ if (inputCard.Card is Dmc4kCDspBase)
+ {
+ if (PropertiesConfig.InputSlotSupportsHdcp2[tempX])
+ {
+ InputCardHdcpCapabilityTypes[tempX] = eHdcpCapabilityType.HdcpAutoSupport;
+ return (int)(inputCard.Card as Dmc4kCDspBase).DmInput.HdcpReceiveCapability;
+ }
+
+ if ((inputCard.Card as Dmc4kCDspBase).DmInput.HdcpSupportOnFeedback.BoolValue)
+ return 1;
+
+ return 0;
+ }
+ return 0;
+ }
+ catch (InvalidOperationException iopex)
+ {
+ Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "The Input Card in slot: {0} supports HDCP 2. Please update the configuration value in the inputCardSupportsHdcp2 object to true. Error: {1}", tempX, iopex);
+ return 0;
+ }
});
InputStreamCardStateFeedbacks[tempX] = new IntFeedback(() =>
{
@@ -472,111 +472,111 @@ namespace PepperDash.Essentials.DM
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "Error adding input stream card in slot: {0}. Error: {1}", tempX, iopex);
return 0;
}
- });
- }
- }
- }
-
- private void ChassisOnBaseEvent(GenericBase device, BaseEventArgs args)
- {
-
- }
-
- ///
- ///
- ///
- ///
- ///
- public void AddInputCard(string type, uint number)
- {
- Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number);
-
- type = type.ToLower();
-
+ });
+ }
+ }
+ }
+
+ private void ChassisOnBaseEvent(GenericBase device, BaseEventArgs args)
+ {
+
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void AddInputCard(string type, uint number)
+ {
+ Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number);
+
+ type = type.ToLower();
+
switch (type)
{
case "dmchd":
- {
- var inputCard = new DmcHd(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
+ {
+ var inputCard = new DmcHd(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
}
break;
case "dmchddsp":
- {
- var inputCard = new DmcHdDsp(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
+ {
+ var inputCard = new DmcHdDsp(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
}
break;
case "dmc4khd":
- {
- var inputCard = new Dmc4kHd(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kHd(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
}
break;
case "dmc4khddsp":
- {
- var inputCard = new Dmc4kHdDsp(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kHdDsp(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
}
break;
case "dmc4kzhd":
- {
- var inputCard = new Dmc4kzHd(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kzHd(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
}
break;
case "dmc4kzhddsp":
- {
- var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
- var cecPort = inputCard.HdmiInput as ICec;
- AddHdmiInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
+ var cecPort = inputCard.HdmiInput as ICec;
+ AddHdmiInCardPorts(number, cecPort);
}
break;
case "dmcc":
- {
- var inputCard = new DmcC(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
+ {
+ var inputCard = new DmcC(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
}
break;
case "dmccdsp":
- {
- var inputCard = new DmcCDsp(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
+ {
+ var inputCard = new DmcCDsp(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
}
break;
case "dmc4kc":
- {
- var inputCard = new Dmc4kC(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kC(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
}
break;
case "dmc4kcdsp":
- {
- var inputCard = new Dmc4kCDsp(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kCDsp(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
}
break;
case "dmc4kzc":
- {
- var inputCard = new Dmc4kzC(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kzC(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
}
break;
case "dmc4kzcdsp":
- {
- var inputCard = new Dmc4kzCDsp(number, this.Chassis);
- var cecPort = inputCard.DmInput as ICec;
- AddDmInCardPorts(number, cecPort);
+ {
+ var inputCard = new Dmc4kzCDsp(number, this.Chassis);
+ var cecPort = inputCard.DmInput as ICec;
+ AddDmInCardPorts(number, cecPort);
}
break;
case "dmccat":
@@ -610,7 +610,7 @@ namespace PepperDash.Essentials.DM
case "dmcsdi":
new DmcSdi(number, Chassis);
AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Sdi, null);
AddInCardHdmiAndAudioLoopPorts(number);
break;
@@ -657,324 +657,324 @@ namespace PepperDash.Essentials.DM
AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
AddInCardHdmiAndAudioLoopPorts(number);
break;
- }
- }
-
- void AddDmInCardPorts(uint number)
- {
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
-
- void AddDmInCardPorts(uint number, ICec cecPort)
- {
- AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
-
- void AddHdmiInCardPorts(uint number, ICec cecPort)
- {
- AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
- AddInCardHdmiAndAudioLoopPorts(number);
- }
-
- void AddInCardHdmiAndAudioLoopPorts(uint number)
- {
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, null);
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
- }
-
- void AddInCardHdmiLoopPort(uint number)
- {
- AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, null);
- }
-
- ///
- ///
- ///
- ///
- ///
- public void AddOutputCard(string type, uint number)
- {
- type = type.ToLower();
-
- Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number);
+ }
+ }
+
+ void AddDmInCardPorts(uint number)
+ {
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+
+ void AddDmInCardPorts(uint number, ICec cecPort)
+ {
+ AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, cecPort);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+
+ void AddHdmiInCardPorts(uint number, ICec cecPort)
+ {
+ AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
+ AddInCardHdmiAndAudioLoopPorts(number);
+ }
+
+ void AddInCardHdmiAndAudioLoopPorts(uint number)
+ {
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, null);
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
+ }
+
+ void AddInCardHdmiLoopPort(uint number)
+ {
+ AddOutputPortWithDebug(string.Format("inputCard{0}", number), "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, null);
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void AddOutputCard(string type, uint number)
+ {
+ type = type.ToLower();
+
+ Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number);
switch (type)
{
case "dmc4khdo":
- {
- var outputCard = new Dmc4kHdoSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- var cecPort2 = outputCard.Card2.HdmiOutput;
- AddDmcHdoPorts(number, cecPort1, cecPort2);
+ {
+ var outputCard = new Dmc4kHdoSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ var cecPort2 = outputCard.Card2.HdmiOutput;
+ AddDmcHdoPorts(number, cecPort1, cecPort2);
}
break;
case "dmc4kzhdo":
- {
- var outputCard = new Dmc4kzHdoSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- var cecPort2 = outputCard.Card2.HdmiOutput;
- AddDmcHdoPorts(number, cecPort1, cecPort2);
+ {
+ var outputCard = new Dmc4kzHdoSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ var cecPort2 = outputCard.Card2.HdmiOutput;
+ AddDmcHdoPorts(number, cecPort1, cecPort2);
}
break;
case "dmchdo":
- {
- var outputCard = new DmcHdoSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- var cecPort2 = outputCard.Card2.HdmiOutput;
- AddDmcHdoPorts(number, cecPort1, cecPort2);
+ {
+ var outputCard = new DmcHdoSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ var cecPort2 = outputCard.Card2.HdmiOutput;
+ AddDmcHdoPorts(number, cecPort1, cecPort2);
}
break;
case "dmc4kcohd":
- {
- var outputCard = new Dmc4kCoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
+ {
+ var outputCard = new Dmc4kCoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
}
break;
case "dmc4kzcohd":
- {
- var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
+ {
+ var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
}
break;
case "dmccohd":
- {
- var outputCard = new DmcCoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
+ {
+ var outputCard = new DmcCoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
}
break;
case "dmccatohd":
- {
- var outputCard = new DmcCatoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddDmcCoPorts(number, cecPort1);
+ {
+ var outputCard = new DmcCatoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddDmcCoPorts(number, cecPort1);
}
break;
case "dmcsohd":
- {
- var outputCard = new DmcSoHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 1]);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 2]);
+ {
+ var outputCard = new DmcSoHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 1]);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmMmFiber, Chassis.Outputs[2 * (number - 1) + 2]);
}
break;
case "dmcs2ohd":
- {
- var outputCard = new DmcS2oHdSingle(number, Chassis);
- var cecPort1 = outputCard.Card1.HdmiOutput;
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 1]);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 2]);
+ {
+ var outputCard = new DmcS2oHdSingle(number, Chassis);
+ var cecPort1 = outputCard.Card1.HdmiOutput;
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 1]);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmSmFiber, Chassis.Outputs[2 * (number - 1) + 2]);
}
break;
case "dmcstro":
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Streaming, Chassis.Outputs[2 * (number - 1) + 1]);
break;
default:
Debug.Console(1, this, " WARNING: Output card type '{0}' is not available", type);
break;
- }
- }
-
- void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2)
- {
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
- Chassis.Outputs[2 * (number - 1) + 1]);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 2], cecPort2);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
- Chassis.Outputs[2 * (number - 1) + 2]);
- }
-
- void AddDmcCoPorts(uint number, ICec cecPort1)
- {
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 1]);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
- AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 2]);
- }
-
- ///
- /// Adds InputPort
- ///
+ }
+ }
+
+ void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2)
+ {
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
+ Chassis.Outputs[2 * (number - 1) + 1]);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 2], cecPort2);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio,
+ Chassis.Outputs[2 * (number - 1) + 2]);
+ }
+
+ void AddDmcCoPorts(uint number, ICec cecPort1)
+ {
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 1]);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, Chassis.Outputs[2 * (number - 1) + 1], cecPort1);
+ AddOutputPortWithDebug(string.Format("outputCard{0}", number), "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.DmCat, Chassis.Outputs[2 * (number - 1) + 2]);
+ }
+
+ ///
+ /// Adds InputPort
+ ///
void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
{
AddInputPortWithDebug(cardNum, portName, sigType, portType, null);
- }
-
- ///
- /// Adds InputPort and sets Port as ICec object
- ///
- void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
- {
- var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
- Debug.Console(2, this, "Adding input port '{0}'", portKey);
+ }
+
+ ///
+ /// Adds InputPort and sets Port as ICec object
+ ///
+ void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
+ {
+ var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
+ Debug.Console(2, this, "Adding input port '{0}'", portKey);
var inputPort = new RoutingInputPort(portKey, sigType, portType, Chassis.Inputs[cardNum], this)
{
FeedbackMatchObject = Chassis.Inputs[cardNum]
- }; ;
-
- if (cecPort != null)
- inputPort.Port = cecPort;
-
+ }; ;
+
+ if (cecPort != null)
+ inputPort.Port = cecPort;
+
InputPorts.Add(inputPort);
- }
-
- ///
- /// Adds OutputPort
- ///
+ }
+
+ ///
+ /// Adds OutputPort
+ ///
void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
{
AddOutputPortWithDebug(cardName, portName, sigType, portType, selector, null);
- }
-
- ///
- /// Adds OutputPort and sets Port as ICec object
- ///
- void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
- {
- var portKey = string.Format("{0}--{1}", cardName, portName);
+ }
+
+ ///
+ /// Adds OutputPort and sets Port as ICec object
+ ///
+ void AddOutputPortWithDebug(string cardName, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
+ {
+ var portKey = string.Format("{0}--{1}", cardName, portName);
Debug.Console(2, this, "Adding output port '{0}'", portKey);
var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this);
if (portName.IndexOf("Loop", StringComparison.InvariantCultureIgnoreCase) < 0)
{
outputPort.FeedbackMatchObject = selector;
- }
- if (cecPort != null)
- outputPort.Port = cecPort;
-
+ }
+ if (cecPort != null)
+ outputPort.Port = cecPort;
+
OutputPorts.Add(outputPort);
- }
-
- ///
- ///
- ///
- void AddVolumeControl(uint number, Audio.Output audio)
- {
- VolumeControls.Add(number, new DmCardAudioOutputController(audio));
- }
-
- //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting)
- //{
-
- //}
-
- void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args)
- {
- switch (args.EventId)
- {
- case DMSystemEventIds.SystemIdEventId:
- {
- Debug.Console(2, this, "SystemIdEvent Value: {0}", (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue);
- SystemIdFeebdack.FireUpdate();
- break;
- }
- case DMSystemEventIds.SystemIdBusyEventId:
- {
- Debug.Console(2, this, "SystemIdBusyEvent State: {0}", (Chassis as DmMDMnxn).SystemIdBusy.BoolValue);
- SystemIdBusyFeedback.FireUpdate();
- break;
- }
- case DMSystemEventIds.AudioBreakawayEventId:
- {
- Debug.Console(2, this, "AudioBreakaway Event: value: {0}",
- (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue);
- EnableAudioBreakawayFeedback.FireUpdate();
- break;
- }
- case DMSystemEventIds.USBBreakawayEventId:
- {
- Debug.Console(2, this, "USBBreakaway Event: value: {0}",
- (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue);
- EnableUsbBreakawayFeedback.FireUpdate();
- break;
- }
- }
- }
-
- void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
- {
- try
- {
- switch (args.EventId)
- {
- case DMInputEventIds.EndpointOnlineEventId:
- {
- Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
- InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.OnlineFeedbackEventId:
- {
- Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
- InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.VideoDetectedEventId:
- {
- Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
- VideoInputSyncFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.InputNameEventId:
- {
- Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
- InputNameFeedbacks[args.Number].FireUpdate();
- break;
- }
- case DMInputEventIds.UsbRoutedToEventId:
- {
- Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number);
- if (UsbInputRoutedToFeebacks[args.Number] != null)
- UsbInputRoutedToFeebacks[args.Number].FireUpdate();
- else
- Debug.Console(1, this, "No index of {0} found in UsbInputRoutedToFeedbacks");
- break;
- }
- case DMInputEventIds.HdcpCapabilityFeedbackEventId:
- {
- Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
- if (InputCardHdcpStateFeedbacks[args.Number] != null)
- InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
- else
- Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
- break;
- }
- case DMInputEventIds.HdcpSupportOffEventId:
- {
- Debug.Console(2, this, "DM Input {0} HdcpSupportOffEventId", args.Number);
- if (InputCardHdcpStateFeedbacks[args.Number] != null)
- InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
- else
- Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
- break;
- }
- case DMInputEventIds.HdcpSupportOnEventId:
- {
- Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number);
- if (InputCardHdcpStateFeedbacks[args.Number] != null)
- InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
- else
- Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
- break;
+ }
+
+ ///
+ ///
+ ///
+ void AddVolumeControl(uint number, Audio.Output audio)
+ {
+ VolumeControls.Add(number, new DmCardAudioOutputController(audio));
+ }
+
+ //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting)
+ //{
+
+ //}
+
+ void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args)
+ {
+ switch (args.EventId)
+ {
+ case DMSystemEventIds.SystemIdEventId:
+ {
+ Debug.Console(2, this, "SystemIdEvent Value: {0}", (Chassis as DmMDMnxn).SystemIdFeedback.UShortValue);
+ SystemIdFeebdack.FireUpdate();
+ break;
+ }
+ case DMSystemEventIds.SystemIdBusyEventId:
+ {
+ Debug.Console(2, this, "SystemIdBusyEvent State: {0}", (Chassis as DmMDMnxn).SystemIdBusy.BoolValue);
+ SystemIdBusyFeedback.FireUpdate();
+ break;
+ }
+ case DMSystemEventIds.AudioBreakawayEventId:
+ {
+ Debug.Console(2, this, "AudioBreakaway Event: value: {0}",
+ (Chassis as DmMDMnxn).EnableAudioBreakawayFeedback.BoolValue);
+ EnableAudioBreakawayFeedback.FireUpdate();
+ break;
+ }
+ case DMSystemEventIds.USBBreakawayEventId:
+ {
+ Debug.Console(2, this, "USBBreakaway Event: value: {0}",
+ (Chassis as DmMDMnxn).EnableUSBBreakawayFeedback.BoolValue);
+ EnableUsbBreakawayFeedback.FireUpdate();
+ break;
+ }
+ }
+ }
+
+ void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
+ {
+ try
+ {
+ switch (args.EventId)
+ {
+ case DMInputEventIds.EndpointOnlineEventId:
+ {
+ Debug.Console(2, this, "DM Input EndpointOnlineEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
+ InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.OnlineFeedbackEventId:
+ {
+ Debug.Console(2, this, "DM Input OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
+ InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.VideoDetectedEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
+ VideoInputSyncFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.InputNameEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
+ InputNameFeedbacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMInputEventIds.UsbRoutedToEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} UsbRoutedToEventId", args.Number);
+ if (UsbInputRoutedToFeebacks[args.Number] != null)
+ UsbInputRoutedToFeebacks[args.Number].FireUpdate();
+ else
+ Debug.Console(1, this, "No index of {0} found in UsbInputRoutedToFeedbacks");
+ break;
+ }
+ case DMInputEventIds.HdcpCapabilityFeedbackEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} HdcpCapabilityFeedbackEventId", args.Number);
+ if (InputCardHdcpStateFeedbacks[args.Number] != null)
+ InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
+ else
+ Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
+ break;
+ }
+ case DMInputEventIds.HdcpSupportOffEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} HdcpSupportOffEventId", args.Number);
+ if (InputCardHdcpStateFeedbacks[args.Number] != null)
+ InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
+ else
+ Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
+ break;
+ }
+ case DMInputEventIds.HdcpSupportOnEventId:
+ {
+ Debug.Console(2, this, "DM Input {0} HdcpSupportOnEventId", args.Number);
+ if (InputCardHdcpStateFeedbacks[args.Number] != null)
+ InputCardHdcpStateFeedbacks[args.Number].FireUpdate();
+ else
+ Debug.Console(1, this, "No index of {0} found in InputCardHdcpCapabilityFeedbacks");
+ break;
}
case DMInputEventIds.StartEventId:
case DMInputEventIds.StopEventId:
@@ -988,18 +988,18 @@ namespace PepperDash.Essentials.DM
else
Debug.Console(2, this, "No index of {0} found in InputStreamCardStateFeedbacks");
break;
- }
- default:
- {
- Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
- break;
- }
- }
- }
- catch (Exception ex)
- {
- Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Error in Chassis_DMInputChange: {0}", ex);
- }
+ }
+ default:
+ {
+ Debug.Console(2, this, "DMInputChange fired for Input {0} with Unhandled EventId: {1}", args.Number, args.EventId);
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.Console(2, this, Debug.ErrorLogLevel.Error, "Error in Chassis_DMInputChange: {0}", ex);
+ }
}
///
@@ -1011,42 +1011,42 @@ namespace PepperDash.Essentials.DM
{
var newEvent = NumericSwitchChange;
if (newEvent != null) newEvent(this, e);
- }
-
- ///
- ///
- void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
- {
- var output = args.Number;
-
- switch (args.EventId)
- {
- case DMOutputEventIds.VolumeEventId:
- {
- if (VolumeControls.ContainsKey(output))
- {
- VolumeControls[args.Number].VolumeEventFromChassis();
- }
-
- break;
- }
- case DMOutputEventIds.EndpointOnlineEventId:
- {
- Debug.Console(2, this, "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. State: {1}", args.Number,
- Chassis.Outputs[output].EndpointOnlineFeedback);
- OutputEndpointOnlineFeedbacks[output].FireUpdate();
- break;
- }
- case DMOutputEventIds.OnlineFeedbackEventId:
- {
- Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", args.Number,
- Chassis.Outputs[output].EndpointOnlineFeedback);
- OutputEndpointOnlineFeedbacks[output].FireUpdate();
- break;
- }
+ }
+
+ ///
+ ///
+ void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
+ {
+ var output = args.Number;
+
+ switch (args.EventId)
+ {
+ case DMOutputEventIds.VolumeEventId:
+ {
+ if (VolumeControls.ContainsKey(output))
+ {
+ VolumeControls[args.Number].VolumeEventFromChassis();
+ }
+
+ break;
+ }
+ case DMOutputEventIds.EndpointOnlineEventId:
+ {
+ Debug.Console(2, this, "Output {0} DMOutputEventIds.EndpointOnlineEventId fired. State: {1}", args.Number,
+ Chassis.Outputs[output].EndpointOnlineFeedback);
+ OutputEndpointOnlineFeedbacks[output].FireUpdate();
+ break;
+ }
+ case DMOutputEventIds.OnlineFeedbackEventId:
+ {
+ Debug.Console(2, this, "Output {0} DMInputEventIds.OnlineFeedbackEventId fired. State: {1}", args.Number,
+ Chassis.Outputs[output].EndpointOnlineFeedback);
+ OutputEndpointOnlineFeedbacks[output].FireUpdate();
+ break;
+ }
case DMOutputEventIds.VideoOutEventId:
- {
-
+ {
+
var inputNumber = Chassis.Outputs[output].VideoOutFeedback == null ? 0 : Chassis.
Outputs[output].VideoOutFeedback.Number;
@@ -1067,11 +1067,11 @@ namespace PepperDash.Essentials.DM
eRoutingSignalType.Video));
}
- if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
- OutputVideoRouteNameFeedbacks[output].FireUpdate();
-
- break;
- }
+ if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
+ OutputVideoRouteNameFeedbacks[output].FireUpdate();
+
+ break;
+ }
case DMOutputEventIds.AudioOutEventId:
{
var inputNumber = Chassis.Outputs[output].AudioOutFeedback == null ? 0 : Chassis.
@@ -1097,25 +1097,25 @@ namespace PepperDash.Essentials.DM
if (OutputAudioRouteNameFeedbacks.ContainsKey(output))
OutputAudioRouteNameFeedbacks[output].FireUpdate();
- break;
- }
- case DMOutputEventIds.OutputNameEventId:
- {
- Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
- OutputNameFeedbacks[output].FireUpdate();
- break;
- }
- case DMOutputEventIds.UsbRoutedToEventId:
- {
- Debug.Console(2, this, "DM Output {0} UsbRoutedToEventId", args.Number);
- UsbOutputRoutedToFeebacks[args.Number].FireUpdate();
- break;
- }
- case DMOutputEventIds.DisabledByHdcpEventId:
- {
- Debug.Console(2, this, "DM Output {0} DisabledByHdcpEventId", args.Number);
- OutputDisabledByHdcpFeedbacks[args.Number].FireUpdate();
- break;
+ break;
+ }
+ case DMOutputEventIds.OutputNameEventId:
+ {
+ Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
+ OutputNameFeedbacks[output].FireUpdate();
+ break;
+ }
+ case DMOutputEventIds.UsbRoutedToEventId:
+ {
+ Debug.Console(2, this, "DM Output {0} UsbRoutedToEventId", args.Number);
+ UsbOutputRoutedToFeebacks[args.Number].FireUpdate();
+ break;
+ }
+ case DMOutputEventIds.DisabledByHdcpEventId:
+ {
+ Debug.Console(2, this, "DM Output {0} DisabledByHdcpEventId", args.Number);
+ OutputDisabledByHdcpFeedbacks[args.Number].FireUpdate();
+ break;
}
case DMOutputEventIds.StartEventId:
case DMOutputEventIds.StopEventId:
@@ -1129,50 +1129,50 @@ namespace PepperDash.Essentials.DM
else
Debug.Console(2, this, "No index of {0} found in OutputStreamCardStateFeedbacks");
break;
- }
- default:
- {
- Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId);
- break;
- }
- }
- }
-
- ///
- ///
- ///
- ///
- void StartOffTimer(PortNumberType pnt)
- {
- if (RouteOffTimers.ContainsKey(pnt))
- return;
- RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime);
- }
-
- // Send out sigs when coming online
- void IsOnline_OutputChange(object sender, EventArgs e)
- {
- if (IsOnline.BoolValue)
- {
- (Chassis as DmMDMnxn).EnableAudioBreakaway.BoolValue = true;
- (Chassis as DmMDMnxn).EnableUSBBreakaway.BoolValue = true;
-
-
- EnableAudioBreakawayFeedback.FireUpdate();
- EnableUsbBreakawayFeedback.FireUpdate();
-
- if (InputNames != null)
- foreach (var kvp in InputNames)
- Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value;
- if (OutputNames != null)
- foreach (var kvp in OutputNames)
- Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value;
- }
- }
-
- #region IRouting Members
- public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType)
- {
+ }
+ default:
+ {
+ Debug.Console(2, this, "DMOutputChange fired for Output {0} with Unhandled EventId: {1}", args.Number, args.EventId);
+ break;
+ }
+ }
+ }
+
+ ///
+ ///
+ ///
+ ///
+ void StartOffTimer(PortNumberType pnt)
+ {
+ if (RouteOffTimers.ContainsKey(pnt))
+ return;
+ RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(null, pnt.Selector, pnt.Type), RouteOffTime);
+ }
+
+ // Send out sigs when coming online
+ void IsOnline_OutputChange(object sender, EventArgs e)
+ {
+ if (IsOnline.BoolValue)
+ {
+ (Chassis as DmMDMnxn).EnableAudioBreakaway.BoolValue = true;
+ (Chassis as DmMDMnxn).EnableUSBBreakaway.BoolValue = true;
+
+
+ EnableAudioBreakawayFeedback.FireUpdate();
+ EnableUsbBreakawayFeedback.FireUpdate();
+
+ if (InputNames != null)
+ foreach (var kvp in InputNames)
+ Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value;
+ if (OutputNames != null)
+ foreach (var kvp in OutputNames)
+ Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value;
+ }
+ }
+
+ #region IRouting Members
+ public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType)
+ {
Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType);
var input = inputSelector as DMInput;//Input Selector could be null...
@@ -1185,34 +1185,34 @@ namespace PepperDash.Essentials.DM
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
outputSelector);
return;
- }
-
- // Check to see if there's an off timer waiting on this and if so, cancel
- var key = new PortNumberType(output, sigType);
- if (input == null)
- {
- StartOffTimer(key);
- }
- else
- {
- if (RouteOffTimers.ContainsKey(key))
- {
- Debug.Console(2, this, "{0} cancelling route off due to new source", output);
- RouteOffTimers[key].Stop();
- RouteOffTimers.Remove(key);
- }
- }
-
- //var inCard = input == 0 ? null : Chassis.Inputs[input];
- //var outCard = input == 0 ? null : Chassis.Outputs[output];
-
- // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
- if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
- {
+ }
+
+ // Check to see if there's an off timer waiting on this and if so, cancel
+ var key = new PortNumberType(output, sigType);
+ if (input == null)
+ {
+ StartOffTimer(key);
+ }
+ else
+ {
+ if (RouteOffTimers.ContainsKey(key))
+ {
+ Debug.Console(2, this, "{0} cancelling route off due to new source", output);
+ RouteOffTimers[key].Stop();
+ RouteOffTimers.Remove(key);
+ }
+ }
+
+ //var inCard = input == 0 ? null : Chassis.Inputs[input];
+ //var outCard = input == 0 ? null : Chassis.Outputs[output];
+
+ // NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
+ if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
+ {
Chassis.VideoEnter.BoolValue = true;
output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard;
- }
-
+ }
+
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
{
var dmMdMnxn = Chassis as DmMDMnxn;
@@ -1220,7 +1220,7 @@ namespace PepperDash.Essentials.DM
{
dmMdMnxn.AudioEnter.BoolValue = true;
}
- output.VideoOut = input;
+ output.AudioOut = input;
//Chassis.Outputs[output].AudioOut = inCard;
}
@@ -1228,13 +1228,13 @@ namespace PepperDash.Essentials.DM
{
Chassis.USBEnter.BoolValue = true;
output.USBRoutedTo = input;
- }
-
- }
- #endregion
-
- #region IRoutingNumeric Members
-
+ }
+
+ }
+ #endregion
+
+ #region IRoutingNumeric Members
+
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
{
var chassisSize = (uint)Chassis.NumberOfInputs; //need this to determine USB routing values 8x8 -> 1-8 is inputs 1-8, 17-24 is outputs 1-8
@@ -1303,37 +1303,37 @@ namespace PepperDash.Essentials.DM
}
var inputCard = inputSelector == 0 ? null : Chassis.Inputs[inputSelector];
- var outputCard = Chassis.Outputs[outputSelector];
-
- ExecuteSwitch(inputCard, outputCard, sigType);
- }
-
- #endregion
-
- public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = GetJoinMap(joinStart, joinMapKey, bridge);
-
- Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
-
- LinkChassisToApi(trilist, joinMap);
-
- // Link up inputs & outputs
- for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
- {
- var ioSlot = i;
- var ioSlotJoin = ioSlot - 1;
-
- LinkRoutingJoinsToApi(trilist, joinMap, ioSlotJoin, ioSlot);
-
- if (TxDictionary.ContainsKey(ioSlot))
- {
- LinkTxToApi(trilist, ioSlot, joinMap, ioSlotJoin);
- }
- else
- {
+ var outputCard = Chassis.Outputs[outputSelector];
+
+ ExecuteSwitch(inputCard, outputCard, sigType);
+ }
+
+ #endregion
+
+ public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
+ {
+ var joinMap = GetJoinMap(joinStart, joinMapKey, bridge);
+
+ Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
+
+ LinkChassisToApi(trilist, joinMap);
+
+ // Link up inputs & outputs
+ for (uint i = 1; i <= Chassis.NumberOfOutputs; i++)
+ {
+ var ioSlot = i;
+ var ioSlotJoin = ioSlot - 1;
+
+ LinkRoutingJoinsToApi(trilist, joinMap, ioSlotJoin, ioSlot);
+
+ if (TxDictionary.ContainsKey(ioSlot))
+ {
+ LinkTxToApi(trilist, ioSlot, joinMap, ioSlotJoin);
+ }
+ else
+ {
LinkHdmiInputToApi(trilist, ioSlot, joinMap, ioSlotJoin);
- LinkStreamInputToApi(trilist, ioSlot, joinMap, ioSlotJoin);
+ LinkStreamInputToApi(trilist, ioSlot, joinMap, ioSlotJoin);
}
if (RxDictionary.ContainsKey(ioSlot))
@@ -1341,53 +1341,53 @@ namespace PepperDash.Essentials.DM
LinkRxToApi(trilist, ioSlot, joinMap, ioSlotJoin);
}
else
- LinkStreamOutputToApi(trilist, ioSlot, joinMap, ioSlotJoin);
- }
- }
-
- private void LinkHdmiInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
- {
- VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
-
- var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
- if (inputPort == null)
- {
- return;
- }
-
- Debug.Console(1, "Port value for input card {0} is set", ioSlot);
- var port = inputPort.Port;
-
- if (port == null)
- {
- return;
- }
- if (!(port is HdmiInputWithCEC))
- {
- Debug.Console(0, this, "HDMI Input port on card {0} does not support HDCP settings.", ioSlot);
- return;
- }
-
- Debug.Console(1, "Port is HdmiInputWithCec");
-
- var hdmiInPortWCec = port as HdmiInputWithCEC;
-
-
- SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
-
-
- InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig(
- trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
-
- if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
- {
- trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
- (ushort)InputCardHdcpCapabilityTypes[ioSlot];
- }
- else
- {
- trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
- }
+ LinkStreamOutputToApi(trilist, ioSlot, joinMap, ioSlotJoin);
+ }
+ }
+
+ private void LinkHdmiInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
+ {
+ VideoInputSyncFeedbacks[ioSlot].LinkInputSig(trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
+
+ var inputPort = InputPorts[string.Format("inputCard{0}--hdmiIn", ioSlot)];
+ if (inputPort == null)
+ {
+ return;
+ }
+
+ Debug.Console(1, "Port value for input card {0} is set", ioSlot);
+ var port = inputPort.Port;
+
+ if (port == null)
+ {
+ return;
+ }
+ if (!(port is HdmiInputWithCEC))
+ {
+ Debug.Console(0, this, "HDMI Input port on card {0} does not support HDCP settings.", ioSlot);
+ return;
+ }
+
+ Debug.Console(1, "Port is HdmiInputWithCec");
+
+ var hdmiInPortWCec = port as HdmiInputWithCEC;
+
+
+ SetHdcpStateAction(PropertiesConfig.InputSlotSupportsHdcp2[ioSlot], hdmiInPortWCec, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
+
+
+ InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig(
+ trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
+
+ if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
+ {
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
+ (ushort)InputCardHdcpCapabilityTypes[ioSlot];
+ }
+ else
+ {
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
+ }
}
private void LinkStreamInputToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
@@ -1468,448 +1468,448 @@ namespace PepperDash.Essentials.DM
OutputStreamCardStateFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[join]);
trilist.UShortInput[join].UShortValue = OutputStreamCardStateFeedbacks[ioSlot].UShortValue;
- }
-
- private void LinkRxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
- {
- Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
- var rxKey = RxDictionary[ioSlot];
- var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
- var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
- if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
- || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
- || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null)
- {
- OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(
- trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
- }
- else if (rxDevice != null)
- {
- rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
- }
- }
-
- private void LinkTxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
- {
- Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
- VideoInputSyncFeedbacks[ioSlot].LinkInputSig(
- trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
-
- Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
- var txKey = TxDictionary[ioSlot];
- var txDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
-
- if (txDevice == null)
- {
- return;
- }
-
- LinkTxOnlineFeedbackToApi(trilist, ioSlot, joinMap, ioSlotJoin, txDevice);
-
- LinkBasicTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice);
-
- LinkAdvancedTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice);
- }
-
- private void LinkBasicTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlot,
- uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
- {
- var advTx = basicTransmitter as DmTxControllerBase;
-
- if (advTx != null)
- {
- return;
- }
- var inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)];
-
- if (inputPort == null)
- {
- return;
- }
- var port = inputPort.Port;
-
- if (!(port is DMInputPortWithCec))
- {
- Debug.Console(0, this, "DM Input port on card {0} does not support HDCP settings.", ioSlot);
- return;
- }
- Debug.Console(1, "Port is DMInputPortWithCec");
-
- var dmInPortWCec = port as DMInputPortWithCec;
-
- bool supportsHdcp2;
-
- //added in case the InputSlotSupportsHdcp2 section isn't included in the config, or this slot is left out.
- //if the key isn't in the dictionary, supportsHdcp2 will be false
-
- if(!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2))
- {
- Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
- "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.",
- ioSlot);
- }
-
- SetHdcpStateAction(supportsHdcp2, dmInPortWCec,
- joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
-
- InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig(
- trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
-
- if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
- {
- trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
- (ushort) InputCardHdcpCapabilityTypes[ioSlot];
- }
- else
- {
- trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
- }
- }
-
- private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap,
- uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
- {
- var transmitter = basicTransmitter as DmTxControllerBase;
- if (transmitter == null) return;
-
- trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true;
-
- transmitter.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(
- trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
-
- var txRoutingInputs = transmitter as IRoutingInputs;
-
- if (txRoutingInputs == null) return;
-
- var inputPorts = txRoutingInputs.InputPorts.Where((p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
-
- if (inputPorts.Count == 0)
- {
- Debug.Console(1, this, "No HDCP-capable input ports found on transmitter for slot {0}", ioSlot);
- return;
- }
-
- bool supportsHdcp2;
-
- if (!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2))
- {
- Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
- "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.",
- ioSlot);
- }
-
- SetHdcpStateAction(supportsHdcp2, inputPorts, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
-
- if (transmitter.HdcpStateFeedback != null)
- {
- transmitter.HdcpStateFeedback.LinkInputSig(
- trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
- }
- else
- {
- Debug.Console(2, this, "Transmitter Hdcp Feedback null. Linking to card's feedback");
- InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig(
- trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
- }
-
- trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
- (ushort) transmitter.HdcpSupportCapability;
- }
-
- private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap,
- uint ioSlotJoin, BasicDmTxControllerBase txDevice)
- {
- var advancedTxDevice = txDevice as DmTxControllerBase;
-
- if ((Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
- || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
- || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps) ||
- advancedTxDevice == null)
- {
- Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
- InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(
- trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
- return;
- }
-
- Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
-
- advancedTxDevice.IsOnline.LinkInputSig(
- trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
- }
-
- private void LinkRoutingJoinsToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlotJoin,
- uint ioSlot)
- {
- // Routing Control
- trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin,
- o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Video));
+ }
+
+ private void LinkRxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
+ {
+ Debug.Console(2, "Creating Rx Feedbacks {0}", ioSlot);
+ var rxKey = RxDictionary[ioSlot];
+ var rxDevice = DeviceManager.GetDeviceForKey(rxKey) as DmRmcControllerBase;
+ var hdBaseTDevice = DeviceManager.GetDeviceForKey(rxKey) as DmHdBaseTControllerBase;
+ if (Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
+ || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
+ || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps || hdBaseTDevice != null)
+ {
+ OutputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(
+ trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
+ }
+ else if (rxDevice != null)
+ {
+ rxDevice.IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.OutputEndpointOnline.JoinNumber + ioSlotJoin]);
+ }
+ }
+
+ private void LinkTxToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap, uint ioSlotJoin)
+ {
+ Debug.Console(1, "Setting up actions and feedbacks on input card {0}", ioSlot);
+ VideoInputSyncFeedbacks[ioSlot].LinkInputSig(
+ trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
+
+ Debug.Console(2, "Creating Tx Feedbacks {0}", ioSlot);
+ var txKey = TxDictionary[ioSlot];
+ var txDevice = DeviceManager.GetDeviceForKey(txKey) as BasicDmTxControllerBase;
+
+ if (txDevice == null)
+ {
+ return;
+ }
+
+ LinkTxOnlineFeedbackToApi(trilist, ioSlot, joinMap, ioSlotJoin, txDevice);
+
+ LinkBasicTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice);
+
+ LinkAdvancedTxToApi(trilist, joinMap, ioSlot, ioSlotJoin, txDevice);
+ }
+
+ private void LinkBasicTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlot,
+ uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
+ {
+ var advTx = basicTransmitter as DmTxControllerBase;
+
+ if (advTx != null)
+ {
+ return;
+ }
+ var inputPort = InputPorts[string.Format("inputCard{0}--dmIn", ioSlot)];
+
+ if (inputPort == null)
+ {
+ return;
+ }
+ var port = inputPort.Port;
+
+ if (!(port is DMInputPortWithCec))
+ {
+ Debug.Console(0, this, "DM Input port on card {0} does not support HDCP settings.", ioSlot);
+ return;
+ }
+ Debug.Console(1, "Port is DMInputPortWithCec");
+
+ var dmInPortWCec = port as DMInputPortWithCec;
+
+ bool supportsHdcp2;
+
+ //added in case the InputSlotSupportsHdcp2 section isn't included in the config, or this slot is left out.
+ //if the key isn't in the dictionary, supportsHdcp2 will be false
+
+ if(!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2))
+ {
+ Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
+ "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.",
+ ioSlot);
+ }
+
+ SetHdcpStateAction(supportsHdcp2, dmInPortWCec,
+ joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
+
+ InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig(
+ trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
+
+ if (InputCardHdcpCapabilityTypes.ContainsKey(ioSlot))
+ {
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
+ (ushort) InputCardHdcpCapabilityTypes[ioSlot];
+ }
+ else
+ {
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue = 1;
+ }
+ }
+
+ private void LinkAdvancedTxToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap,
+ uint ioSlot, uint ioSlotJoin, BasicDmTxControllerBase basicTransmitter)
+ {
+ var transmitter = basicTransmitter as DmTxControllerBase;
+ if (transmitter == null) return;
+
+ trilist.BooleanInput[joinMap.TxAdvancedIsPresent.JoinNumber + ioSlotJoin].BoolValue = true;
+
+ transmitter.AnyVideoInput.VideoStatus.VideoSyncFeedback.LinkInputSig(
+ trilist.BooleanInput[joinMap.VideoSyncStatus.JoinNumber + ioSlotJoin]);
+
+ var txRoutingInputs = transmitter as IRoutingInputs;
+
+ if (txRoutingInputs == null) return;
+
+ var inputPorts = txRoutingInputs.InputPorts.Where((p) => p.Port is EndpointHdmiInput || p.Port is EndpointDisplayPortInput).ToList();
+
+ if (inputPorts.Count == 0)
+ {
+ Debug.Console(1, this, "No HDCP-capable input ports found on transmitter for slot {0}", ioSlot);
+ return;
+ }
+
+ bool supportsHdcp2;
+
+ if (!PropertiesConfig.InputSlotSupportsHdcp2.TryGetValue(ioSlot, out supportsHdcp2))
+ {
+ Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
+ "Input Slot Supports HDCP2 setting not found for slot {0}. Setting to false. Program may not function as intended.",
+ ioSlot);
+ }
+
+ SetHdcpStateAction(supportsHdcp2, inputPorts, joinMap.HdcpSupportState.JoinNumber + ioSlotJoin, trilist);
+
+ if (transmitter.HdcpStateFeedback != null)
+ {
+ transmitter.HdcpStateFeedback.LinkInputSig(
+ trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
+ }
+ else
+ {
+ Debug.Console(2, this, "Transmitter Hdcp Feedback null. Linking to card's feedback");
+ InputCardHdcpStateFeedbacks[ioSlot].LinkInputSig(
+ trilist.UShortInput[joinMap.HdcpSupportState.JoinNumber + ioSlotJoin]);
+ }
+
+ trilist.UShortInput[joinMap.HdcpSupportCapability.JoinNumber + ioSlotJoin].UShortValue =
+ (ushort) transmitter.HdcpSupportCapability;
+ }
+
+ private void LinkTxOnlineFeedbackToApi(BasicTriList trilist, uint ioSlot, DmChassisControllerJoinMap joinMap,
+ uint ioSlotJoin, BasicDmTxControllerBase txDevice)
+ {
+ var advancedTxDevice = txDevice as DmTxControllerBase;
+
+ if ((Chassis is DmMd8x8Cpu3 || Chassis is DmMd8x8Cpu3rps
+ || Chassis is DmMd16x16Cpu3 || Chassis is DmMd16x16Cpu3rps
+ || Chassis is DmMd32x32Cpu3 || Chassis is DmMd32x32Cpu3rps) ||
+ advancedTxDevice == null)
+ {
+ Debug.Console(2, "Linking Tx Online Feedback from Input Card {0}", ioSlot);
+ InputEndpointOnlineFeedbacks[ioSlot].LinkInputSig(
+ trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
+ return;
+ }
+
+ Debug.Console(2, "Linking Tx Online Feedback from Advanced Transmitter at input {0}", ioSlot);
+
+ advancedTxDevice.IsOnline.LinkInputSig(
+ trilist.BooleanInput[joinMap.InputEndpointOnline.JoinNumber + ioSlotJoin]);
+ }
+
+ private void LinkRoutingJoinsToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap, uint ioSlotJoin,
+ uint ioSlot)
+ {
+ // Routing Control
+ trilist.SetUShortSigAction(joinMap.OutputVideo.JoinNumber + ioSlotJoin,
+ o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Video));
trilist.SetUShortSigAction(joinMap.OutputAudio.JoinNumber + ioSlotJoin,
- o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Audio));
+ o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.Audio));
trilist.SetUShortSigAction(joinMap.OutputUsb.JoinNumber + ioSlotJoin,
- o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbOutput));
+ o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbOutput));
trilist.SetUShortSigAction(joinMap.InputUsb.JoinNumber + ioSlotJoin,
- o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbInput));
-
- //Routing Feedbacks
- VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]);
- AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio.JoinNumber + ioSlotJoin]);
- UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb.JoinNumber + ioSlotJoin]);
- UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb.JoinNumber + ioSlotJoin]);
-
- OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
- InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
- OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(
- trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]);
- OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(
- trilist.StringInput[joinMap.OutputCurrentAudioInputNames.JoinNumber + ioSlotJoin]);
-
- OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig(
- trilist.BooleanInput[joinMap.OutputDisabledByHdcp.JoinNumber + ioSlotJoin]);
- }
-
- private void LinkChassisToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap)
- {
- var chassis = Chassis as DmMDMnxn;
-
- IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
-
- trilist.SetUShortSigAction(joinMap.SystemId.JoinNumber, o =>
- {
- if (chassis != null)
- {
- chassis.SystemId.UShortValue = o;
- }
- });
-
- trilist.SetSigTrueAction(joinMap.SystemId.JoinNumber, () =>
- {
- if (chassis != null)
- {
- chassis.ApplySystemId();
- }
- });
-
- SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]);
- SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]);
-
- EnableAudioBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAudioBreakaway.JoinNumber]);
- EnableUsbBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsbBreakaway.JoinNumber]);
-
- trilist.OnlineStatusChange += (o, a) =>
- {
- if (!a.DeviceOnLine)
- {
- return;
- }
-
- EnableAudioBreakawayFeedback.FireUpdate();
- EnableUsbBreakawayFeedback.FireUpdate();
- SystemIdBusyFeedback.FireUpdate();
- SystemIdFeebdack.FireUpdate();
- };
- }
-
- private DmChassisControllerJoinMap GetJoinMap(uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- var joinMap = new DmChassisControllerJoinMap(joinStart);
-
- var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
-
- if (!string.IsNullOrEmpty(joinMapSerialized))
- {
- joinMap = JsonConvert.DeserializeObject(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.");
- }
- return joinMap;
- }
-
- private void SetHdcpStateAction(bool supportsHdcp2, HdmiInputWithCEC port, uint join, BasicTriList trilist)
- {
- if (!supportsHdcp2)
- {
- trilist.SetUShortSigAction(join,
- s =>
- {
- if (s == 0)
- {
- Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s);
- port.HdcpSupportOff();
- }
- else if (s > 0)
- {
- Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s);
- port.HdcpSupportOn();
- }
- });
- }
- else
- {
- trilist.SetUShortSigAction(join,
- u =>
- {
- Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u);
- port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
- });
- }
- }
-
- private void SetHdcpStateAction(bool supportsHdcp2, EndpointHdmiInput port, uint join, BasicTriList trilist)
- {
- if (!supportsHdcp2)
- {
- trilist.SetUShortSigAction(join,
- s =>
- {
- if (s == 0)
- {
- Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s);
- port.HdcpSupportOff();
- }
- else if (s > 0)
- {
- Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s);
- port.HdcpSupportOn();
- }
- });
- }
- else
- {
- trilist.SetUShortSigAction(join,
- u =>
- {
- Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u);
- port.HdcpCapability = (eHdcpCapabilityType)u;
- });
- }
- }
-
- private void SetHdcpStateAction(bool supportsHdcp2, List ports, uint join,
- BasicTriList triList)
- {
- if (!supportsHdcp2)
- {
- triList.SetUShortSigAction(join, a =>
- {
- foreach (var tempPort in ports.Select(port => port.Port).OfType())
- {
- if (a == 0)
- {
- tempPort.HdcpSupportOff();
- }
- else if (a > 0)
- {
- tempPort.HdcpSupportOn();
- }
- }
- });
- }
- else
- {
- triList.SetUShortSigAction(join, a =>
- {
- foreach (var tempPort in ports.Select(port => port.Port).OfType())
- {
- tempPort.HdcpCapability = (eHdcpCapabilityType) a;
- }
- });
- }
- }
-
- private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist)
- {
- if (!supportsHdcp2)
- {
- trilist.SetUShortSigAction(join,
- s =>
- {
- if (s == 0)
- {
- port.HdcpSupportOff();
- }
- else if (s > 0)
- {
- port.HdcpSupportOn();
- }
- });
- }
- else
- {
- trilist.SetUShortSigAction(join,
- u =>
- {
- port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
- });
- }
- }
- }
-
- public struct PortNumberType
- {
- public uint Number { get; private set; }
- public object Selector { get; private set; }
- public eRoutingSignalType Type { get; private set; }
-
- public PortNumberType(object selector, eRoutingSignalType type)
- : this()
- {
- Selector = selector;
+ o => ExecuteNumericSwitch(o, (ushort) ioSlot, eRoutingSignalType.UsbInput));
+
+ //Routing Feedbacks
+ VideoOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputVideo.JoinNumber + ioSlotJoin]);
+ AudioOutputFeedbacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputAudio.JoinNumber + ioSlotJoin]);
+ UsbOutputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.OutputUsb.JoinNumber + ioSlotJoin]);
+ UsbInputRoutedToFeebacks[ioSlot].LinkInputSig(trilist.UShortInput[joinMap.InputUsb.JoinNumber + ioSlotJoin]);
+
+ OutputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.OutputNames.JoinNumber + ioSlotJoin]);
+ InputNameFeedbacks[ioSlot].LinkInputSig(trilist.StringInput[joinMap.InputNames.JoinNumber + ioSlotJoin]);
+ OutputVideoRouteNameFeedbacks[ioSlot].LinkInputSig(
+ trilist.StringInput[joinMap.OutputCurrentVideoInputNames.JoinNumber + ioSlotJoin]);
+ OutputAudioRouteNameFeedbacks[ioSlot].LinkInputSig(
+ trilist.StringInput[joinMap.OutputCurrentAudioInputNames.JoinNumber + ioSlotJoin]);
+
+ OutputDisabledByHdcpFeedbacks[ioSlot].LinkInputSig(
+ trilist.BooleanInput[joinMap.OutputDisabledByHdcp.JoinNumber + ioSlotJoin]);
+ }
+
+ private void LinkChassisToApi(BasicTriList trilist, DmChassisControllerJoinMap joinMap)
+ {
+ var chassis = Chassis as DmMDMnxn;
+
+ IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
+
+ trilist.SetUShortSigAction(joinMap.SystemId.JoinNumber, o =>
+ {
+ if (chassis != null)
+ {
+ chassis.SystemId.UShortValue = o;
+ }
+ });
+
+ trilist.SetSigTrueAction(joinMap.SystemId.JoinNumber, () =>
+ {
+ if (chassis != null)
+ {
+ chassis.ApplySystemId();
+ }
+ });
+
+ SystemIdFeebdack.LinkInputSig(trilist.UShortInput[joinMap.SystemId.JoinNumber]);
+ SystemIdBusyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SystemId.JoinNumber]);
+
+ EnableAudioBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableAudioBreakaway.JoinNumber]);
+ EnableUsbBreakawayFeedback.LinkInputSig(trilist.BooleanInput[joinMap.EnableUsbBreakaway.JoinNumber]);
+
+ trilist.OnlineStatusChange += (o, a) =>
+ {
+ if (!a.DeviceOnLine)
+ {
+ return;
+ }
+
+ EnableAudioBreakawayFeedback.FireUpdate();
+ EnableUsbBreakawayFeedback.FireUpdate();
+ SystemIdBusyFeedback.FireUpdate();
+ SystemIdFeebdack.FireUpdate();
+ };
+ }
+
+ private DmChassisControllerJoinMap GetJoinMap(uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
+ {
+ var joinMap = new DmChassisControllerJoinMap(joinStart);
+
+ var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
+
+ if (!string.IsNullOrEmpty(joinMapSerialized))
+ {
+ joinMap = JsonConvert.DeserializeObject(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.");
+ }
+ return joinMap;
+ }
+
+ private void SetHdcpStateAction(bool supportsHdcp2, HdmiInputWithCEC port, uint join, BasicTriList trilist)
+ {
+ if (!supportsHdcp2)
+ {
+ trilist.SetUShortSigAction(join,
+ s =>
+ {
+ if (s == 0)
+ {
+ Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s);
+ port.HdcpSupportOff();
+ }
+ else if (s > 0)
+ {
+ Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s);
+ port.HdcpSupportOn();
+ }
+ });
+ }
+ else
+ {
+ trilist.SetUShortSigAction(join,
+ u =>
+ {
+ Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u);
+ port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
+ });
+ }
+ }
+
+ private void SetHdcpStateAction(bool supportsHdcp2, EndpointHdmiInput port, uint join, BasicTriList trilist)
+ {
+ if (!supportsHdcp2)
+ {
+ trilist.SetUShortSigAction(join,
+ s =>
+ {
+ if (s == 0)
+ {
+ Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to off", join, s);
+ port.HdcpSupportOff();
+ }
+ else if (s > 0)
+ {
+ Debug.Console(2, this, "Join {0} value {1} Setting HdcpSupport to on", join, s);
+ port.HdcpSupportOn();
+ }
+ });
+ }
+ else
+ {
+ trilist.SetUShortSigAction(join,
+ u =>
+ {
+ Debug.Console(2, this, "Join {0} value {1} Setting HdcpReceiveCapability to: {2}", join, u, (eHdcpCapabilityType)u);
+ port.HdcpCapability = (eHdcpCapabilityType)u;
+ });
+ }
+ }
+
+ private void SetHdcpStateAction(bool supportsHdcp2, List ports, uint join,
+ BasicTriList triList)
+ {
+ if (!supportsHdcp2)
+ {
+ triList.SetUShortSigAction(join, a =>
+ {
+ foreach (var tempPort in ports.Select(port => port.Port).OfType())
+ {
+ if (a == 0)
+ {
+ tempPort.HdcpSupportOff();
+ }
+ else if (a > 0)
+ {
+ tempPort.HdcpSupportOn();
+ }
+ }
+ });
+ }
+ else
+ {
+ triList.SetUShortSigAction(join, a =>
+ {
+ foreach (var tempPort in ports.Select(port => port.Port).OfType())
+ {
+ tempPort.HdcpCapability = (eHdcpCapabilityType) a;
+ }
+ });
+ }
+ }
+
+ private void SetHdcpStateAction(bool supportsHdcp2, DMInputPortWithCec port, uint join, BasicTriList trilist)
+ {
+ if (!supportsHdcp2)
+ {
+ trilist.SetUShortSigAction(join,
+ s =>
+ {
+ if (s == 0)
+ {
+ port.HdcpSupportOff();
+ }
+ else if (s > 0)
+ {
+ port.HdcpSupportOn();
+ }
+ });
+ }
+ else
+ {
+ trilist.SetUShortSigAction(join,
+ u =>
+ {
+ port.HdcpReceiveCapability = (eHdcpCapabilityType)u;
+ });
+ }
+ }
+ }
+
+ public struct PortNumberType
+ {
+ public uint Number { get; private set; }
+ public object Selector { get; private set; }
+ public eRoutingSignalType Type { get; private set; }
+
+ public PortNumberType(object selector, eRoutingSignalType type)
+ : this()
+ {
+ Selector = selector;
Type = type;
if (Selector is DMOutput)
{
Number = (selector as DMOutput).Number;
- }
+ }
else if (Selector is uint)
{
Number = (uint) selector;
- }
- }
- }
-
- public class DmChassisControllerFactory : EssentialsDeviceFactory
- {
- public DmChassisControllerFactory()
- {
- TypeNames = new List() { "dmmd8x8", "dmmd8x8rps", "dmmd8x8cpu3", "dmmd8x8cpu3rps",
- "dmmd16x16", "dmmd16x16rps", "dmmd16x16cpu3", "dmmd16x16cpu3rps",
- "dmmd32x32", "dmmd32x32rps", "dmmd32x32cpu3", "dmmd32x32cpu3rps",
- "dmmd64x64", "dmmd128x128" };
- }
-
- public override EssentialsDevice BuildDevice(DeviceConfig dc)
- {
- var type = dc.Type.ToLower();
-
- Debug.Console(1, "Factory Attempting to create new DmChassisController Device");
-
- if (type.StartsWith("dmmd8x") || type.StartsWith("dmmd16x") || type.StartsWith("dmmd32x"))
- {
-
- var props = JsonConvert.DeserializeObject
- (dc.Properties.ToString());
- return PepperDash.Essentials.DM.DmChassisController.
- GetDmChassisController(dc.Key, dc.Name, type, props);
- }
- else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
- {
- var props = JsonConvert.DeserializeObject
- (dc.Properties.ToString());
- return PepperDash.Essentials.DM.DmBladeChassisController.
- GetDmChassisController(dc.Key, dc.Name, type, props);
- }
-
- return null;
- }
- }
-
+ }
+ }
+ }
+
+ public class DmChassisControllerFactory : EssentialsDeviceFactory
+ {
+ public DmChassisControllerFactory()
+ {
+ TypeNames = new List() { "dmmd8x8", "dmmd8x8rps", "dmmd8x8cpu3", "dmmd8x8cpu3rps",
+ "dmmd16x16", "dmmd16x16rps", "dmmd16x16cpu3", "dmmd16x16cpu3rps",
+ "dmmd32x32", "dmmd32x32rps", "dmmd32x32cpu3", "dmmd32x32cpu3rps",
+ "dmmd64x64", "dmmd128x128" };
+ }
+
+ public override EssentialsDevice BuildDevice(DeviceConfig dc)
+ {
+ var type = dc.Type.ToLower();
+
+ Debug.Console(1, "Factory Attempting to create new DmChassisController Device");
+
+ if (type.StartsWith("dmmd8x") || type.StartsWith("dmmd16x") || type.StartsWith("dmmd32x"))
+ {
+
+ var props = JsonConvert.DeserializeObject
+ (dc.Properties.ToString());
+ return PepperDash.Essentials.DM.DmChassisController.
+ GetDmChassisController(dc.Key, dc.Name, type, props);
+ }
+ else if (type.StartsWith("dmmd128x") || type.StartsWith("dmmd64x"))
+ {
+ var props = JsonConvert.DeserializeObject
+ (dc.Properties.ToString());
+ return PepperDash.Essentials.DM.DmBladeChassisController.
+ GetDmChassisController(dc.Key, dc.Name, type, props);
+ }
+
+ return null;
+ }
+ }
+
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraBase.cs
index 8b42cd82..def22069 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraBase.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Cameras/CameraBase.cs
@@ -8,6 +8,8 @@ using Crestron.SimplSharp.Reflection;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Devices;
+using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Presets;
using PepperDash.Essentials.Devices.Common.Codec;
@@ -25,7 +27,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
Focus = 8
}
- public abstract class CameraBase : EssentialsDevice, IRoutingOutputs
+ public abstract class CameraBase : ReconfigurableDevice, IRoutingOutputs
{
public eCameraControlMode ControlMode { get; protected set; }
@@ -70,12 +72,18 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
// A bitmasked value to indicate the movement capabilites of this camera
protected eCameraCapabilities Capabilities { get; set; }
- protected CameraBase(string key, string name) :
- base(key, name)
- {
- OutputPorts = new RoutingPortCollection();
+ protected CameraBase(DeviceConfig config) : base(config)
+ {
+ OutputPorts = new RoutingPortCollection();
- ControlMode = eCameraControlMode.Manual;
+ ControlMode = eCameraControlMode.Manual;
+
+ }
+
+ protected CameraBase(string key, string name) :
+ this (new DeviceConfig{Name = name, Key = key})
+ {
+
}
protected void LinkCameraToApi(CameraBase cameraDevice, BasicTriList trilist, uint joinStart, string joinMapKey,
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
index 6586bd41..3d9e5d30 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Essentials Devices Common.csproj
@@ -176,6 +176,7 @@
+
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs
index 131d610f..a8805a21 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasCodecLayouts.cs
@@ -19,4 +19,32 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
void LocalLayoutToggleSingleProminent();
void MinMaxLayoutToggle();
}
+
+ ///
+ /// Defines the requirements for Zoom Room layout control
+ ///
+ public interface IHasZoomRoomLayouts : IHasCodecLayouts
+ {
+ event EventHandler AvailableLayoutsChanged;
+
+ 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
+ BoolFeedback CanSwapContentWithThumbnailFeedback { get; }
+ BoolFeedback ContentSwappedWithThumbnailFeedback { get; }
+
+ ZoomRoom.zConfiguration.eLayoutStyle LastSelectedLayout { get; }
+ ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; }
+
+ void GetAvailableLayouts(); // Mot sure this is necessary if we're already subscribed to zStatus Call Layout
+ void SetLayout(ZoomRoom.zConfiguration.eLayoutStyle layoutStyle);
+ void SwapContentWithThumbnail();
+
+ void LayoutTurnNextPage();
+ void LayoutTurnPreviousPage();
+ }
+
+ public class LayoutInfoChangedEventArgs : EventArgs
+ {
+ public ZoomRoom.zConfiguration.eLayoutStyle AvailableLayouts { get; set; }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs
index e0f1d1a3..f03c1984 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/Interfaces/IHasParticipants.cs
@@ -1,13 +1,20 @@
using System;
using System.Collections.Generic;
+using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
{
+ ///
+ /// Describes a device that has call participants
+ ///
public interface IHasParticipants
{
CodecParticipants Participants { get; }
}
+ ///
+ /// Describes the ability to mute and unmute a participant's video in a meeting
+ ///
public interface IHasParticipantVideoMute:IHasParticipants
{
void MuteVideoForParticipant(int userId);
@@ -15,13 +22,29 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
void ToggleVideoForParticipant(int userId);
}
- public interface IHasParticipantAudioMute:IHasParticipantVideoMute
+ ///
+ /// Describes the ability to mute and unmute a participant's audio in a meeting
+ ///
+ public interface IHasParticipantAudioMute : IHasParticipantVideoMute
{
void MuteAudioForParticipant(int userId);
void UnmuteAudioForParticipant(int userId);
void ToggleAudioForParticipant(int userId);
}
+ ///
+ /// Describes the ability to pin and unpin a participant in a meeting
+ ///
+ public interface IHasParticipantPinUnpin : IHasParticipants
+ {
+ IntFeedback NumberOfScreensFeedback { get; }
+ int ScreenIndexToPinUserTo { get; }
+
+ void PinParticipant(int userId, int screenIndex);
+ void UnPinParticipant(int userId);
+ void ToggleParticipantPinState(int userId, int screenIndex);
+ }
+
public class CodecParticipants
{
private List _currentParticipants;
@@ -31,11 +54,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
set
{
_currentParticipants = value;
- var handler = ParticipantsListHasChanged;
-
- if(handler == null) return;
-
- handler(this, new EventArgs());
+ OnParticipantsChanged();
}
}
@@ -45,15 +64,31 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces
{
_currentParticipants = new List();
}
+
+ public void OnParticipantsChanged()
+ {
+ var handler = ParticipantsListHasChanged;
+
+ if (handler == null) return;
+
+ handler(this, new EventArgs());
+ }
}
+ ///
+ /// Represents a call participant
+ ///
public class Participant
{
+ public int UserId { get; set; }
public bool IsHost { get; set; }
public string Name { get; set; }
public bool CanMuteVideo { get; set; }
public bool CanUnmuteVideo { get; set; }
public bool VideoMuteFb { get; set; }
public bool AudioMuteFb { get; set; }
+ public bool HandIsRaisedFb { get; set; }
+ public bool IsPinnedFb { get; set; }
+ public int ScreenIndexIsPinnedToFb { get; set; }
}
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs
index 1a755cef..dc9228ce 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/VideoCodecBase.cs
@@ -28,6 +28,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
IUsageTracking, IHasDialer, IHasContentSharing, ICodecAudio, iVideoCodecInfo, IBridgeAdvanced
{
private const int XSigEncoding = 28591;
+ protected const int MaxParticipants = 50;
private readonly byte[] _clearBytes = XSigHelpers.ClearOutputs();
protected VideoCodecBase(DeviceConfig config)
: base(config)
@@ -271,6 +272,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
public abstract void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
+ ///
+ /// Use this method when using a plain VideoCodecControllerJoinMap
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
protected void LinkVideoCodecToApi(VideoCodecBase codec, BasicTriList trilist, uint joinStart, string joinMapKey,
EiscApiAdvanced bridge)
{
@@ -288,10 +297,19 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
bridge.AddJoinMap(Key, joinMap);
}
+ LinkVideoCodecToApi(codec, trilist, joinMap);
+ }
+
+ ///
+ /// Use this method when you need to pass in a join map that extends VideoCodecControllerJoinMap
+ ///
+ ///
+ ///
+ ///
+ protected void LinkVideoCodecToApi(VideoCodecBase codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
+ {
Debug.Console(1, this, "Linking to Trilist {0}", trilist.ID.ToString("X"));
-
-
LinkVideoCodecDtmfToApi(trilist, joinMap);
LinkVideoCodecCallControlsToApi(trilist, joinMap);
@@ -524,6 +542,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
return;
}
+ SetParticipantActions(trilist, joinMap, codec.Participants.CurrentParticipants);
+
participantsXSig = UpdateParticipantsXSig(codec.Participants.CurrentParticipants);
trilist.SetString(joinMap.CurrentParticipants.JoinNumber, participantsXSig);
@@ -532,14 +552,59 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
};
}
+ ///
+ /// Sets the actions for each participant in the list
+ ///
+ private void SetParticipantActions(BasicTriList trilist, VideoCodecControllerJoinMap joinMap, List currentParticipants)
+ {
+ uint index = 0; // track the index of the participant in the
+
+ foreach (var participant in currentParticipants)
+ {
+ var p = participant;
+ if (index > MaxParticipants) break;
+
+ var audioMuteCodec = this as IHasParticipantAudioMute;
+ if (audioMuteCodec != null)
+ {
+ trilist.SetSigFalseAction(joinMap.ParticipantAudioMuteToggleStart.JoinNumber + index,
+ () => audioMuteCodec.ToggleAudioForParticipant(p.UserId));
+
+ trilist.SetSigFalseAction(joinMap.ParticipantVideoMuteToggleStart.JoinNumber + index,
+ () => audioMuteCodec.ToggleVideoForParticipant(p.UserId));
+ }
+
+ var pinCodec = this as IHasParticipantPinUnpin;
+ if (pinCodec != null)
+ {
+ trilist.SetSigFalseAction(joinMap.ParticipantPinToggleStart.JoinNumber + index,
+ () => pinCodec.ToggleParticipantPinState(p.UserId, pinCodec.ScreenIndexToPinUserTo));
+ }
+
+ index++;
+ }
+
+ // Clear out any previously set actions
+ while (index < MaxParticipants)
+ {
+ trilist.ClearBoolSigAction(joinMap.ParticipantAudioMuteToggleStart.JoinNumber + index);
+ trilist.ClearBoolSigAction(joinMap.ParticipantVideoMuteToggleStart.JoinNumber + index);
+ trilist.ClearBoolSigAction(joinMap.ParticipantPinToggleStart.JoinNumber + index);
+
+ index++;
+ }
+ }
+
private string UpdateParticipantsXSig(List currentParticipants)
{
- const int maxParticipants = 50;
- const int maxDigitals = 5;
+ const int maxParticipants = MaxParticipants;
+ const int maxDigitals = 7;
const int maxStrings = 1;
- const int offset = maxDigitals + maxStrings;
- var digitalIndex = maxStrings * maxParticipants; //15
+ const int maxAnalogs = 1;
+ const int offset = maxDigitals + maxStrings + maxAnalogs; // 9
+ var digitalIndex = (maxStrings + maxAnalogs) * maxParticipants; // 100
var stringIndex = 0;
+ var analogIndex = stringIndex + maxParticipants;
var meetingIndex = 0;
var tokenArray = new XSigToken[maxParticipants * offset];
@@ -554,29 +619,42 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
tokenArray[digitalIndex + 2] = new XSigDigitalToken(digitalIndex + 3, participant.CanMuteVideo);
tokenArray[digitalIndex + 3] = new XSigDigitalToken(digitalIndex + 4, participant.CanUnmuteVideo);
tokenArray[digitalIndex + 4] = new XSigDigitalToken(digitalIndex + 5, participant.IsHost);
+ tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, participant.HandIsRaisedFb);
+ tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, participant.IsPinnedFb);
//serials
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, participant.Name);
+ //analogs
+ tokenArray[analogIndex] = new XSigAnalogToken(analogIndex + 1, (ushort)participant.ScreenIndexIsPinnedToFb);
+
digitalIndex += maxDigitals;
meetingIndex += offset;
stringIndex += maxStrings;
+ analogIndex += maxAnalogs;
}
while (meetingIndex < maxParticipants * offset)
{
+ //digitals
tokenArray[digitalIndex] = new XSigDigitalToken(digitalIndex + 1, false);
tokenArray[digitalIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false);
tokenArray[digitalIndex + 2] = new XSigDigitalToken(digitalIndex + 3, false);
tokenArray[digitalIndex + 3] = new XSigDigitalToken(digitalIndex + 4, false);
tokenArray[digitalIndex + 4] = new XSigDigitalToken(digitalIndex + 5, false);
+ tokenArray[digitalIndex + 5] = new XSigDigitalToken(digitalIndex + 6, false);
+ tokenArray[digitalIndex + 6] = new XSigDigitalToken(digitalIndex + 7, false);
//serials
tokenArray[stringIndex] = new XSigSerialToken(stringIndex + 1, String.Empty);
+ //analogs
+ tokenArray[analogIndex] = new XSigAnalogToken(analogIndex + 1, 0);
+
digitalIndex += maxDigitals;
meetingIndex += offset;
stringIndex += maxStrings;
+ analogIndex += maxAnalogs;
}
return GetXSigString(tokenArray);
@@ -595,7 +673,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
trilist.SetBoolSigAction(joinMap.SourceShareAutoStart.JoinNumber, (b) => AutoShareContentWhileInCall = b);
}
- // TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
private List _currentMeetings = new List();
private void LinkVideoCodecScheduleToApi(IHasScheduleAwareness codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
@@ -607,7 +684,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
codec.CodecSchedule.MeetingWarningMinutes = i;
});
- // TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
trilist.SetSigFalseAction(joinMap.DialMeeting1.JoinNumber, () =>
{
var mtg = 1;
@@ -617,7 +693,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
if (_currentMeetings[index] != null)
Dial(_currentMeetings[index]);
});
- // TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
+
trilist.SetSigFalseAction(joinMap.DialMeeting2.JoinNumber, () =>
{
var mtg = 2;
@@ -627,7 +703,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
if (_currentMeetings[index] != null)
Dial(_currentMeetings[index]);
});
- // TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
+
trilist.SetSigFalseAction(joinMap.DialMeeting3.JoinNumber, () =>
{
var mtg = 3;
@@ -652,14 +728,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
{
var currentTime = DateTime.Now;
- // TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
- // - changed var currentMeetings >> field _currentMeetings
- //_currentMeetings.Clear();
_currentMeetings = codec.CodecSchedule.Meetings.Where(m => m.StartTime >= currentTime || m.EndTime >= currentTime).ToList();
- // TODO [ ] 2021-01-06, jkd: Added to debug OBTP dialing issues
- // - moved the trilist.SetSigFlaseAction(joinMap.DialMeeting1..3.JoinNumber) lambda's to LinkVideoCodecScheduleToApi
-
var meetingsData = UpdateMeetingsListXSig(_currentMeetings);
trilist.SetString(joinMap.Schedule.JoinNumber, meetingsData);
trilist.SetUshort(joinMap.MeetingCount.JoinNumber, (ushort)_currentMeetings.Count);
@@ -847,7 +917,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
Debug.Console(1, this, "Call Direction: {0}", args.CallItem.Direction);
Debug.Console(1, this, "Call is incoming: {0}", args.CallItem.Direction == eCodecCallDirection.Incoming);
- trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status == eCodecCallStatus.Ringing);
+ trilist.SetBool(joinMap.IncomingCall.JoinNumber, args.CallItem.Direction == eCodecCallDirection.Incoming && args.CallItem.Status == eCodecCallStatus.Ringing);
if (args.CallItem.Direction == eCodecCallDirection.Incoming)
{
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs
index 36cce89f..b45810ac 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ResponseObjects.cs
@@ -15,1321 +15,1592 @@ using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
- public enum eZoomRoomResponseType
- {
- zEvent,
- zStatus,
- zConfiguration,
- zCommand
- }
-
- public abstract class NotifiableObject : INotifyPropertyChanged
- {
- #region INotifyPropertyChanged Members
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- protected void NotifyPropertyChanged(string propertyName)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
-
- #endregion
- }
-
- ///
- /// Used to track the current status of a ZoomRoom
- ///
- public class ZoomRoomStatus
- {
- public zStatus.Login Login { get; set; }
- public zStatus.SystemUnit SystemUnit { get; set; }
- public zStatus.Phonebook Phonebook { get; set; }
- public zStatus.Call Call { get; set; }
- public zStatus.Capabilities Capabilities { get; set; }
- public zStatus.Sharing Sharing { get; set; }
- public zStatus.NumberOfScreens NumberOfScreens { get; set; }
- public zStatus.Layout Layout { get; set; }
- public zStatus.Video Video { get; set; }
- public zStatus.CameraShare CameraShare { get; set; }
- public List AudioInputs { get; set; }
- public List AudioOuputs { get; set; }
- public List Cameras { get; set; }
- public zEvent.PhoneCallStatus PhoneCall { get; set; }
-
- public ZoomRoomStatus()
- {
- Login = new zStatus.Login();
- SystemUnit = new zStatus.SystemUnit();
- Phonebook = new zStatus.Phonebook();
- Call = new zStatus.Call();
- Capabilities = new zStatus.Capabilities();
- Sharing = new zStatus.Sharing();
- NumberOfScreens = new zStatus.NumberOfScreens();
- Layout = new zStatus.Layout();
- Video = new zStatus.Video();
- CameraShare = new zStatus.CameraShare();
- AudioInputs = new List();
- AudioOuputs = new List();
- Cameras = new List();
- PhoneCall = new zEvent.PhoneCallStatus();
- }
- }
-
- ///
- /// Used to track the current configuration of a ZoomRoom
- ///
- public class ZoomRoomConfiguration
- {
- public zConfiguration.Call Call { get; set; }
- public zConfiguration.Audio Audio { get; set; }
- public zConfiguration.Video Video { get; set; }
- public zConfiguration.Client Client { get; set; }
- public zConfiguration.Camera Camera { get; set; }
-
- public ZoomRoomConfiguration()
- {
- Call = new zConfiguration.Call();
- Audio = new zConfiguration.Audio();
- Video = new zConfiguration.Video();
- Client = new zConfiguration.Client();
- Camera = new zConfiguration.Camera();
- }
- }
-
- ///
- /// Represents a response from a ZoomRoom system
- ///
- public class Response
- {
- public Status Status { get; set; }
- public bool Sync { get; set; }
- [JsonProperty("topKey")]
- public string TopKey { get; set; }
- [JsonProperty("type")]
- public string Type { get; set; }
-
- public Response()
- {
- Status = new Status();
- }
- }
-
- public class Status
- {
- [JsonProperty("message")]
- public string Message { get; set; }
- [JsonProperty("state")]
- public string State { get; set; }
- }
-
-
- ///
- /// zStatus class stucture
- ///
- public class zStatus
- {
- public class Login
- {
- [JsonProperty("ZAAPI Release")]
- public string ZAAPIRelease { get; set; }
- [JsonProperty("Zoom Room Release")]
- public string ZoomRoomRelease { get; set; }
- }
-
- public class SystemUnit
- {
- [JsonProperty("email")]
- public string Email { get; set; }
- [JsonProperty("login_type")]
- public string LoginType { get; set; }
- [JsonProperty("meeting_number")]
- public string MeetingNumber { get; set; }
- [JsonProperty("platform")]
- public string Platform { get; set; }
- [JsonProperty("room_info")]
- public RoomInfo RoomInfo { get; set; }
- [JsonProperty("room_version")]
- public string RoomVersion { get; set; }
-
- public SystemUnit()
- {
- RoomInfo = new RoomInfo();
- }
- }
-
- public class RoomInfo
- {
- [JsonProperty("account_email")]
- public string AccountEmail { get; set; }
- [JsonProperty("display_version")]
- public string DisplayVersion { get; set; }
- [JsonProperty("is_auto_answer_enabled")]
- public bool AutoAnswerIsEnabled { get; set; }
- [JsonProperty("is_auto_answer_selected")]
- public bool AutoAnswerIsSelected { get; set; }
- [JsonProperty("room_name")]
- public string RoomName { get; set; }
- }
-
- public class CloudPbxInfo
- {
- [JsonProperty("company_number")]
- public string CompanyNumber { get; set; }
- [JsonProperty("extension")]
- public string Extension { get; set; }
- [JsonProperty("isValid")]
- public bool IsValid { get; set; }
- }
-
- public enum ePresence
- {
- PRESENCE_OFFLINE,
- PRESENCE_ONLINE,
- PRESENCE_AWAY,
- PRESENCE_BUSY,
- PRESENCE_DND
- }
-
- public class Contact
- {
- [JsonProperty("avatarURL")]
- public string AvatarURL { get; set; }
- [JsonProperty("cloud_pbx_info")]
- public CloudPbxInfo CloudPbxInfo { get; set; }
- [JsonProperty("email")]
- public string Email { get; set; }
- [JsonProperty("firstName")]
- public string FirstName { get; set; }
- [JsonProperty("index")]
- public int Index { get; set; }
- [JsonProperty("isLegacy")]
- public bool IsLegacy { get; set; }
- [JsonProperty("isZoomRoom")]
- public bool IsZoomRoom { get; set; }
- [JsonProperty("jid")]
- public string Jid { get; set; }
- [JsonProperty("lastName")]
- public string LastName { get; set; }
- [JsonProperty("onDesktop")]
- public bool OnDesktop { get; set; }
- [JsonProperty("onMobile")]
- public bool OnMobile { get; set; }
- [JsonProperty("phoneNumber")]
- public string PhoneNumber { get; set; }
- [JsonProperty("presence")]
- public ePresence Presence { get; set; }
- [JsonProperty("presence_status")]
- public int PresenceStatus { get; set; }
- [JsonProperty("screenName")]
- public string ScreenName { get; set; }
- [JsonProperty("sip_phone_number")]
- public string SipPhoneNumber { get; set; }
-
-
- public Contact()
- {
- CloudPbxInfo = new CloudPbxInfo();
- }
- }
-
- ///
- /// Used to be able to inplement IInvitableContact on DirectoryContact
- ///
- public class ZoomDirectoryContact : DirectoryContact, IInvitableContact
- {
-
- }
-
- public class Phonebook
- {
- [JsonProperty("Contacts")]
- public List Contacts { get; set; }
-
- public Phonebook()
- {
- Contacts = new List();
- }
-
- ///
- /// Converts from zStatus.Contact types to generic directory items
- ///
- ///
- public static CodecDirectory ConvertZoomContactsToGeneric(List zoomContacts)
- {
- var directory = new CodecDirectory();
-
- var folders = new List();
-
- var roomFolder = new DirectoryFolder();
-
- var contactFolder = new DirectoryFolder();
-
- var contacts = new List();
-
- // Check if there are any zoom rooms
- var zoomRooms = zoomContacts.FindAll(c => c.IsZoomRoom);
-
- if (zoomRooms.Count > 0)
- {
- // If so, setup a rooms and contacts folder and add them.
- roomFolder.Name = "Rooms";
- roomFolder.ParentFolderId = "root";
- roomFolder.FolderId = "rooms";
-
- contactFolder.Name = "Contacts";
- contactFolder.ParentFolderId = "root";
- contactFolder.FolderId = "contacts";
-
- folders.Add(roomFolder);
- folders.Add(contactFolder);
-
- directory.AddFoldersToDirectory(folders);
- }
-
- try
- {
- if (zoomContacts.Count == 0) return directory;
- {
- foreach (Contact c in zoomContacts)
- {
- var contact = new ZoomDirectoryContact {Name = c.ScreenName, ContactId = c.Jid};
-
- if (folders.Count > 0)
- {
- contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
- }
-
- contacts.Add(contact);
- }
-
- directory.AddContactsToDirectory(contacts);
- }
- }
- catch (Exception e)
- {
- Debug.Console(1, "Error converting Zoom Phonebook results to generic: {0}", e);
- }
-
- return directory;
- }
- }
-
- public enum eCallStatus
- {
- UNKNOWN,
- NOT_IN_MEETING,
- CONNECTING_MEETING,
- IN_MEETING,
- LOGGED_OUT
- }
-
- public class ClosedCaption
- {
- public bool Available { get; set; }
- }
-
- public class Call : NotifiableObject
- {
- private eCallStatus _status;
- private List _participants;
-
- public bool IsInCall;
-
- public eCallStatus Status
- {
- get
- {
- return _status;
- }
- set
- {
- if (value != _status)
- {
- _status = value;
- IsInCall = _status == eCallStatus.IN_MEETING || _status == eCallStatus.CONNECTING_MEETING;
- NotifyPropertyChanged("Status");
- }
- }
- }
- public ClosedCaption ClosedCaption { get; set; }
- public List Participants
- {
- get
- {
- return _participants;
- }
- set
- {
- _participants = value;
- NotifyPropertyChanged("Participants");
- }
- }
- public zEvent.SharingState Sharing { get; set; }
-
- public CallRecordInfo CallRecordInfo { get; set; }
-
- private zCommand.InfoResult _info;
-
- public zCommand.InfoResult Info
- {
- get
- {
- return _info;
- }
- set
- {
- _info = value;
- NotifyPropertyChanged("Info");
- }
- }
-
- public Call()
- {
- ClosedCaption = new ClosedCaption();
- Participants = new List();
- Sharing = new zEvent.SharingState();
- CallRecordInfo = new CallRecordInfo();
- Info = new zCommand.InfoResult();
- }
- }
-
- public class Capabilities
- {
- public bool aec_Setting_Stored_In_ZR { get; set; }
- public bool can_Dtmf_For_Invite_By_Phone { get; set; }
- public bool can_Mute_On_Entry { get; set; }
- public bool can_Ringing_In_Pstn_Call { get; set; }
- public bool can_Switch_To_Specific_Camera { get; set; }
- public bool is_Airhost_Disabled { get; set; }
- public bool pstn_Call_In_Local_resentation { get; set; }
- public bool support_Claim_Host { get; set; }
- public bool support_Out_Room_Display { get; set; }
- public bool support_Pin_And_Spotlight { get; set; }
- public bool supports_Audio_Checkup { get; set; }
- public bool supports_CheckIn { get; set; }
- public bool supports_Cloud_PBX { get; set; }
- public bool supports_Encrypted_Connection { get; set; }
- public bool supports_Expel_User_Permanently { get; set; }
- public bool supports_H323_DTMF { get; set; }
- public bool supports_Hdmi_Cec_Control { get; set; }
- public bool supports_Highly_Reverberant_Room { get; set; }
- public bool supports_Loading_Contacts_Dynamically { get; set; }
- public bool supports_Loading_Participants_Dynamically { get; set; }
- public bool supports_Mic_Record_Test { get; set; }
- public bool supports_Multi_Share { get; set; }
- public bool supports_ShareCamera { get; set; }
- public bool supports_Share_For_Floating_And_Content_Only { get; set; }
- public bool supports_Sip_Call_out { get; set; }
- public bool supports_Software_Audio_Processing { get; set; }
- public bool supports_Web_Settings_Push { get; set; }
- }
-
- public class Sharing : NotifiableObject
- {
- private string _dispState;
- private string _password;
-
- public string directPresentationPairingCode { get; set; }
- ///
- /// Laptop client sharing key
- ///
- public string directPresentationSharingKey { get; set; }
- public string dispState
- {
- get
- {
- return _dispState;
- }
- set
- {
- if (value != _dispState)
- {
- _dispState = value;
- NotifyPropertyChanged("dispState");
- }
- }
- }
- public bool isAirHostClientConnected { get; set; }
- public bool isBlackMagicConnected { get; set; }
- public bool isBlackMagicDataAvailable { get; set; }
- public bool isDirectPresentationConnected { get; set; }
- public bool isSharingBlackMagic { get; set; }
- ///
- /// IOS Airplay code
- ///
- public string password
- {
- get
- {
- return _password;
- }
- set
- {
- if (value != _password)
- {
- _password = value;
- NotifyPropertyChanged("password");
- }
- }
- }
- public string serverName { get; set; }
- public string wifiName { get; set; }
- }
-
- public class NumberOfScreens
- {
- [JsonProperty("NumberOfCECScreens")]
- public int NumOfCECScreens { get; set; }
- [JsonProperty("NumberOfScreens")]
- public int NumOfScreens { get; set; }
- }
-
- ///
- /// AudioInputLine/AudioOutputLine/VideoCameraLine list item
- ///
- public class AudioVideoInputOutputLineItem
- {
- public string Alias { get; set; }
- public string Name { get; set; }
- public bool Selected { get; set; }
- public bool combinedDevice { get; set; }
- public string id { get; set; }
- public bool manuallySelected { get; set; }
- public int numberOfCombinedDevices { get; set; }
- public int ptzComId { get; set; }
- }
-
- public class Video
- {
- public bool Optimizable { get; set; }
- }
-
- public class CameraShare : NotifiableObject
- {
- private bool _canControlCamera;
- private bool _isSharing;
-
- [JsonProperty("can_Control_Camera")]
- public bool CanControlCamera
- {
- get
- {
- return _canControlCamera;
- }
- set
- {
- if (value != _canControlCamera)
- {
- _canControlCamera = value;
- NotifyPropertyChanged("CanControlCamera");
- }
- }
- }
- public string id { get; set; }
- public bool is_Mirrored { get; set; }
- [JsonProperty("is_Sharing")]
- public bool IsSharing
- {
- get
- {
- return _isSharing;
- }
- set
- {
- if (value != _isSharing)
- {
- _isSharing = value;
- NotifyPropertyChanged("IsSharing");
- }
- }
- }
- public int pan_Tilt_Speed { get; set; }
-
- }
-
- public class Layout
- {
- public bool can_Adjust_Floating_Video { get; set; }
- public bool can_Switch_Floating_Share_Content { get; set; }
- public bool can_Switch_Share_On_All_Screens { get; set; }
- public bool can_Switch_Speaker_View { get; set; }
- public bool can_Switch_Wall_View { get; set; }
- public bool is_In_First_Page { get; set; }
- public bool is_In_Last_Page { get; set; }
- public bool is_supported { get; set; }
- public int video_Count_In_Current_Page { get; set; }
- public string video_type { get; set; }
- }
-
- public class CallRecordInfo
- {
- public bool canRecord { get; set; }
- public bool emailRequired { get; set; }
- public bool amIRecording { get; set; }
- public bool meetingIsBeingRecorded { get; set; }
- }
- }
-
- ///
- /// zEvent Class Structure
- ///
- public class zEvent
- {
- public class NeedWaitForHost
- {
- public bool Wait { get; set; }
- }
-
- public class IncomingCallIndication
- {
- public string callerJID { get; set; }
- public string calleeJID { get; set; }
- public string meetingID { get; set; }
- public string password { get; set; }
- public string meetingOption { get; set; }
- public long MeetingNumber { get; set; }
- public string callerName { get; set; }
- public string avatarURL { get; set; }
- public int lifeTime { get; set; }
- public bool accepted { get; set; }
- }
-
- public class CallConnectError
- {
- public int error_code { get; set; }
- public string error_message { get; set; }
- }
-
- public class CallDisconnect
- {
- public bool Successful
- {
- get
- {
- return success == "on";
- }
- }
-
- public string success { get; set; }
- }
-
- public class Layout
- {
- public bool Sharethumb { get; set; }
- }
-
- public class Call
- {
- public Layout Layout { get; set; }
- }
-
- public class Client
- {
- public Call Call { get; set; }
- }
-
- public enum eSharingState
- {
- None,
- Connecting,
- Sending,
- Receiving,
- Send_Receiving
- }
-
- public class SharingState : NotifiableObject
- {
- private bool _paused;
- private eSharingState _state;
-
- public bool IsSharing;
-
- [JsonProperty("paused")]
- public bool Paused
- {
- get
- {
- return _paused;
- }
- set
- {
- if (value != _paused)
- {
- _paused = value;
- NotifyPropertyChanged("Paused");
- }
- }
- }
- [JsonProperty("state")]
- public eSharingState State
- {
- get
- {
- return _state;
- }
- set
- {
- if (value != _state)
- {
- _state = value;
- IsSharing = _state == eSharingState.Sending;
- NotifyPropertyChanged("State");
- }
- }
- }
- }
-
- public class PinStatusOfScreenNotification
- {
- [JsonProperty("can_be_pinned")]
- public bool CanBePinned { get; set; }
- [JsonProperty("can_pin_share")]
- public bool CanPinShare { get; set; }
- [JsonProperty("pinned_share_source_id")]
- public int PinnedShareSourceId { get; set; }
- [JsonProperty("pinned_user_id")]
- public int PinnedUserId { get; set; }
- [JsonProperty("screen_index")]
- public int ScreenIndex { get; set; }
- [JsonProperty("screen_layout")]
- public int ScreenLayout { get; set; }
- [JsonProperty("share_source_type")]
- public int ShareSourceType { get; set; }
- [JsonProperty("why_cannot_pin_share")]
- public string WhyCannotPinShare { get; set; }
- }
-
- public class PhoneCallStatus:NotifiableObject
- {
- private bool _isIncomingCall;
- private string _peerDisplayName;
- private string _peerNumber;
-
- private bool _offHook;
-
- public string CallId { get; set; }
- public bool IsIncomingCall {
- get { return _isIncomingCall; }
- set
- {
- if(value == _isIncomingCall) return;
-
- _isIncomingCall = value;
- NotifyPropertyChanged("IsIncomingCall");
- } }
-
- public string PeerDisplayName
- {
- get { return _peerDisplayName; }
- set
- {
- if (value == _peerDisplayName) return;
- _peerDisplayName = value;
- NotifyPropertyChanged("PeerDisplayName");
- }
- }
-
- public string PeerNumber
- {
- get { return _peerNumber; }
- set
- {
- if (value == _peerNumber) return;
-
- _peerNumber = value;
- NotifyPropertyChanged("PeerNumber");
- }
- }
-
- public string PeerUri { get; set; }
-
- private ePhoneCallStatus _status;
- public ePhoneCallStatus Status
- {
- get { return _status; }
- set
- {
- _status = value;
- OffHook = _status == ePhoneCallStatus.PhoneCallStatus_Accepted ||
- _status == ePhoneCallStatus.PhoneCallStatus_InCall ||
- _status == ePhoneCallStatus.PhoneCallStatus_Init ||
- _status == ePhoneCallStatus.PhoneCallStatus_Ringing;
- }
- }
-
- public bool OffHook
- {
- get { return _offHook; }
- set
- {
- if (value == _offHook) return;
-
- _offHook = value;
- NotifyPropertyChanged("OffHook");
- }
- }
- }
-
- public enum ePhoneCallStatus
- {
- PhoneCallStatus_Ringing,
- PhoneCallStatus_Terminated,
- PhoneCallStatus_Accepted,
- PhoneCallStatus_InCall,
- PhoneCallStatus_Init,
- }
- }
-
- ///
- /// zConfiguration class structure
- ///
- public class zConfiguration
- {
- public class Sharing
- {
- [JsonProperty("optimize_video_sharing")]
- public bool OptimizeVideoSharing { get; set; }
- }
-
- public class Camera : NotifiableObject
- {
- private bool _mute;
-
- public bool Mute
- {
- get { return _mute; }
- set
- {
- Debug.Console(1, "Camera Mute response received: {0}", value);
-
- if (value == _mute) return;
-
- _mute = value;
- NotifyPropertyChanged("Mute");
- }
- }
- }
-
- public class Microphone : NotifiableObject
- {
- private bool _mute;
-
- public bool Mute
- {
- get
- {
- return _mute;
- }
- set
- {
- if(value != _mute)
- {
- _mute = value;
- NotifyPropertyChanged("Mute");
- }
- }
- }
- }
-
- public enum eLayoutStyle
- {
- Gallery,
- Speaker,
- Strip,
- ShareAll
- }
-
- public enum eLayoutSize
- {
- Off,
- Size1,
- Size2,
- Size3,
- Strip
- }
-
- public enum eLayoutPosition
- {
- Center,
- Up,
- Right,
- UpRight,
- Down,
- DownRight,
- Left,
- UpLeft,
- DownLeft
- }
-
- public class Layout:NotifiableObject
- {
- public bool ShareThumb { get; set; }
- public eLayoutStyle Style { get; set; }
- public eLayoutSize Size { get; set; }
-
- private eLayoutPosition _position;
- public eLayoutPosition Position {
- get { return _position; }
- set
- {
- _position = value;
- NotifyPropertyChanged("Position");
- } }
- }
-
- public class Lock
- {
- public bool Enable { get; set; }
- }
-
- public class ClosedCaption
- {
- public bool Visible { get; set; }
- public int FontSize { get; set; }
- }
-
- public class MuteUserOnEntry
- {
- public bool Enable { get; set; }
- }
-
- public class Call
- {
- public Sharing Sharing { get; set; }
- public Camera Camera { get; set; }
- public Microphone Microphone { get; set; }
- public Layout Layout { get; set; }
- public Lock Lock { get; set; }
- public MuteUserOnEntry MuteUserOnEntry { get; set; }
- public ClosedCaption ClosedCaption { get; set; }
-
-
- public Call()
- {
- Sharing = new Sharing();
- Camera = new Camera();
- Microphone = new Microphone();
- Layout = new Layout();
- Lock = new Lock();
- MuteUserOnEntry = new MuteUserOnEntry();
- ClosedCaption = new ClosedCaption();
- }
- }
-
- public class Audio
- {
- public Input Input { get; set; }
- public Output Output { get; set; }
-
- public Audio()
- {
- Input = new Input();
- Output = new Output();
- }
- }
-
- public class Input : Output
- {
- [JsonProperty("reduce_reverb")]
- public bool ReduceReverb { get; set; }
- }
-
- public class Output : NotifiableObject
- {
- private int _volume;
-
- [JsonProperty("volume")]
- public int Volume
- {
- get
- {
- return _volume;
- }
- set
- {
- if (value != _volume)
- {
- _volume = value;
- NotifyPropertyChanged("Volume");
- }
- }
- }
- [JsonProperty("selectedId")]
- public string SelectedId { get; set; }
- [JsonProperty("is_sap_disabled")]
- public bool IsSapDisabled { get; set; }
- }
-
- public class Video : NotifiableObject
- {
- private bool _hideConfSelfVideo;
-
- [JsonProperty("hide_conf_self_video")]
- public bool HideConfSelfVideo
- {
- get
- {
- return _hideConfSelfVideo;
- }
- set
- {
- if (value != _hideConfSelfVideo)
- {
- _hideConfSelfVideo = value;
- NotifyPropertyChanged("HideConfSelfVideo");
- }
- }
- }
-
- public VideoCamera Camera { get; set; }
-
- public Video()
- {
- Camera = new VideoCamera();
- }
- }
-
- public class VideoCamera : NotifiableObject
- {
- private string _selectedId;
-
- [JsonProperty("selectedId")]
- public string SelectedId {
- get
- {
- return _selectedId;
- }
- set
- {
- if (value != _selectedId)
- {
- _selectedId = value;
- NotifyPropertyChanged("SelectedId");
- }
- }
-
- }
- public bool Mirror { get; set; }
- }
-
- public class Client
- {
- public string appVersion { get; set; }
- public string deviceSystem { get; set; }
- }
-
- }
-
- ///
- /// zCommand class structure
- ///
- public class zCommand
- {
- public class BookingsListResult
- {
- [JsonProperty("accessRole")]
- public string AccessRole { get; set; }
- [JsonProperty("calendarChangeKey")]
- public string CalendarChangeKey { get; set; }
- [JsonProperty("calendarID")]
- public string CalendarId { get; set; }
- [JsonProperty("checkIn")]
- public bool CheckIn { get; set; }
- [JsonProperty("creatorEmail")]
- public string CreatorEmail { get; set; }
- [JsonProperty("creatorName")]
- public string CreatorName { get; set; }
- [JsonProperty("endTime")]
- public DateTime EndTime { get; set; }
- [JsonProperty("hostName")]
- public string HostName { get; set; }
- [JsonProperty("isInstantMeeting")]
- public bool IsInstantMeeting { get; set; }
- [JsonProperty("isPrivate")]
- public bool IsPrivate { get; set; }
- [JsonProperty("location")]
- public string Location { get; set; }
- [JsonProperty("meetingName")]
- public string MeetingName { get; set; }
- [JsonProperty("meetingNumber")]
- public string MeetingNumber { get; set; }
- [JsonProperty("scheduledFrom")]
- public string ScheduledFrom { get; set; }
- [JsonProperty("startTime")]
- public DateTime StartTime { get; set; }
- [JsonProperty("third_party")]
- public ThirdParty ThirdParty { get; set; }
- }
-
- public static List GetGenericMeetingsFromBookingResult(List bookings,
- int minutesBeforeMeetingStart)
- {
- var rv = GetGenericMeetingsFromBookingResult(bookings);
-
- foreach (var meeting in rv)
- {
- meeting.MinutesBeforeMeeting = minutesBeforeMeetingStart;
- }
-
- return rv;
- }
- ///
- /// Extracts the necessary meeting values from the Zoom bookings response and converts them to the generic class
- ///
- ///
- ///
- public static List GetGenericMeetingsFromBookingResult(List bookings)
- {
- var meetings = new List();
-
- if (Debug.Level > 0)
- {
- Debug.Console(1, "Meetings List:\n");
- }
-
- foreach (var b in bookings)
- {
- var meeting = new Meeting();
-
- if (b.MeetingNumber != null)
- meeting.Id = b.MeetingNumber;
- if (b.CreatorName != null)
- meeting.Organizer = b.CreatorName;
- if (b.MeetingName != null)
- meeting.Title = b.MeetingName;
- //if (b.Agenda != null)
- // meeting.Agenda = b.Agenda.Value;
- if (b.StartTime != null)
- meeting.StartTime = b.StartTime;
- if (b.EndTime != null)
- meeting.EndTime = b.EndTime;
-
- meeting.Privacy = b.IsPrivate ? eMeetingPrivacy.Private : eMeetingPrivacy.Public;
-
- // No meeting.Calls data exists for Zoom Rooms. Leaving out for now.
- var now = DateTime.Now;
- if (meeting.StartTime < now && meeting.EndTime < now)
- {
- Debug.Console(1, "Skipping meeting {0}. Meeting is in the past.", meeting.Title);
- continue;
- }
-
- meetings.Add(meeting);
-
- if (Debug.Level > 0)
- {
- Debug.Console(1, "Title: {0}, ID: {1}, Organizer: {2}", meeting.Title, meeting.Id, meeting.Organizer);
- Debug.Console(1, " Start Time: {0}, End Time: {1}, Duration: {2}", meeting.StartTime, meeting.EndTime, meeting.Duration);
- Debug.Console(1, " Joinable: {0}\n", meeting.Joinable);
- }
- }
-
- meetings.OrderBy(m => m.StartTime);
-
- return meetings;
- }
-
- public class HandStatus
- {
- [JsonProperty("is_raise_hand")]
- public bool IsRaiseHand { get; set; }
- [JsonProperty("optimize_vis_validideo_sharing")]
- public string IsValid { get; set; }
- [JsonProperty("time_stamp")]
- public string TimeStamp { get; set; }
- }
-
- public class ListParticipant
- {
- [JsonProperty("audio_status state")]
- public string AudioStatusState { get; set; }
- [JsonProperty("audio_status type")]
- public string AudioStatusType { get; set; }
- [JsonProperty("avatar_url")]
- public string AvatarUrl { get; set; }
- [JsonProperty("camera_status am_i_controlling")]
- public bool CameraStatusAmIControlling { get; set; }
- [JsonProperty("camera_status can_i_request_control")]
- public bool CameraStatusCanIRequestConrol { get; set; }
- [JsonProperty("camera_status can_move_camera")]
- public bool CameraStatusCanMoveCamera { get; set; }
- [JsonProperty("camera_status can_switch_camera")]
- public bool CameraStatusCanSwitchCamera { get; set; }
- [JsonProperty("camera_status can_zoom_camera")]
- public bool CameraStatusCanZoomCamera { get; set; }
- [JsonProperty("can_edit_closed_caption")]
- public bool CanEditClosedCaption { get; set; }
- [JsonProperty("can_record")]
- public bool CanRecord { get; set; }
- [JsonProperty("event")]
- public string Event { get; set; }
- [JsonProperty("hand_status")]
- public HandStatus HandStatus { get; set; }
- [JsonProperty("isCohost")]
- public bool IsCohost { get; set; }
- [JsonProperty("is_client_support_closed_caption")]
- public bool IsClientSupportClosedCaption { get; set; }
- [JsonProperty("is_client_support_coHost")]
- public bool IsClientSupportCoHost { get; set; }
- [JsonProperty("is_host")]
- public bool IsHost { get; set; }
- [JsonProperty("is_myself")]
- public bool IsMyself { get; set; }
- [JsonProperty("is_recording")]
- public bool IsRecording { get; set; }
- [JsonProperty("is_video_can_mute_byHost")]
- public bool IsVideoCanMuteByHost { get; set; }
- [JsonProperty("is_video_can_unmute_byHost")]
- public bool IsVideoCanUnmuteByHost { get; set; }
- [JsonProperty("local_recording_disabled")]
- public bool LocalRecordingDisabled { get; set; }
- [JsonProperty("user_id")]
- public int UserId { get; set; }
- [JsonProperty("user_name")]
- public string UserName { get; set; }
- [JsonProperty("user_type")]
- public string UserType { get; set; }
- [JsonProperty("video_status has_source")]
- public bool VideoStatusHasSource { get; set; }
- [JsonProperty("video_status is_receiving")]
- public bool VideoStatusIsReceiving { get; set; }
- [JsonProperty("video_status is_sending")]
- public bool VideoStatusIsSending { get; set; }
-
- public ListParticipant()
- {
- HandStatus = new HandStatus();
- }
-
- public static List GetGenericParticipantListFromParticipantsResult(
- List participants)
- {
- return
- participants.Select(
- p =>
- new Participant
- {
- Name = p.UserName,
- IsHost = p.IsHost,
- CanMuteVideo = p.IsVideoCanMuteByHost,
- CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
- AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
- VideoMuteFb = p.VideoStatusIsSending
- }).ToList();
- }
- }
-
- public class CallinCountryList
- {
- public int code { get; set; }
- public string display_number { get; set; }
- public string id { get; set; }
- public string name { get; set; }
- public string number { get; set; }
- }
-
- public class CalloutCountryList
- {
- public int code { get; set; }
- public string display_number { get; set; }
- public string id { get; set; }
- public string name { get; set; }
- public string number { get; set; }
- }
-
- public class TollFreeCallinList
- {
- public int code { get; set; }
- public string display_number { get; set; }
- public string id { get; set; }
- public string name { get; set; }
- public string number { get; set; }
- }
-
- public class Info
- {
- public List callin_country_list { get; set; }
- public List callout_country_list { get; set; }
- public List toll_free_callin_list { get; set; }
- }
-
- public class ThirdParty
- {
- public string h323_address { get; set; }
- public string meeting_number { get; set; }
- public string service_provider { get; set; }
- public string sip_address { get; set; }
- }
-
- public class MeetingListItem
- {
- public string accessRole { get; set; }
- public string calendarChangeKey { get; set; }
- public string calendarID { get; set; }
- public bool checkIn { get; set; }
- public string creatorEmail { get; set; }
- public string creatorName { get; set; }
- public string endTime { get; set; }
- public string hostName { get; set; }
- public bool isInstantMeeting { get; set; }
- public bool isPrivate { get; set; }
- public string location { get; set; }
- public string meetingName { get; set; }
- public string meetingNumber { get; set; }
- public string scheduledFrom { get; set; }
- public string startTime { get; set; }
- public ThirdParty third_party { get; set; }
-
- public MeetingListItem()
- {
- third_party = new ThirdParty();
- }
- }
-
- public class InfoResult
- {
- public Info Info { get; set; }
- public bool am_i_original_host { get; set; }
- public string default_callin_country { get; set; }
- public string dialIn { get; set; }
- public string international_url { get; set; }
- public string invite_email_content { get; set; }
- public string invite_email_subject { get; set; }
- public bool is_callin_country_list_available { get; set; }
- public bool is_calling_room_system_enabled { get; set; }
- public bool is_toll_free_callin_list_available { get; set; }
- public bool is_view_only { get; set; }
- public bool is_waiting_room { get; set; }
- public bool is_webinar { get; set; }
- public string meeting_id { get; set; }
- public MeetingListItem meeting_list_item { get; set; }
- public string meeting_password { get; set; }
- public string meeting_type { get; set; }
- public int my_userid { get; set; }
- public int participant_id { get; set; }
- public string real_meeting_id { get; set; }
- public string schedule_option { get; set; }
- public string schedule_option2 { get; set; }
- public string support_callout_type { get; set; }
- public string toll_free_number { get; set; }
- public string user_type { get; set; }
-
- public InfoResult()
- {
- Info = new Info();
- meeting_list_item = new MeetingListItem();
- }
- }
-
- public class Phonebook
- {
- public List Contacts { get; set; }
- public int Limit { get; set; }
- public int Offset { get; set; }
- }
- }
+ public enum eZoomRoomResponseType
+ {
+ zEvent,
+ zStatus,
+ zConfiguration,
+ zCommand
+ }
+
+ public abstract class NotifiableObject : INotifyPropertyChanged
+ {
+ #region INotifyPropertyChanged Members
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected void NotifyPropertyChanged(string propertyName)
+ {
+ if (PropertyChanged != null)
+ {
+ PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ #endregion
+ }
+
+ ///
+ /// Used to track the current status of a ZoomRoom
+ ///
+ public class ZoomRoomStatus
+ {
+ public zStatus.Login Login { get; set; }
+ public zStatus.SystemUnit SystemUnit { get; set; }
+ public zStatus.Phonebook Phonebook { get; set; }
+ public zStatus.Call Call { get; set; }
+ public zStatus.Capabilities Capabilities { get; set; }
+ public zStatus.Sharing Sharing { get; set; }
+ public zStatus.NumberOfScreens NumberOfScreens { get; set; }
+ public zStatus.Layout Layout { get; set; }
+ public zStatus.Video Video { get; set; }
+ public zStatus.CameraShare CameraShare { get; set; }
+ public List AudioInputs { get; set; }
+ public List AudioOuputs { get; set; }
+ public List Cameras { get; set; }
+ public zEvent.PhoneCallStatus PhoneCall { get; set; }
+
+ public ZoomRoomStatus()
+ {
+ Login = new zStatus.Login();
+ SystemUnit = new zStatus.SystemUnit();
+ Phonebook = new zStatus.Phonebook();
+ Call = new zStatus.Call();
+ Capabilities = new zStatus.Capabilities();
+ Sharing = new zStatus.Sharing();
+ NumberOfScreens = new zStatus.NumberOfScreens();
+ Layout = new zStatus.Layout();
+ Video = new zStatus.Video();
+ CameraShare = new zStatus.CameraShare();
+ AudioInputs = new List();
+ AudioOuputs = new List();
+ Cameras = new List();
+ PhoneCall = new zEvent.PhoneCallStatus();
+ }
+ }
+
+ ///
+ /// Used to track the current configuration of a ZoomRoom
+ ///
+ public class ZoomRoomConfiguration
+ {
+ public zConfiguration.Call Call { get; set; }
+ public zConfiguration.Audio Audio { get; set; }
+ public zConfiguration.Video Video { get; set; }
+ public zConfiguration.Client Client { get; set; }
+ public zConfiguration.Camera Camera { get; set; }
+
+ public ZoomRoomConfiguration()
+ {
+ Call = new zConfiguration.Call();
+ Audio = new zConfiguration.Audio();
+ Video = new zConfiguration.Video();
+ Client = new zConfiguration.Client();
+ Camera = new zConfiguration.Camera();
+ }
+ }
+
+ ///
+ /// Represents a response from a ZoomRoom system
+ ///
+ public class Response
+ {
+ public Status Status { get; set; }
+ public bool Sync { get; set; }
+ [JsonProperty("topKey")]
+ public string TopKey { get; set; }
+ [JsonProperty("type")]
+ public string Type { get; set; }
+
+ public Response()
+ {
+ Status = new Status();
+ }
+ }
+
+ public class Status
+ {
+ [JsonProperty("message")]
+ public string Message { get; set; }
+ [JsonProperty("state")]
+ public string State { get; set; }
+ }
+
+
+ ///
+ /// zStatus class stucture
+ ///
+ public class zStatus
+ {
+ public class Login
+ {
+ [JsonProperty("ZAAPI Release")]
+ public string ZAAPIRelease { get; set; }
+ [JsonProperty("Zoom Room Release")]
+ public string ZoomRoomRelease { get; set; }
+ }
+
+ public class SystemUnit
+ {
+ [JsonProperty("email")]
+ public string Email { get; set; }
+ [JsonProperty("login_type")]
+ public string LoginType { get; set; }
+ [JsonProperty("meeting_number")]
+ public string MeetingNumber { get; set; }
+ [JsonProperty("platform")]
+ public string Platform { get; set; }
+ [JsonProperty("room_info")]
+ public RoomInfo RoomInfo { get; set; }
+ [JsonProperty("room_version")]
+ public string RoomVersion { get; set; }
+
+ public SystemUnit()
+ {
+ RoomInfo = new RoomInfo();
+ }
+ }
+
+ public class RoomInfo
+ {
+ [JsonProperty("account_email")]
+ public string AccountEmail { get; set; }
+ [JsonProperty("display_version")]
+ public string DisplayVersion { get; set; }
+ [JsonProperty("is_auto_answer_enabled")]
+ public bool AutoAnswerIsEnabled { get; set; }
+ [JsonProperty("is_auto_answer_selected")]
+ public bool AutoAnswerIsSelected { get; set; }
+ [JsonProperty("room_name")]
+ public string RoomName { get; set; }
+ }
+
+ public class CloudPbxInfo
+ {
+ [JsonProperty("company_number")]
+ public string CompanyNumber { get; set; }
+ [JsonProperty("extension")]
+ public string Extension { get; set; }
+ [JsonProperty("isValid")]
+ public bool IsValid { get; set; }
+ }
+
+ public enum ePresence
+ {
+ PRESENCE_OFFLINE,
+ PRESENCE_ONLINE,
+ PRESENCE_AWAY,
+ PRESENCE_BUSY,
+ PRESENCE_DND
+ }
+
+ public class Contact
+ {
+ [JsonProperty("avatarURL")]
+ public string AvatarURL { get; set; }
+ [JsonProperty("cloud_pbx_info")]
+ public CloudPbxInfo CloudPbxInfo { get; set; }
+ [JsonProperty("email")]
+ public string Email { get; set; }
+ [JsonProperty("firstName")]
+ public string FirstName { get; set; }
+ [JsonProperty("index")]
+ public int Index { get; set; }
+ [JsonProperty("isLegacy")]
+ public bool IsLegacy { get; set; }
+ [JsonProperty("isZoomRoom")]
+ public bool IsZoomRoom { get; set; }
+ [JsonProperty("jid")]
+ public string Jid { get; set; }
+ [JsonProperty("lastName")]
+ public string LastName { get; set; }
+ [JsonProperty("onDesktop")]
+ public bool OnDesktop { get; set; }
+ [JsonProperty("onMobile")]
+ public bool OnMobile { get; set; }
+ [JsonProperty("phoneNumber")]
+ public string PhoneNumber { get; set; }
+ [JsonProperty("presence")]
+ public ePresence Presence { get; set; }
+ [JsonProperty("presence_status")]
+ public int PresenceStatus { get; set; }
+ [JsonProperty("screenName")]
+ public string ScreenName { get; set; }
+ [JsonProperty("sip_phone_number")]
+ public string SipPhoneNumber { get; set; }
+
+
+ public Contact()
+ {
+ CloudPbxInfo = new CloudPbxInfo();
+ }
+ }
+
+ ///
+ /// Used to be able to inplement IInvitableContact on DirectoryContact
+ ///
+ public class ZoomDirectoryContact : DirectoryContact, IInvitableContact
+ {
+
+ }
+
+ public class Phonebook
+ {
+ [JsonProperty("Contacts")]
+ public List Contacts { get; set; }
+
+ public Phonebook()
+ {
+ Contacts = new List();
+ }
+
+ ///
+ /// Converts from zStatus.Contact types to generic directory items
+ ///
+ ///
+ public static CodecDirectory ConvertZoomContactsToGeneric(List zoomContacts)
+ {
+ var directory = new CodecDirectory();
+
+ var folders = new List();
+
+ var roomFolder = new DirectoryFolder();
+
+ var contactFolder = new DirectoryFolder();
+
+ var contacts = new List();
+
+ // Check if there are any zoom rooms
+ var zoomRooms = zoomContacts.FindAll(c => c.IsZoomRoom);
+
+ if (zoomRooms.Count > 0)
+ {
+ // If so, setup a rooms and contacts folder and add them.
+ roomFolder.Name = "Rooms";
+ roomFolder.ParentFolderId = "root";
+ roomFolder.FolderId = "rooms";
+
+ contactFolder.Name = "Contacts";
+ contactFolder.ParentFolderId = "root";
+ contactFolder.FolderId = "contacts";
+
+ folders.Add(roomFolder);
+ folders.Add(contactFolder);
+
+ directory.AddFoldersToDirectory(folders);
+ }
+
+ try
+ {
+ if (zoomContacts.Count == 0) return directory;
+ {
+ foreach (Contact c in zoomContacts)
+ {
+ var contact = new ZoomDirectoryContact { Name = c.ScreenName, ContactId = c.Jid };
+
+ if (folders.Count > 0)
+ {
+ contact.ParentFolderId = c.IsZoomRoom ? "rooms" : "contacts";
+ }
+
+ contacts.Add(contact);
+ }
+
+ directory.AddContactsToDirectory(contacts);
+ }
+ }
+ catch (Exception e)
+ {
+ Debug.Console(1, "Error converting Zoom Phonebook results to generic: {0}", e);
+ }
+
+ return directory;
+ }
+ }
+
+ public enum eCallStatus
+ {
+ UNKNOWN,
+ NOT_IN_MEETING,
+ CONNECTING_MEETING,
+ IN_MEETING,
+ LOGGED_OUT
+ }
+
+ public class ClosedCaption
+ {
+ public bool Available { get; set; }
+ }
+
+ public class Call : NotifiableObject
+ {
+ private eCallStatus _status;
+ private List _participants;
+
+ public bool IsInCall;
+
+ public eCallStatus Status
+ {
+ get
+ {
+ return _status;
+ }
+ set
+ {
+ if (value != _status)
+ {
+ _status = value;
+ IsInCall = _status == eCallStatus.IN_MEETING || _status == eCallStatus.CONNECTING_MEETING;
+ NotifyPropertyChanged("Status");
+ }
+ }
+ }
+ public ClosedCaption ClosedCaption { get; set; }
+ public List Participants
+ {
+ get
+ {
+ return _participants;
+ }
+ set
+ {
+ _participants = value;
+ NotifyPropertyChanged("Participants");
+ }
+ }
+ public zEvent.SharingState Sharing { get; set; }
+
+ public CallRecordInfo CallRecordInfo { get; set; }
+
+ private zCommand.InfoResult _info;
+
+ public zCommand.InfoResult Info
+ {
+ get
+ {
+ return _info;
+ }
+ set
+ {
+ _info = value;
+ NotifyPropertyChanged("Info");
+ }
+ }
+
+ public Call()
+ {
+ ClosedCaption = new ClosedCaption();
+ Participants = new List();
+ Sharing = new zEvent.SharingState();
+ CallRecordInfo = new CallRecordInfo();
+ Info = new zCommand.InfoResult();
+ }
+ }
+
+ public class Capabilities
+ {
+ public bool aec_Setting_Stored_In_ZR { get; set; }
+ public bool can_Dtmf_For_Invite_By_Phone { get; set; }
+ public bool can_Mute_On_Entry { get; set; }
+ public bool can_Ringing_In_Pstn_Call { get; set; }
+ public bool can_Switch_To_Specific_Camera { get; set; }
+ public bool is_Airhost_Disabled { get; set; }
+ public bool pstn_Call_In_Local_resentation { get; set; }
+ public bool support_Claim_Host { get; set; }
+ public bool support_Out_Room_Display { get; set; }
+ public bool support_Pin_And_Spotlight { get; set; }
+ public bool supports_Audio_Checkup { get; set; }
+ public bool supports_CheckIn { get; set; }
+ public bool supports_Cloud_PBX { get; set; }
+ public bool supports_Encrypted_Connection { get; set; }
+ public bool supports_Expel_User_Permanently { get; set; }
+ public bool supports_H323_DTMF { get; set; }
+ public bool supports_Hdmi_Cec_Control { get; set; }
+ public bool supports_Highly_Reverberant_Room { get; set; }
+ public bool supports_Loading_Contacts_Dynamically { get; set; }
+ public bool supports_Loading_Participants_Dynamically { get; set; }
+ public bool supports_Mic_Record_Test { get; set; }
+ public bool supports_Multi_Share { get; set; }
+ public bool supports_ShareCamera { get; set; }
+ public bool supports_Share_For_Floating_And_Content_Only { get; set; }
+ public bool supports_Sip_Call_out { get; set; }
+ public bool supports_Software_Audio_Processing { get; set; }
+ public bool supports_Web_Settings_Push { get; set; }
+ }
+
+ public class Sharing : NotifiableObject
+ {
+ private string _dispState;
+ private string _password;
+
+ public string directPresentationPairingCode { get; set; }
+ ///
+ /// Laptop client sharing key
+ ///
+ public string directPresentationSharingKey { get; set; }
+ public string dispState
+ {
+ get
+ {
+ return _dispState;
+ }
+ set
+ {
+ if (value != _dispState)
+ {
+ _dispState = value;
+ NotifyPropertyChanged("dispState");
+ }
+ }
+ }
+ public bool isAirHostClientConnected { get; set; }
+ public bool isBlackMagicConnected { get; set; }
+ public bool isBlackMagicDataAvailable { get; set; }
+ public bool isDirectPresentationConnected { get; set; }
+ public bool isSharingBlackMagic { get; set; }
+ ///
+ /// IOS Airplay code
+ ///
+ public string password
+ {
+ get
+ {
+ return _password;
+ }
+ set
+ {
+ if (value != _password)
+ {
+ _password = value;
+ NotifyPropertyChanged("password");
+ }
+ }
+ }
+ public string serverName { get; set; }
+ public string wifiName { get; set; }
+ }
+
+ public class NumberOfScreens : NotifiableObject
+ {
+ private int _numOfScreens;
+
+ [JsonProperty("NumberOfCECScreens")]
+ public int NumOfCECScreens { get; set; }
+ [JsonProperty("NumberOfScreens")]
+ public int NumOfScreens
+ {
+ get
+ {
+ return _numOfScreens;
+ }
+ set
+ {
+ if (value != _numOfScreens)
+ {
+ _numOfScreens = value;
+ NotifyPropertyChanged("NumberOfScreens");
+ }
+ }
+ }
+ }
+
+ ///
+ /// AudioInputLine/AudioOutputLine/VideoCameraLine list item
+ ///
+ public class AudioVideoInputOutputLineItem
+ {
+ public string Alias { get; set; }
+ public string Name { get; set; }
+ public bool Selected { get; set; }
+ public bool combinedDevice { get; set; }
+ public string id { get; set; }
+ public bool manuallySelected { get; set; }
+ public int numberOfCombinedDevices { get; set; }
+ public int ptzComId { get; set; }
+ }
+
+ public class Video
+ {
+ public bool Optimizable { get; set; }
+ }
+
+ public class CameraShare : NotifiableObject
+ {
+ private bool _canControlCamera;
+ private bool _isSharing;
+
+ [JsonProperty("can_Control_Camera")]
+ public bool CanControlCamera
+ {
+ get
+ {
+ return _canControlCamera;
+ }
+ set
+ {
+ if (value != _canControlCamera)
+ {
+ _canControlCamera = value;
+ NotifyPropertyChanged("CanControlCamera");
+ }
+ }
+ }
+ public string id { get; set; }
+ public bool is_Mirrored { get; set; }
+ [JsonProperty("is_Sharing")]
+ public bool IsSharing
+ {
+ get
+ {
+ return _isSharing;
+ }
+ set
+ {
+ if (value != _isSharing)
+ {
+ _isSharing = value;
+ NotifyPropertyChanged("IsSharing");
+ }
+ }
+ }
+ public int pan_Tilt_Speed { get; set; }
+
+ }
+
+ public class Layout : NotifiableObject
+ {
+ // backer variables
+ private bool _can_Switch_Speaker_View;
+ private bool _can_Switch_Wall_View;
+ private bool _can_Switch_Share_On_All_Screens;
+ 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; }
+
+ ///
+ /// [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.
+ ///
+ [JsonProperty("can_Switch_Share_On_All_Screens")]
+ public bool can_Switch_Share_On_All_Screens
+ {
+ get
+ {
+ return _can_Switch_Share_On_All_Screens;
+ }
+ set
+ {
+ if (value != _can_Switch_Share_On_All_Screens)
+ {
+ _can_Switch_Share_On_All_Screens = value;
+ NotifyPropertyChanged("can_Switch_Share_On_All_Screens");
+ }
+ }
+ }
+
+ ///
+ /// [on/off] // Set to On if it is possible to switch to Speaker view by invoking zConfiguration Call Layout Style: Speaker. The active speaker is shown full screen, and other video streams, like self-view, are shown in thumbnails.
+ ///
+ [JsonProperty("can_Switch_Speaker_View")]
+ public bool can_Switch_Speaker_View
+ {
+ get
+ {
+ return _can_Switch_Speaker_View;
+ }
+ set
+ {
+ if (value != _can_Switch_Speaker_View)
+ {
+ _can_Switch_Speaker_View = value;
+ NotifyPropertyChanged("can_Switch_Speaker_View");
+ }
+ }
+ }
+
+ ///
+ /// [on/off] On if it is possible to invoke zConfiguration Call Layout Style: Gallery, to switch to the Gallery mode, showing video participants in tiled windows: The Zoom Room shows up to a 5x5 array of tiled windows per page.
+ ///
+ [JsonProperty("can_Switch_Wall_View")]
+ public bool can_Switch_Wall_View
+ {
+ get
+ {
+ return _can_Switch_Wall_View;
+ }
+ set
+ {
+ if (value != _can_Switch_Wall_View)
+ {
+ _can_Switch_Wall_View = value;
+ NotifyPropertyChanged("can_Switch_Wall_View");
+ }
+ }
+ }
+
+ [JsonProperty("is_In_First_Page")]
+ public bool is_In_First_Page
+ {
+ get
+ {
+ return _is_In_First_Page;
+ }
+ set
+ {
+ if (value != _is_In_First_Page)
+ {
+ _is_In_First_Page = value;
+ NotifyPropertyChanged("is_In_First_Page");
+ }
+ }
+ }
+
+ [JsonProperty("is_In_Last_Page")]
+ public bool is_In_Last_Page
+ {
+ get
+ {
+ return _is_In_Last_Page;
+ }
+ set
+ {
+ if (value != _is_In_Last_Page)
+ {
+ _is_In_Last_Page = value;
+ NotifyPropertyChanged("is_In_Last_Page");
+ }
+ }
+ }
+
+ public bool is_supported { get; set; }
+ public int video_Count_In_Current_Page { get; set; }
+
+ ///
+ /// [Gallery | Strip] Indicates which mode applies: Strip or Gallery.
+ ///
+ [JsonProperty("video_type")]
+ public string video_type
+ {
+ get
+ {
+ return _video_type;
+ }
+ set
+ {
+ if (value != _video_type)
+ {
+ _video_type = value;
+ NotifyPropertyChanged("video_type");
+ }
+ }
+ }
+ }
+
+ public class CallRecordInfo
+ {
+ public bool canRecord { get; set; }
+ public bool emailRequired { get; set; }
+ public bool amIRecording { get; set; }
+ public bool meetingIsBeingRecorded { get; set; }
+ }
+ }
+
+ ///
+ /// zEvent Class Structure
+ ///
+ public class zEvent
+ {
+ public class NeedWaitForHost
+ {
+ public bool Wait { get; set; }
+ }
+
+ public class IncomingCallIndication
+ {
+ public string callerJID { get; set; }
+ public string calleeJID { get; set; }
+ public string meetingID { get; set; }
+ public string password { get; set; }
+ public string meetingOption { get; set; }
+ public long MeetingNumber { get; set; }
+ public string callerName { get; set; }
+ public string avatarURL { get; set; }
+ public int lifeTime { get; set; }
+ public bool accepted { get; set; }
+ }
+
+ public class CallConnectError
+ {
+ public int error_code { get; set; }
+ public string error_message { get; set; }
+ }
+
+ public class CallDisconnect
+ {
+ public bool Successful
+ {
+ get
+ {
+ return success == "on";
+ }
+ }
+
+ public string success { get; set; }
+ }
+
+ public class Layout
+ {
+ public bool Sharethumb { get; set; }
+ }
+
+ public class Call
+ {
+ public Layout Layout { get; set; }
+ }
+
+ public class Client
+ {
+ public Call Call { get; set; }
+ }
+
+ public enum eSharingState
+ {
+ None,
+ Connecting,
+ Sending,
+ Receiving,
+ Send_Receiving
+ }
+
+ public class SharingState : NotifiableObject
+ {
+ private bool _paused;
+ private eSharingState _state;
+
+ public bool IsSharing;
+
+ [JsonProperty("paused")]
+ public bool Paused
+ {
+ get
+ {
+ return _paused;
+ }
+ set
+ {
+ if (value != _paused)
+ {
+ _paused = value;
+ NotifyPropertyChanged("Paused");
+ }
+ }
+ }
+ [JsonProperty("state")]
+ public eSharingState State
+ {
+ get
+ {
+ return _state;
+ }
+ set
+ {
+ if (value != _state)
+ {
+ _state = value;
+ IsSharing = _state == eSharingState.Sending;
+ NotifyPropertyChanged("State");
+ }
+ }
+ }
+ }
+
+ public class PinStatusOfScreenNotification
+ {
+
+
+ [JsonProperty("can_be_pinned")]
+ public bool CanBePinned { get; set; }
+ [JsonProperty("can_pin_share")]
+ public bool CanPinShare { get; set; }
+ [JsonProperty("pinned_share_source_id")]
+ public int PinnedShareSourceId { get; set; }
+ [JsonProperty("pinned_user_id")]
+ public int PinnedUserId { get; set; }
+ [JsonProperty("screen_index")]
+ public int ScreenIndex { get; set; }
+ [JsonProperty("screen_layout")]
+ public int ScreenLayout { get; set; }
+ [JsonProperty("share_source_type")]
+ public int ShareSourceType { get; set; }
+ [JsonProperty("why_cannot_pin_share")]
+ public string WhyCannotPinShare { get; set; }
+ }
+
+ public class PhoneCallStatus : NotifiableObject
+ {
+ private bool _isIncomingCall;
+ private string _peerDisplayName;
+ private string _peerNumber;
+
+ private bool _offHook;
+
+ public string CallId { get; set; }
+ public bool IsIncomingCall
+ {
+ get { return _isIncomingCall; }
+ set
+ {
+ if (value == _isIncomingCall) return;
+
+ _isIncomingCall = value;
+ NotifyPropertyChanged("IsIncomingCall");
+ }
+ }
+
+ public string PeerDisplayName
+ {
+ get { return _peerDisplayName; }
+ set
+ {
+ if (value == _peerDisplayName) return;
+ _peerDisplayName = value;
+ NotifyPropertyChanged("PeerDisplayName");
+ }
+ }
+
+ public string PeerNumber
+ {
+ get { return _peerNumber; }
+ set
+ {
+ if (value == _peerNumber) return;
+
+ _peerNumber = value;
+ NotifyPropertyChanged("PeerNumber");
+ }
+ }
+
+ public string PeerUri { get; set; }
+
+ private ePhoneCallStatus _status;
+ public ePhoneCallStatus Status
+ {
+ get { return _status; }
+ set
+ {
+ _status = value;
+ OffHook = _status == ePhoneCallStatus.PhoneCallStatus_Accepted ||
+ _status == ePhoneCallStatus.PhoneCallStatus_InCall ||
+ _status == ePhoneCallStatus.PhoneCallStatus_Init ||
+ _status == ePhoneCallStatus.PhoneCallStatus_Ringing;
+ }
+ }
+
+ public bool OffHook
+ {
+ get { return _offHook; }
+ set
+ {
+ if (value == _offHook) return;
+
+ _offHook = value;
+ NotifyPropertyChanged("OffHook");
+ }
+ }
+ }
+
+ public enum ePhoneCallStatus
+ {
+ PhoneCallStatus_Ringing,
+ PhoneCallStatus_Terminated,
+ PhoneCallStatus_Accepted,
+ PhoneCallStatus_InCall,
+ PhoneCallStatus_Init,
+ }
+ }
+
+ ///
+ /// zConfiguration class structure
+ ///
+ public class zConfiguration
+ {
+ public class Sharing
+ {
+ [JsonProperty("optimize_video_sharing")]
+ public bool OptimizeVideoSharing { get; set; }
+ }
+
+ public class Camera : NotifiableObject
+ {
+ private bool _mute;
+
+ public bool Mute
+ {
+ get { return _mute; }
+ set
+ {
+ Debug.Console(1, "Camera Mute response received: {0}", value);
+
+ if (value == _mute) return;
+
+ _mute = value;
+ NotifyPropertyChanged("Mute");
+ }
+ }
+ }
+
+ public class Microphone : NotifiableObject
+ {
+ private bool _mute;
+
+ public bool Mute
+ {
+ get
+ {
+ return _mute;
+ }
+ set
+ {
+ if (value != _mute)
+ {
+ _mute = value;
+ NotifyPropertyChanged("Mute");
+ }
+ }
+ }
+ }
+
+ [Flags]
+ public enum eLayoutStyle
+ {
+ None = 0,
+ Gallery = 1,
+ Speaker = 2,
+ Strip = 4,
+ ShareAll = 8,
+ }
+
+ public enum eLayoutSize
+ {
+ Off,
+ Size1,
+ Size2,
+ Size3,
+ Strip
+ }
+
+ public enum eLayoutPosition
+ {
+ Center,
+ Up,
+ Right,
+ UpRight,
+ Down,
+ DownRight,
+ Left,
+ UpLeft,
+ DownLeft
+ }
+
+ public class Layout : NotifiableObject
+ {
+ private bool _shareThumb;
+ private eLayoutStyle _style;
+ private eLayoutSize _size;
+ private eLayoutPosition _position;
+
+ public bool ShareThumb
+ {
+ get { return _shareThumb; }
+ set
+ {
+ if (value != _shareThumb)
+ {
+ _shareThumb = value;
+ NotifyPropertyChanged("ShareThumb");
+ }
+ }
+ }
+
+ public eLayoutStyle Style
+ {
+ get { return _style; }
+ set
+ {
+ if (value != _style)
+ {
+ _style = value;
+ NotifyPropertyChanged("Style");
+ }
+ }
+ }
+
+ public eLayoutSize Size
+ {
+ get { return _size; }
+ set
+ {
+ if (value != _size)
+ {
+ _size = value;
+ NotifyPropertyChanged("Size");
+ }
+ }
+ }
+
+ public eLayoutPosition Position
+ {
+ get { return _position; }
+ set
+ {
+ if (value != _position)
+ {
+ _position = value;
+ NotifyPropertyChanged("Position");
+ }
+ }
+ }
+ }
+
+ public class Lock
+ {
+ public bool Enable { get; set; }
+ }
+
+ public class ClosedCaption
+ {
+ public bool Visible { get; set; }
+ public int FontSize { get; set; }
+ }
+
+ public class MuteUserOnEntry
+ {
+ public bool Enable { get; set; }
+ }
+
+ public class Call
+ {
+ public Sharing Sharing { get; set; }
+ public Camera Camera { get; set; }
+ public Microphone Microphone { get; set; }
+ public Layout Layout { get; set; }
+ public Lock Lock { get; set; }
+ public MuteUserOnEntry MuteUserOnEntry { get; set; }
+ public ClosedCaption ClosedCaption { get; set; }
+
+
+ public Call()
+ {
+ Sharing = new Sharing();
+ Camera = new Camera();
+ Microphone = new Microphone();
+ Layout = new Layout();
+ Lock = new Lock();
+ MuteUserOnEntry = new MuteUserOnEntry();
+ ClosedCaption = new ClosedCaption();
+ }
+ }
+
+ public class Audio
+ {
+ public Input Input { get; set; }
+ public Output Output { get; set; }
+
+ public Audio()
+ {
+ Input = new Input();
+ Output = new Output();
+ }
+ }
+
+ public class Input : Output
+ {
+ [JsonProperty("reduce_reverb")]
+ public bool ReduceReverb { get; set; }
+ }
+
+ public class Output : NotifiableObject
+ {
+ private int _volume;
+
+ [JsonProperty("volume")]
+ public int Volume
+ {
+ get
+ {
+ return _volume;
+ }
+ set
+ {
+ if (value != _volume)
+ {
+ _volume = value;
+ NotifyPropertyChanged("Volume");
+ }
+ }
+ }
+ [JsonProperty("selectedId")]
+ public string SelectedId { get; set; }
+ [JsonProperty("is_sap_disabled")]
+ public bool IsSapDisabled { get; set; }
+ }
+
+ public class Video : NotifiableObject
+ {
+ private bool _hideConfSelfVideo;
+
+ [JsonProperty("hide_conf_self_video")]
+ public bool HideConfSelfVideo
+ {
+ get
+ {
+ return _hideConfSelfVideo;
+ }
+ set
+ {
+ if (value != _hideConfSelfVideo)
+ {
+ _hideConfSelfVideo = value;
+ NotifyPropertyChanged("HideConfSelfVideo");
+ }
+ }
+ }
+
+ public VideoCamera Camera { get; set; }
+
+ public Video()
+ {
+ Camera = new VideoCamera();
+ }
+ }
+
+ public class VideoCamera : NotifiableObject
+ {
+ private string _selectedId;
+
+ [JsonProperty("selectedId")]
+ public string SelectedId
+ {
+ get
+ {
+ return _selectedId;
+ }
+ set
+ {
+ if (value != _selectedId)
+ {
+ _selectedId = value;
+ NotifyPropertyChanged("SelectedId");
+ }
+ }
+
+ }
+ public bool Mirror { get; set; }
+ }
+
+ public class Client
+ {
+ public string appVersion { get; set; }
+ public string deviceSystem { get; set; }
+
+ // This doesn't belong here, but there's a bug in the object structure of Zoom Room 5.6.3 that puts it here
+ public zConfiguration.Call Call { get; set; }
+
+ public Client()
+ {
+ Call = new zConfiguration.Call();
+ }
+ }
+
+ }
+
+ ///
+ /// zCommand class structure
+ ///
+ public class zCommand
+ {
+ public class BookingsListResult
+ {
+ [JsonProperty("accessRole")]
+ public string AccessRole { get; set; }
+ [JsonProperty("calendarChangeKey")]
+ public string CalendarChangeKey { get; set; }
+ [JsonProperty("calendarID")]
+ public string CalendarId { get; set; }
+ [JsonProperty("checkIn")]
+ public bool CheckIn { get; set; }
+ [JsonProperty("creatorEmail")]
+ public string CreatorEmail { get; set; }
+ [JsonProperty("creatorName")]
+ public string CreatorName { get; set; }
+ [JsonProperty("endTime")]
+ public DateTime EndTime { get; set; }
+ [JsonProperty("hostName")]
+ public string HostName { get; set; }
+ [JsonProperty("isInstantMeeting")]
+ public bool IsInstantMeeting { get; set; }
+ [JsonProperty("isPrivate")]
+ public bool IsPrivate { get; set; }
+ [JsonProperty("location")]
+ public string Location { get; set; }
+ [JsonProperty("meetingName")]
+ public string MeetingName { get; set; }
+ [JsonProperty("meetingNumber")]
+ public string MeetingNumber { get; set; }
+ [JsonProperty("scheduledFrom")]
+ public string ScheduledFrom { get; set; }
+ [JsonProperty("startTime")]
+ public DateTime StartTime { get; set; }
+ [JsonProperty("third_party")]
+ public ThirdParty ThirdParty { get; set; }
+ }
+
+ public static List GetGenericMeetingsFromBookingResult(List bookings,
+ int minutesBeforeMeetingStart)
+ {
+ var rv = GetGenericMeetingsFromBookingResult(bookings);
+
+ foreach (var meeting in rv)
+ {
+ meeting.MinutesBeforeMeeting = minutesBeforeMeetingStart;
+ }
+
+ return rv;
+ }
+ ///
+ /// Extracts the necessary meeting values from the Zoom bookings response and converts them to the generic class
+ ///
+ ///
+ ///
+ public static List GetGenericMeetingsFromBookingResult(List bookings)
+ {
+ var meetings = new List();
+
+ if (Debug.Level > 0)
+ {
+ Debug.Console(1, "Meetings List:\n");
+ }
+
+ foreach (var b in bookings)
+ {
+ var meeting = new Meeting();
+
+ if (b.MeetingNumber != null)
+ meeting.Id = b.MeetingNumber;
+ if (b.CreatorName != null)
+ meeting.Organizer = b.CreatorName;
+ if (b.MeetingName != null)
+ meeting.Title = b.MeetingName;
+ //if (b.Agenda != null)
+ // meeting.Agenda = b.Agenda.Value;
+ if (b.StartTime != null)
+ meeting.StartTime = b.StartTime;
+ if (b.EndTime != null)
+ meeting.EndTime = b.EndTime;
+
+ meeting.Privacy = b.IsPrivate ? eMeetingPrivacy.Private : eMeetingPrivacy.Public;
+
+ // No meeting.Calls data exists for Zoom Rooms. Leaving out for now.
+ var now = DateTime.Now;
+ if (meeting.StartTime < now && meeting.EndTime < now)
+ {
+ Debug.Console(1, "Skipping meeting {0}. Meeting is in the past.", meeting.Title);
+ continue;
+ }
+
+ meetings.Add(meeting);
+
+ if (Debug.Level > 0)
+ {
+ Debug.Console(1, "Title: {0}, ID: {1}, Organizer: {2}", meeting.Title, meeting.Id, meeting.Organizer);
+ Debug.Console(1, " Start Time: {0}, End Time: {1}, Duration: {2}", meeting.StartTime, meeting.EndTime, meeting.Duration);
+ Debug.Console(1, " Joinable: {0}\n", meeting.Joinable);
+ }
+ }
+
+ meetings.OrderBy(m => m.StartTime);
+
+ return meetings;
+ }
+
+ public class HandStatus
+ {
+ // example return of the "hand_status" object
+ // !!!! Note the properties contain ': ' within the property name !!!
+ //"hand_status": {
+ // "is_raise_hand: ": false,
+ // "is_valid: ": "on",
+ // "time_stamp: ": "11825083"
+ //},
+ [JsonProperty("is_raise_hand: ")]
+ public bool IsRaiseHand { get; set; }
+ [JsonProperty("is_valid: ")]
+ public string IsValid { get; set; }
+ [JsonProperty("time_stamp: ")]
+ public string TimeStamp { get; set; }
+ ///
+ /// Retuns a boolean value if the participant hand state is raised and is valid (both need to be true)
+ ///
+ public bool HandIsRaisedAndValid
+ {
+ get { return IsValid != null && IsValid == "on" && IsRaiseHand; }
+ }
+ }
+ public class ListParticipant
+ {
+ [JsonProperty("audio_status state")]
+ public string AudioStatusState { get; set; }
+ [JsonProperty("audio_status type")]
+ public string AudioStatusType { get; set; }
+ [JsonProperty("avatar_url")]
+ public string AvatarUrl { get; set; }
+ [JsonProperty("camera_status am_i_controlling")]
+ public bool CameraStatusAmIControlling { get; set; }
+ [JsonProperty("camera_status can_i_request_control")]
+ public bool CameraStatusCanIRequestConrol { get; set; }
+ [JsonProperty("camera_status can_move_camera")]
+ public bool CameraStatusCanMoveCamera { get; set; }
+ [JsonProperty("camera_status can_switch_camera")]
+ public bool CameraStatusCanSwitchCamera { get; set; }
+ [JsonProperty("camera_status can_zoom_camera")]
+ public bool CameraStatusCanZoomCamera { get; set; }
+ [JsonProperty("can_edit_closed_caption")]
+ public bool CanEditClosedCaption { get; set; }
+ [JsonProperty("can_record")]
+ public bool CanRecord { get; set; }
+ [JsonProperty("event")]
+ public string Event { get; set; }
+ [JsonProperty("hand_status")]
+ public HandStatus HandStatus { get; set; }
+ [JsonProperty("isCohost")]
+ public bool IsCohost { get; set; }
+ [JsonProperty("is_client_support_closed_caption")]
+ public bool IsClientSupportClosedCaption { get; set; }
+ [JsonProperty("is_client_support_coHost")]
+ public bool IsClientSupportCoHost { get; set; }
+ [JsonProperty("is_host")]
+ public bool IsHost { get; set; }
+ [JsonProperty("is_myself")]
+ public bool IsMyself { get; set; }
+ [JsonProperty("is_recording")]
+ public bool IsRecording { get; set; }
+ [JsonProperty("is_video_can_mute_byHost")]
+ public bool IsVideoCanMuteByHost { get; set; }
+ [JsonProperty("is_video_can_unmute_byHost")]
+ public bool IsVideoCanUnmuteByHost { get; set; }
+ [JsonProperty("local_recording_disabled")]
+ public bool LocalRecordingDisabled { get; set; }
+ [JsonProperty("user_id")]
+ public int UserId { get; set; }
+ [JsonProperty("user_name")]
+ public string UserName { get; set; }
+ [JsonProperty("user_type")]
+ public string UserType { get; set; }
+ [JsonProperty("video_status has_source")]
+ public bool VideoStatusHasSource { get; set; }
+ [JsonProperty("video_status is_receiving")]
+ public bool VideoStatusIsReceiving { get; set; }
+ [JsonProperty("video_status is_sending")]
+ public bool VideoStatusIsSending { get; set; }
+
+ public ListParticipant()
+ {
+ HandStatus = new HandStatus();
+ }
+
+ ///
+ /// Converts ZoomRoom pariticpant list response to an Essentials participant list
+ ///
+ ///
+ ///
+ public static List GetGenericParticipantListFromParticipantsResult(
+ List participants)
+ {
+ //return participants.Select(p => new Participant
+ // {
+ // UserId = p.UserId,
+ // Name = p.UserName,
+ // IsHost = p.IsHost,
+ // CanMuteVideo = p.IsVideoCanMuteByHost,
+ // CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
+ // AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
+ // VideoMuteFb = p.VideoStatusIsSending,
+ // HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid,
+ // }).ToList();
+
+ var sortedParticipants = SortParticipantListByHandStatus(participants);
+ return sortedParticipants.Select(p => new Participant
+ {
+ UserId = p.UserId,
+ Name = p.UserName,
+ IsHost = p.IsHost,
+ CanMuteVideo = p.IsVideoCanMuteByHost,
+ CanUnmuteVideo = p.IsVideoCanUnmuteByHost,
+ AudioMuteFb = p.AudioStatusState == "AUDIO_MUTED",
+ VideoMuteFb = p.VideoStatusIsSending,
+ HandIsRaisedFb = p.HandStatus.HandIsRaisedAndValid,
+ }).ToList();
+ }
+
+ ///
+ /// Will sort by hand-raise status and then alphabetically
+ ///
+ /// Zoom Room response list of participants
+ /// List
+ public static List SortParticipantListByHandStatus(List participants)
+ {
+ if (participants == null)
+ {
+ Debug.Console(1, "SortParticiapntListByHandStatu(participants == null)");
+ return null;
+ }
+
+ // debug testing
+ foreach (ListParticipant participant in participants)
+ {
+ Debug.Console(1, "{0} | IsValid: {1} | IsRaiseHand: {2} | HandIsRaisedAndValid: {3}",
+ participant.UserName, participant.HandStatus.IsValid, participant.HandStatus.IsRaiseHand.ToString(), participant.HandStatus.HandIsRaisedAndValid.ToString());
+ }
+
+ List handRaisedParticipantsList = participants.Where(p => p.HandStatus.HandIsRaisedAndValid).ToList();
+
+ if (handRaisedParticipantsList != null)
+ {
+ IOrderedEnumerable orderByDescending = handRaisedParticipantsList.OrderByDescending(p => p.HandStatus.TimeStamp);
+
+ foreach (var participant in handRaisedParticipantsList)
+ Debug.Console(1, "handRaisedParticipantList: {0} | {1}", participant.UserName, participant.UserId);
+ }
+
+ List allOtherParticipantsList = participants.Where(p => !p.HandStatus.HandIsRaisedAndValid).ToList();
+
+ if (allOtherParticipantsList != null)
+ {
+ allOtherParticipantsList.OrderBy(p => p.UserName);
+
+ foreach (var participant in allOtherParticipantsList)
+ Debug.Console(1, "allOtherParticipantsList: {0} | {1}", participant.UserName, participant.UserId);
+ }
+
+ // merge the lists
+ List sortedList = handRaisedParticipantsList.Union(allOtherParticipantsList).ToList();
+
+ // return the sorted list
+ return sortedList;
+ }
+
+ }
+
+ public class CallinCountryList
+ {
+ public int code { get; set; }
+ public string display_number { get; set; }
+ public string id { get; set; }
+ public string name { get; set; }
+ public string number { get; set; }
+ }
+
+ public class CalloutCountryList
+ {
+ public int code { get; set; }
+ public string display_number { get; set; }
+ public string id { get; set; }
+ public string name { get; set; }
+ public string number { get; set; }
+ }
+
+ public class TollFreeCallinList
+ {
+ public int code { get; set; }
+ public string display_number { get; set; }
+ public string id { get; set; }
+ public string name { get; set; }
+ public string number { get; set; }
+ }
+
+ public class Info
+ {
+ public List callin_country_list { get; set; }
+ public List callout_country_list { get; set; }
+ public List toll_free_callin_list { get; set; }
+ }
+
+ public class ThirdParty
+ {
+ public string h323_address { get; set; }
+ public string meeting_number { get; set; }
+ public string service_provider { get; set; }
+ public string sip_address { get; set; }
+ }
+
+ public class MeetingListItem
+ {
+ public string accessRole { get; set; }
+ public string calendarChangeKey { get; set; }
+ public string calendarID { get; set; }
+ public bool checkIn { get; set; }
+ public string creatorEmail { get; set; }
+ public string creatorName { get; set; }
+ public string endTime { get; set; }
+ public string hostName { get; set; }
+ public bool isInstantMeeting { get; set; }
+ public bool isPrivate { get; set; }
+ public string location { get; set; }
+ public string meetingName { get; set; }
+ public string meetingNumber { get; set; }
+ public string scheduledFrom { get; set; }
+ public string startTime { get; set; }
+ public ThirdParty third_party { get; set; }
+
+ public MeetingListItem()
+ {
+ third_party = new ThirdParty();
+ }
+ }
+
+ public class InfoResult
+ {
+ public Info Info { get; set; }
+ public bool am_i_original_host { get; set; }
+ public string default_callin_country { get; set; }
+ public string dialIn { get; set; }
+ public string international_url { get; set; }
+ public string invite_email_content { get; set; }
+ public string invite_email_subject { get; set; }
+ public bool is_callin_country_list_available { get; set; }
+ public bool is_calling_room_system_enabled { get; set; }
+ public bool is_toll_free_callin_list_available { get; set; }
+ public bool is_view_only { get; set; }
+ public bool is_waiting_room { get; set; }
+ public bool is_webinar { get; set; }
+ public string meeting_id { get; set; }
+ public MeetingListItem meeting_list_item { get; set; }
+ public string meeting_password { get; set; }
+ public string meeting_type { get; set; }
+ public int my_userid { get; set; }
+ public int participant_id { get; set; }
+ public string real_meeting_id { get; set; }
+ public string schedule_option { get; set; }
+ public string schedule_option2 { get; set; }
+ public string support_callout_type { get; set; }
+ public string toll_free_number { get; set; }
+ public string user_type { get; set; }
+
+ public InfoResult()
+ {
+ Info = new Info();
+ meeting_list_item = new MeetingListItem();
+ }
+ }
+
+ public class Phonebook
+ {
+ public List Contacts { get; set; }
+ public int Limit { get; set; }
+ public int Offset { get; set; }
+ }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs
index 42a389a7..2301e544 100644
--- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoom.cs
@@ -3,11 +3,13 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
+using Crestron.SimplSharp.Reflection;
using Crestron.SimplSharpPro.CrestronThread;
using Crestron.SimplSharpPro.DeviceSupport;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Core;
+using PepperDash.Core.Intersystem.Tokens;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
@@ -20,1843 +22,2154 @@ using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{
- public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor,
- IRouting,
- IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
- IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing
- {
- private const long MeetingRefreshTimer = 60000;
- private const uint DefaultMeetingDurationMin = 30;
- private const string Delimiter = "\x0D\x0A";
- private readonly CrestronQueue _receiveQueue;
+ public class ZoomRoom : VideoCodecBase, IHasCodecSelfView, IHasDirectoryHistoryStack, ICommunicationMonitor,
+ IRouting,
+ IHasScheduleAwareness, IHasCodecCameras, IHasParticipants, IHasCameraOff, IHasCameraMute, IHasCameraAutoMode,
+ IHasFarEndContentStatus, IHasSelfviewPosition, IHasPhoneDialing, IHasZoomRoomLayouts, IHasParticipantPinUnpin, IHasParticipantAudioMute
+ {
+ private const long MeetingRefreshTimer = 60000;
+ private const uint DefaultMeetingDurationMin = 30;
+ private const string Delimiter = "\x0D\x0A";
+ private readonly CrestronQueue _receiveQueue;
- private readonly Thread _receiveThread;
+ private readonly Thread _receiveThread;
- private readonly ZoomRoomSyncState _syncState;
- public bool CommDebuggingIsOn;
- private CodecDirectory _currentDirectoryResult;
- private uint _jsonCurlyBraceCounter;
- private bool _jsonFeedbackMessageIsIncoming;
- private StringBuilder _jsonMessage;
- private int _previousVolumeLevel;
- private CameraBase _selectedCamera;
+ private readonly ZoomRoomSyncState _syncState;
+ public bool CommDebuggingIsOn;
+ private CodecDirectory _currentDirectoryResult;
+ private uint _jsonCurlyBraceCounter;
+ private bool _jsonFeedbackMessageIsIncoming;
+ private StringBuilder _jsonMessage;
+ private int _previousVolumeLevel;
+ private CameraBase _selectedCamera;
- private readonly ZoomRoomPropertiesConfig _props;
+ private readonly ZoomRoomPropertiesConfig _props;
- public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
- : base(config)
- {
- _props = JsonConvert.DeserializeObject(config.Properties.ToString());
+ public ZoomRoom(DeviceConfig config, IBasicCommunication comm)
+ : base(config)
+ {
+ _props = JsonConvert.DeserializeObject(config.Properties.ToString());
- // The queue that will collect the repsonses in the order they are received
- _receiveQueue = new CrestronQueue(1024);
+ // The queue that will collect the repsonses in the order they are received
+ _receiveQueue = new CrestronQueue(1024);
- // The thread responsible for dequeuing and processing the messages
- _receiveThread = new Thread(o => ProcessQueue(), null) {Priority = Thread.eThreadPriority.MediumPriority};
+ // The thread responsible for dequeuing and processing the messages
+ _receiveThread = new Thread(o => ProcessQueue(), null) { Priority = Thread.eThreadPriority.MediumPriority };
- Communication = comm;
+ Communication = comm;
- if (_props.CommunicationMonitorProperties != null)
- {
- CommunicationMonitor = new GenericCommunicationMonitor(this, Communication,
- _props.CommunicationMonitorProperties);
- }
- else
- {
- CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000,
- "zStatus SystemUnit\r");
- }
+ if (_props.CommunicationMonitorProperties != null)
+ {
+ CommunicationMonitor = new GenericCommunicationMonitor(this, Communication,
+ _props.CommunicationMonitorProperties);
+ }
+ else
+ {
+ CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000,
+ "zStatus SystemUnit\r");
+ }
- DeviceManager.AddDevice(CommunicationMonitor);
+ DeviceManager.AddDevice(CommunicationMonitor);
- Status = new ZoomRoomStatus();
+ Status = new ZoomRoomStatus();
- Configuration = new ZoomRoomConfiguration();
+ Configuration = new ZoomRoomConfiguration();
- CodecInfo = new ZoomRoomInfo(Status, Configuration);
+ CodecInfo = new ZoomRoomInfo(Status, Configuration);
- _syncState = new ZoomRoomSyncState(Key + "--Sync", this);
+ _syncState = new ZoomRoomSyncState(Key + "--Sync", this);
- _syncState.InitialSyncCompleted += SyncState_InitialSyncCompleted;
+ _syncState.InitialSyncCompleted += SyncState_InitialSyncCompleted;
- PhonebookSyncState = new CodecPhonebookSyncState(Key + "--PhonebookSync");
+ PhonebookSyncState = new CodecPhonebookSyncState(Key + "--PhonebookSync");
- PortGather = new CommunicationGather(Communication, "\x0A") {IncludeDelimiter = true};
- PortGather.LineReceived += Port_LineReceived;
+ PortGather = new CommunicationGather(Communication, "\x0A") { IncludeDelimiter = true };
+ PortGather.LineReceived += Port_LineReceived;
- CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd,
- eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
+ CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd,
+ eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, new Action(StopSharing), this);
- Output1 = new RoutingOutputPort(RoutingPortNames.AnyVideoOut,
- eRoutingSignalType.Audio | eRoutingSignalType.Video,
- eRoutingPortConnectionType.Hdmi, null, this);
+ Output1 = new RoutingOutputPort(RoutingPortNames.AnyVideoOut,
+ eRoutingSignalType.Audio | eRoutingSignalType.Video,
+ eRoutingPortConnectionType.Hdmi, null, this);
- SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc);
+ SelfviewIsOnFeedback = new BoolFeedback(SelfViewIsOnFeedbackFunc);
- CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc);
+ CameraIsOffFeedback = new BoolFeedback(CameraIsOffFeedbackFunc);
- CameraIsMutedFeedback = CameraIsOffFeedback;
+ CameraIsMutedFeedback = CameraIsOffFeedback;
- CameraAutoModeIsOnFeedback = new BoolFeedback(CameraAutoModeIsOnFeedbackFunc);
+ CameraAutoModeIsOnFeedback = new BoolFeedback(CameraAutoModeIsOnFeedbackFunc);
- CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer);
+ CodecSchedule = new CodecScheduleAwareness(MeetingRefreshTimer);
- ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
+ ReceivingContent = new BoolFeedback(FarEndIsSharingContentFeedbackFunc);
- SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
+ SelfviewPipPositionFeedback = new StringFeedback(SelfviewPipPositionFeedbackFunc);
- SetUpFeedbackActions();
+ SetUpFeedbackActions();
- Cameras = new List();
+ Cameras = new List();
- SetUpDirectory();
+ SetUpDirectory();
- Participants = new CodecParticipants();
+ Participants = new CodecParticipants();
- SupportsCameraOff = _props.SupportsCameraOff;
- SupportsCameraAutoMode = _props.SupportsCameraAutoMode;
+ SupportsCameraOff = _props.SupportsCameraOff;
+ SupportsCameraAutoMode = _props.SupportsCameraAutoMode;
- PhoneOffHookFeedback = new BoolFeedback(PhoneOffHookFeedbackFunc);
- CallerIdNameFeedback = new StringFeedback(CallerIdNameFeedbackFunc);
- CallerIdNumberFeedback = new StringFeedback(CallerIdNumberFeedbackFunc);
- }
+ PhoneOffHookFeedback = new BoolFeedback(PhoneOffHookFeedbackFunc);
+ CallerIdNameFeedback = new StringFeedback(CallerIdNameFeedbackFunc);
+ CallerIdNumberFeedback = new StringFeedback(CallerIdNumberFeedbackFunc);
- public CommunicationGather PortGather { get; private set; }
+ LocalLayoutFeedback = new StringFeedback(LocalLayoutFeedbackFunc);
- public ZoomRoomStatus Status { get; private set; }
+ LayoutViewIsOnFirstPageFeedback = new BoolFeedback(LayoutViewIsOnFirstPageFeedbackFunc);
+ LayoutViewIsOnLastPageFeedback = new BoolFeedback(LayoutViewIsOnLastPageFeedbackFunc);
+ CanSwapContentWithThumbnailFeedback = new BoolFeedback(CanSwapContentWithThumbnailFeedbackFunc);
+ ContentSwappedWithThumbnailFeedback = new BoolFeedback(ContentSwappedWithThumbnailFeedbackFunc);
- public ZoomRoomConfiguration Configuration { get; private set; }
+ NumberOfScreensFeedback = new IntFeedback(NumberOfScreensFeedbackFunc);
- //CTimer LoginMessageReceivedTimer;
- //CTimer RetryConnectionTimer;
+ }
- ///
- /// Gets and returns the scaled volume of the codec
- ///
- protected override Func VolumeLevelFeedbackFunc
- {
- get
- {
- return () => CrestronEnvironment.ScaleWithLimits(Configuration.Audio.Output.Volume, 100, 0, 65535, 0);
- }
- }
+ public CommunicationGather PortGather { get; private set; }
- protected override Func PrivacyModeIsOnFeedbackFunc
- {
- get { return () => Configuration.Call.Microphone.Mute; }
- }
+ public ZoomRoomStatus Status { get; private set; }
- protected override Func StandbyIsOnFeedbackFunc
- {
- get { return () => false; }
- }
+ public ZoomRoomConfiguration Configuration { get; private set; }
- protected override Func SharingSourceFeedbackFunc
- {
- get { return () => Status.Sharing.dispState; }
- }
+ //CTimer LoginMessageReceivedTimer;
+ //CTimer RetryConnectionTimer;
- protected override Func SharingContentIsOnFeedbackFunc
- {
- get { return () => Status.Call.Sharing.IsSharing; }
- }
+ ///
+ /// Gets and returns the scaled volume of the codec
+ ///
+ protected override Func VolumeLevelFeedbackFunc
+ {
+ get
+ {
+ return () => CrestronEnvironment.ScaleWithLimits(Configuration.Audio.Output.Volume, 100, 0, 65535, 0);
+ }
+ }
- protected Func FarEndIsSharingContentFeedbackFunc
- {
- get { return () => Status.Call.Sharing.State == zEvent.eSharingState.Receiving; }
- }
+ protected override Func PrivacyModeIsOnFeedbackFunc
+ {
+ get { return () => Configuration.Call.Microphone.Mute; }
+ }
- protected override Func MuteFeedbackFunc
- {
- get { return () => Configuration.Audio.Output.Volume == 0; }
- }
+ protected override Func StandbyIsOnFeedbackFunc
+ {
+ get { return () => false; }
+ }
- //protected Func RoomIsOccupiedFeedbackFunc
- //{
- // get
- // {
- // return () => false;
- // }
- //}
+ protected override Func SharingSourceFeedbackFunc
+ {
+ get { return () => Status.Sharing.dispState; }
+ }
- //protected Func PeopleCountFeedbackFunc
- //{
- // get
- // {
- // return () => 0;
- // }
- //}
+ protected override Func SharingContentIsOnFeedbackFunc
+ {
+ get { return () => Status.Call.Sharing.IsSharing; }
+ }
- protected Func SelfViewIsOnFeedbackFunc
- {
- get { return () => !Configuration.Video.HideConfSelfVideo; }
- }
+ protected Func FarEndIsSharingContentFeedbackFunc
+ {
+ get { return () => Status.Call.Sharing.State == zEvent.eSharingState.Receiving; }
+ }
- protected Func CameraIsOffFeedbackFunc
- {
- get { return () => Configuration.Call.Camera.Mute; }
- }
+ protected override Func MuteFeedbackFunc
+ {
+ get { return () => Configuration.Audio.Output.Volume == 0; }
+ }
- protected Func CameraAutoModeIsOnFeedbackFunc
- {
- get { return () => false; }
- }
-
- protected Func SelfviewPipPositionFeedbackFunc
- {
- get
- {
- return
- () =>
- _currentSelfviewPipPosition != null
- ? _currentSelfviewPipPosition.Command ?? "Unknown"
- : "Unknown";
- }
- }
-
- protected Func LocalLayoutFeedbackFunc
- {
- get { return () => ""; }
- }
-
- protected Func LocalLayoutIsProminentFeedbackFunc
- {
- get { return () => false; }
- }
-
-
- public RoutingInputPort CodecOsdIn { get; private set; }
- public RoutingOutputPort Output1 { get; private set; }
-
- #region ICommunicationMonitor Members
-
- public StatusMonitorBase CommunicationMonitor { get; private set; }
-
- #endregion
-
- #region IHasCodecCameras Members
-
- public event EventHandler CameraSelected;
-
- public List Cameras { get; private set; }
-
- public CameraBase SelectedCamera
- {
- get { return _selectedCamera; }
- private set
- {
- _selectedCamera = value;
- SelectedCameraFeedback.FireUpdate();
- ControllingFarEndCameraFeedback.FireUpdate();
-
- var handler = CameraSelected;
- if (handler != null)
- {
- handler(this, new CameraSelectedEventArgs(SelectedCamera));
- }
- }
- }
-
-
- public StringFeedback SelectedCameraFeedback { get; private set; }
-
- public void SelectCamera(string key)
- {
- if (Cameras == null)
- {
- return;
- }
-
- var camera = Cameras.FirstOrDefault(c => c.Key.IndexOf(key, StringComparison.OrdinalIgnoreCase) > -1);
- if (camera != null)
- {
- Debug.Console(1, this, "Selected Camera with key: '{0}'", camera.Key);
- SelectedCamera = camera;
- }
- else
- {
- Debug.Console(1, this, "Unable to select camera with key: '{0}'", key);
- }
- }
+ //protected Func RoomIsOccupiedFeedbackFunc
+ //{
+ // get
+ // {
+ // return () => false;
+ // }
+ //}
- public CameraBase FarEndCamera { get; private set; }
+ //protected Func PeopleCountFeedbackFunc
+ //{
+ // get
+ // {
+ // return () => 0;
+ // }
+ //}
- public BoolFeedback ControllingFarEndCameraFeedback { get; private set; }
+ protected Func SelfViewIsOnFeedbackFunc
+ {
+ get { return () => !Configuration.Video.HideConfSelfVideo; }
+ }
- #endregion
+ protected Func CameraIsOffFeedbackFunc
+ {
+ get { return () => Configuration.Call.Camera.Mute; }
+ }
+
+ protected Func CameraAutoModeIsOnFeedbackFunc
+ {
+ get { return () => false; }
+ }
+
+ protected Func SelfviewPipPositionFeedbackFunc
+ {
+ get
+ {
+ return
+ () =>
+ _currentSelfviewPipPosition != null
+ ? _currentSelfviewPipPosition.Command ?? "Unknown"
+ : "Unknown";
+ }
+ }
+
+ protected Func LocalLayoutIsProminentFeedbackFunc
+ {
+ get { return () => false; }
+ }
+
+
+ public RoutingInputPort CodecOsdIn { get; private set; }
+ public RoutingOutputPort Output1 { get; private set; }
+
+ #region ICommunicationMonitor Members
+
+ public StatusMonitorBase CommunicationMonitor { get; private set; }
+
+ #endregion
+
+ #region IHasCodecCameras Members
+
+ public event EventHandler CameraSelected;
+
+ public List Cameras { get; private set; }
+
+ public CameraBase SelectedCamera
+ {
+ get { return _selectedCamera; }
+ private set
+ {
+ _selectedCamera = value;
+ SelectedCameraFeedback.FireUpdate();
+ ControllingFarEndCameraFeedback.FireUpdate();
+
+ var handler = CameraSelected;
+ if (handler != null)
+ {
+ handler(this, new CameraSelectedEventArgs(SelectedCamera));
+ }
+ }
+ }
+
+
+ public StringFeedback SelectedCameraFeedback { get; private set; }
+
+ public void SelectCamera(string key)
+ {
+ if (Cameras == null)
+ {
+ return;
+ }
+
+ var camera = Cameras.FirstOrDefault(c => c.Key.IndexOf(key, StringComparison.OrdinalIgnoreCase) > -1);
+ if (camera != null)
+ {
+ Debug.Console(1, this, "Selected Camera with key: '{0}'", camera.Key);
+ SelectedCamera = camera;
+ }
+ else
+ {
+ Debug.Console(1, this, "Unable to select camera with key: '{0}'", key);
+ }
+ }
- #region IHasCodecSelfView Members
+ public CameraBase FarEndCamera { get; private set; }
- public BoolFeedback SelfviewIsOnFeedback { get; private set; }
+ public BoolFeedback ControllingFarEndCameraFeedback { get; private set; }
- public void SelfViewModeOn()
- {
- SendText("zConfiguration Video hide_conf_self_video: off");
- }
+ #endregion
- public void SelfViewModeOff()
- {
- SendText("zConfiguration Video hide_conf_self_video: on");
- }
+ #region IHasCodecSelfView Members
- public void SelfViewModeToggle()
- {
- if (SelfviewIsOnFeedback.BoolValue)
- {
- SelfViewModeOff();
- }
- else
- {
- SelfViewModeOn();
- }
- }
+ public BoolFeedback SelfviewIsOnFeedback { get; private set; }
- #endregion
+ public void SelfViewModeOn()
+ {
+ SendText("zConfiguration Video hide_conf_self_video: off");
+ }
- #region IHasDirectoryHistoryStack Members
+ public void SelfViewModeOff()
+ {
+ SendText("zConfiguration Video hide_conf_self_video: on");
+ }
- public event EventHandler DirectoryResultReturned;
- public CodecDirectory DirectoryRoot { get; private set; }
+ public void SelfViewModeToggle()
+ {
+ if (SelfviewIsOnFeedback.BoolValue)
+ {
+ SelfViewModeOff();
+ }
+ else
+ {
+ SelfViewModeOn();
+ }
+ }
- public CodecDirectory CurrentDirectoryResult
- {
- get { return _currentDirectoryResult; }
- }
+ #endregion
- public CodecPhonebookSyncState PhonebookSyncState { get; private set; }
+ #region IHasDirectoryHistoryStack Members
- public void SearchDirectory(string searchString)
- {
- var directoryResults = new CodecDirectory();
+ public event EventHandler DirectoryResultReturned;
+ public CodecDirectory DirectoryRoot { get; private set; }
- directoryResults.AddContactsToDirectory(
- DirectoryRoot.CurrentDirectoryResults.FindAll(
- c => c.Name.IndexOf(searchString, 0, StringComparison.OrdinalIgnoreCase) > -1));
+ public CodecDirectory CurrentDirectoryResult
+ {
+ get { return _currentDirectoryResult; }
+ }
- DirectoryBrowseHistoryStack.Clear();
- _currentDirectoryResult = directoryResults;
+ public CodecPhonebookSyncState PhonebookSyncState { get; private set; }
- OnDirectoryResultReturned(directoryResults);
- }
+ public void SearchDirectory(string searchString)
+ {
+ var directoryResults = new CodecDirectory();
- public void GetDirectoryFolderContents(string folderId)
- {
- var directoryResults = new CodecDirectory {ResultsFolderId = folderId};
+ directoryResults.AddContactsToDirectory(
+ DirectoryRoot.CurrentDirectoryResults.FindAll(
+ c => c.Name.IndexOf(searchString, 0, StringComparison.OrdinalIgnoreCase) > -1));
- directoryResults.AddContactsToDirectory(
- DirectoryRoot.CurrentDirectoryResults.FindAll(c => c.ParentFolderId.Equals(folderId)));
+ DirectoryBrowseHistoryStack.Clear();
+ _currentDirectoryResult = directoryResults;
- DirectoryBrowseHistoryStack.Push(_currentDirectoryResult);
+ OnDirectoryResultReturned(directoryResults);
+ }
- _currentDirectoryResult = directoryResults;
+ public void GetDirectoryFolderContents(string folderId)
+ {
+ var directoryResults = new CodecDirectory { ResultsFolderId = folderId };
- OnDirectoryResultReturned(directoryResults);
- }
+ directoryResults.AddContactsToDirectory(
+ DirectoryRoot.CurrentDirectoryResults.FindAll(c => c.ParentFolderId.Equals(folderId)));
- public void SetCurrentDirectoryToRoot()
- {
- DirectoryBrowseHistoryStack.Clear();
+ DirectoryBrowseHistoryStack.Push(_currentDirectoryResult);
- _currentDirectoryResult = DirectoryRoot;
-
- OnDirectoryResultReturned(DirectoryRoot);
- }
-
- public void GetDirectoryParentFolderContents()
- {
- if (DirectoryBrowseHistoryStack.Count == 0)
- {
- return;
- }
-
- var currentDirectory = DirectoryBrowseHistoryStack.Pop();
-
- _currentDirectoryResult = currentDirectory;
-
- OnDirectoryResultReturned(currentDirectory);
- }
+ _currentDirectoryResult = directoryResults;
- public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; }
+ OnDirectoryResultReturned(directoryResults);
+ }
- public List DirectoryBrowseHistory { get; private set; }
+ public void SetCurrentDirectoryToRoot()
+ {
+ DirectoryBrowseHistoryStack.Clear();
- public Stack DirectoryBrowseHistoryStack { get; private set; }
-
- #endregion
-
- #region IHasScheduleAwareness Members
-
- public CodecScheduleAwareness CodecSchedule { get; private set; }
-
- public void GetSchedule()
- {
- GetBookings();
- }
-
- #endregion
-
- #region IRouting Members
-
- public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
- {
- ExecuteSwitch(inputSelector);
- }
-
- #endregion
-
- private void SyncState_InitialSyncCompleted(object sender, EventArgs e)
- {
- SetUpRouting();
-
- SetIsReady();
- }
-
- private void SetUpCallFeedbackActions()
- {
- Status.Call.Sharing.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "State")
- {
- SharingContentIsOnFeedback.FireUpdate();
- ReceivingContent.FireUpdate();
- }
- };
-
- Status.Call.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "Info")
- {
- Debug.Console(1, this, "Updating Call Status");
- UpdateCallStatus();
- }
- };
- }
-
- ///
- /// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks.
- ///
- private void SetUpFeedbackActions()
- {
- Configuration.Audio.Output.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "Volume")
- {
- VolumeLevelFeedback.FireUpdate();
- MuteFeedback.FireUpdate();
- }
- };
-
- Configuration.Call.Microphone.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "Mute")
- {
- PrivacyModeIsOnFeedback.FireUpdate();
- }
- };
-
- Configuration.Video.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "HideConfSelfVideo")
- {
- SelfviewIsOnFeedback.FireUpdate();
- }
- };
- Configuration.Video.Camera.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "SelectedId")
- {
- SelectCamera(Configuration.Video.Camera.SelectedId);
- // this will in turn fire the affected feedbacks
- }
- };
-
- Configuration.Call.Camera.PropertyChanged += (o, a) =>
- {
- Debug.Console(1, this, "Configuration.Call.Camera.PropertyChanged: {0}", a.PropertyName);
-
- if (a.PropertyName != "Mute") return;
-
- CameraIsOffFeedback.FireUpdate();
- CameraAutoModeIsOnFeedback.FireUpdate();
- };
-
- Configuration.Call.Layout.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName != "Position") return;
-
- ComputeSelfviewPipStatus();
-
- SelfviewPipPositionFeedback.FireUpdate();
- };
-
- Status.Call.Sharing.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "State")
- {
- SharingContentIsOnFeedback.FireUpdate();
- ReceivingContent.FireUpdate();
- }
- };
-
- Status.Call.PropertyChanged += (o, a) =>
- {
- if (a.PropertyName == "Info")
- {
- Debug.Console(1, this, "Updating Call Status");
- UpdateCallStatus();
- }
- };
-
- Status.Sharing.PropertyChanged += (o, a) =>
+ _currentDirectoryResult = DirectoryRoot;
+
+ OnDirectoryResultReturned(DirectoryRoot);
+ }
+
+ public void GetDirectoryParentFolderContents()
+ {
+ if (DirectoryBrowseHistoryStack.Count == 0)
+ {
+ return;
+ }
+
+ var currentDirectory = DirectoryBrowseHistoryStack.Pop();
+
+ _currentDirectoryResult = currentDirectory;
+
+ OnDirectoryResultReturned(currentDirectory);
+ }
+
+ public BoolFeedback CurrentDirectoryResultIsNotDirectoryRoot { get; private set; }
+
+ public List DirectoryBrowseHistory { get; private set; }
+
+ public Stack DirectoryBrowseHistoryStack { get; private set; }
+
+ #endregion
+
+ #region IHasScheduleAwareness Members
+
+ public CodecScheduleAwareness CodecSchedule { get; private set; }
+
+ public void GetSchedule()
+ {
+ GetBookings();
+ }
+
+ #endregion
+
+ #region IRouting Members
+
+ public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
+ {
+ ExecuteSwitch(inputSelector);
+ }
+
+ #endregion
+
+ private void SyncState_InitialSyncCompleted(object sender, EventArgs e)
+ {
+ SetUpRouting();
+
+ SetIsReady();
+ }
+
+ private void SetUpCallFeedbackActions()
+ {
+ Status.Call.Sharing.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "State")
+ {
+ SharingContentIsOnFeedback.FireUpdate();
+ ReceivingContent.FireUpdate();
+ }
+ };
+
+ Status.Call.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "Info")
+ {
+ Debug.Console(1, this, "Updating Call Status");
+ UpdateCallStatus();
+ }
+ };
+ }
+
+ ///
+ /// Subscribes to the PropertyChanged events on the state objects and fires the corresponding feedbacks.
+ ///
+ private void SetUpFeedbackActions()
+ {
+ Configuration.Audio.Output.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "Volume")
+ {
+ VolumeLevelFeedback.FireUpdate();
+ MuteFeedback.FireUpdate();
+ }
+ };
+
+ Configuration.Call.Microphone.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "Mute")
+ {
+ PrivacyModeIsOnFeedback.FireUpdate();
+ }
+ };
+
+ Configuration.Video.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "HideConfSelfVideo")
+ {
+ SelfviewIsOnFeedback.FireUpdate();
+ }
+ };
+ Configuration.Video.Camera.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "SelectedId")
+ {
+ SelectCamera(Configuration.Video.Camera.SelectedId);
+ // this will in turn fire the affected feedbacks
+ }
+ };
+
+ Configuration.Call.Camera.PropertyChanged += (o, a) =>
+ {
+ Debug.Console(1, this, "Configuration.Call.Camera.PropertyChanged: {0}", a.PropertyName);
+
+ if (a.PropertyName != "Mute") return;
+
+ CameraIsOffFeedback.FireUpdate();
+ CameraAutoModeIsOnFeedback.FireUpdate();
+ };
+
+ Configuration.Call.Layout.PropertyChanged += (o, a) =>
+ {
+ switch (a.PropertyName)
+ {
+ case "Position":
+ {
+ ComputeSelfviewPipStatus();
+
+ SelfviewPipPositionFeedback.FireUpdate();
+
+ break;
+ }
+ case "ShareThumb":
+ {
+ ContentSwappedWithThumbnailFeedback.FireUpdate();
+ break;
+ }
+ case "Style":
+ {
+ LocalLayoutFeedback.FireUpdate();
+ break;
+ }
+
+ }
+ };
+
+ // This is to deal with incorrect object structure coming back from the Zoom Room on v 5.6.3
+ Configuration.Client.Call.Layout.PropertyChanged += (o,a) =>
{
switch (a.PropertyName)
{
- case "dispState":
- SharingSourceFeedback.FireUpdate();
- break;
- case "password":
- break;
+ case "Position":
+ {
+ ComputeSelfviewPipStatus();
+
+ SelfviewPipPositionFeedback.FireUpdate();
+
+ break;
+ }
+ case "ShareThumb":
+ {
+ ContentSwappedWithThumbnailFeedback.FireUpdate();
+ break;
+ }
+ case "Style":
+ {
+ LocalLayoutFeedback.FireUpdate();
+ break;
+ }
+
}
};
- Status.PhoneCall.PropertyChanged += (o, a) =>
- {
- switch (a.PropertyName)
- {
- case "IsIncomingCall":
- Debug.Console(1, this, "Incoming Phone Call: {0}", Status.PhoneCall.IsIncomingCall);
- break;
- case "PeerDisplayName":
- Debug.Console(1, this, "Peer Display Name: {0}", Status.PhoneCall.PeerDisplayName);
- CallerIdNameFeedback.FireUpdate();
- break;
- case "PeerNumber":
- Debug.Console(1, this, "Peer Number: {0}", Status.PhoneCall.PeerNumber);
- CallerIdNumberFeedback.FireUpdate();
- break;
- case "OffHook":
- Debug.Console(1, this, "Phone is OffHook: {0}", Status.PhoneCall.OffHook);
- PhoneOffHookFeedback.FireUpdate();
- break;
- }
- };
- }
-
- private void SetUpDirectory()
- {
- DirectoryRoot = new CodecDirectory();
-
- DirectoryBrowseHistory = new List();
- DirectoryBrowseHistoryStack = new Stack();
-
- CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => _currentDirectoryResult != DirectoryRoot);
-
- CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
- }
-
- private void SetUpRouting()
- {
- // Set up input ports
- CreateOsdSource();
- InputPorts.Add(CodecOsdIn);
-
- // Set up output ports
- OutputPorts.Add(Output1);
- }
-
- ///
- /// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input
- /// to enable routing
- ///
- private void CreateOsdSource()
- {
- OsdSource = new DummyRoutingInputsDevice(Key + "[osd]");
- DeviceManager.AddDevice(OsdSource);
- var tl = new TieLine(OsdSource.AudioVideoOutputPort, CodecOsdIn);
- TieLineCollection.Default.Add(tl);
-
- //foreach(var input in Status.Video.
- }
-
- ///
- /// Starts the HTTP feedback server and syncronizes state of codec
- ///
- ///
- public override bool CustomActivate()
- {
- CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on",
- ConsoleAccessLevelEnum.AccessOperator);
- if (!_props.DisablePhonebookAutoDownload)
- {
- CrestronConsole.AddNewConsoleCommand(s => SendText("zCommand Phonebook List Offset: 0 Limit: 512"),
- "GetZoomRoomContacts", "Triggers a refresh of the codec phonebook",
- ConsoleAccessLevelEnum.AccessOperator);
- }
-
- CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
- "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
-
- var socket = Communication as ISocketStatus;
- if (socket != null)
- {
- socket.ConnectionChange += socket_ConnectionChange;
- }
-
- CommDebuggingIsOn = false;
-
- Communication.Connect();
-
- CommunicationMonitor.Start();
-
- return base.CustomActivate();
- }
-
- public void SetCommDebug(string s)
- {
- if (s == "1")
- {
- CommDebuggingIsOn = true;
- Debug.Console(0, this, "Comm Debug Enabled.");
- }
- else
- {
- CommDebuggingIsOn = false;
- Debug.Console(0, this, "Comm Debug Disabled.");
- }
- }
-
- private void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
- {
- Debug.Console(1, this, "Socket status change {0}", e.Client.ClientStatus);
- if (e.Client.IsConnected)
- {
- }
- else
- {
- _syncState.CodecDisconnected();
- PhonebookSyncState.CodecDisconnected();
- }
- }
-
- public void SendText(string command)
- {
- if (CommDebuggingIsOn)
- {
- Debug.Console(1, this, "Sending: '{0}'", command);
- }
-
- Communication.SendText(command + Delimiter);
- }
-
- ///
- /// Gathers responses and enqueues them.
- ///
- ///
- ///
- private void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args)
- {
- //if (CommDebuggingIsOn)
- // Debug.Console(1, this, "Gathered: '{0}'", args.Text);
-
- _receiveQueue.Enqueue(args.Text);
-
- // If the receive thread has for some reason stopped, this will restart it
- if (_receiveThread.ThreadState != Thread.eThreadStates.ThreadRunning)
- {
- _receiveThread.Start();
- }
- }
-
-
- ///
- /// Runs in it's own thread to dequeue messages in the order they were received to be processed
- ///
- ///
- private object ProcessQueue()
- {
- try
- {
- while (true)
- {
- var message = _receiveQueue.Dequeue();
-
- ProcessMessage(message);
- }
- }
- catch (Exception e)
- {
- Debug.Console(1, this, "Error Processing Queue: {0}", e);
- }
-
- return null;
- }
-
-
- ///
- /// Queues the initial queries to be sent upon connection
- ///
- private void SetUpSyncQueries()
- {
- // zStatus
- _syncState.AddQueryToQueue("zStatus Call Status");
- _syncState.AddQueryToQueue("zStatus Audio Input Line");
- _syncState.AddQueryToQueue("zStatus Audio Output Line");
- _syncState.AddQueryToQueue("zStatus Video Camera Line");
- _syncState.AddQueryToQueue("zStatus Video Optimizable");
- _syncState.AddQueryToQueue("zStatus Capabilities");
- _syncState.AddQueryToQueue("zStatus Sharing");
- _syncState.AddQueryToQueue("zStatus CameraShare");
- _syncState.AddQueryToQueue("zStatus Call Layout");
- _syncState.AddQueryToQueue("zStatus Call ClosedCaption Available");
- _syncState.AddQueryToQueue("zStatus NumberOfScreens");
-
- // zConfiguration
-
- _syncState.AddQueryToQueue("zConfiguration Call Sharing optimize_video_sharing");
- _syncState.AddQueryToQueue("zConfiguration Call Microphone Mute");
- _syncState.AddQueryToQueue("zConfiguration Call Camera Mute");
- _syncState.AddQueryToQueue("zConfiguration Audio Input SelectedId");
- _syncState.AddQueryToQueue("zConfiguration Audio Input is_sap_disabled");
- _syncState.AddQueryToQueue("zConfiguration Audio Input reduce_reverb");
- _syncState.AddQueryToQueue("zConfiguration Audio Input volume");
- _syncState.AddQueryToQueue("zConfiguration Audio Output selectedId");
- _syncState.AddQueryToQueue("zConfiguration Audio Output volume");
- _syncState.AddQueryToQueue("zConfiguration Video hide_conf_self_video");
- _syncState.AddQueryToQueue("zConfiguration Video Camera selectedId");
- _syncState.AddQueryToQueue("zConfiguration Video Camera Mirror");
- _syncState.AddQueryToQueue("zConfiguration Client appVersion");
- _syncState.AddQueryToQueue("zConfiguration Client deviceSystem");
- _syncState.AddQueryToQueue("zConfiguration Call Layout ShareThumb");
- _syncState.AddQueryToQueue("zConfiguration Call Layout Style");
- _syncState.AddQueryToQueue("zConfiguration Call Layout Size");
- _syncState.AddQueryToQueue("zConfiguration Call Layout Position");
- _syncState.AddQueryToQueue("zConfiguration Call Lock Enable");
- _syncState.AddQueryToQueue("zConfiguration Call MuteUserOnEntry Enable");
- _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption FontSize ");
- _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption Visible");
-
- // zCommand
-
- if (!_props.DisablePhonebookAutoDownload)
- {
- _syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 512");
- }
-
- _syncState.AddQueryToQueue("zCommand Bookings List");
- _syncState.AddQueryToQueue("zCommand Call ListParticipants");
- _syncState.AddQueryToQueue("zCommand Call Info");
-
-
- _syncState.StartSync();
- }
-
- ///
- /// Processes messages as they are dequeued
- ///
- ///
- private void ProcessMessage(string message)
- {
- // Counts the curly braces
- if (message.Contains("client_loop: send disconnect: Broken pipe"))
- {
- Debug.Console(0, this, Debug.ErrorLogLevel.Error,
- "Zoom Room Controller or App connected. Essentials will NOT control the Zoom Room until it is disconnected.");
-
- return;
- }
-
- if (message.Contains('{'))
- {
- _jsonCurlyBraceCounter++;
- }
-
- if (message.Contains('}'))
- {
- _jsonCurlyBraceCounter--;
- }
-
- Debug.Console(2, this, "JSON Curly Brace Count: {0}", _jsonCurlyBraceCounter);
-
- if (!_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "{" + Delimiter)
- // Check for the beginning of a new JSON message
- {
- _jsonFeedbackMessageIsIncoming = true;
- _jsonCurlyBraceCounter = 1; // reset the counter for each new message
-
- _jsonMessage = new StringBuilder();
-
- _jsonMessage.Append(message);
-
- if (CommDebuggingIsOn)
- {
- Debug.Console(2, this, "Incoming JSON message...");
- }
-
- return;
- }
- if (_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "}" + Delimiter)
- // Check for the end of a JSON message
- {
- _jsonMessage.Append(message);
-
- if (_jsonCurlyBraceCounter == 0)
- {
- _jsonFeedbackMessageIsIncoming = false;
-
- if (CommDebuggingIsOn)
- {
- Debug.Console(2, this, "Complete JSON Received:\n{0}", _jsonMessage.ToString());
- }
-
- // Forward the complete message to be deserialized
- DeserializeResponse(_jsonMessage.ToString());
- }
-
- //JsonMessage = new StringBuilder();
- return;
- }
-
- // NOTE: This must happen after the above conditions have been checked
- // Append subsequent partial JSON fragments to the string builder
- if (_jsonFeedbackMessageIsIncoming)
- {
- _jsonMessage.Append(message);
-
- //Debug.Console(1, this, "Building JSON:\n{0}", JsonMessage.ToString());
- return;
- }
-
- if (CommDebuggingIsOn)
- {
- Debug.Console(1, this, "Non-JSON response: '{0}'", message);
- }
-
- _jsonCurlyBraceCounter = 0; // reset on non-JSON response
-
- if (!_syncState.InitialSyncComplete)
- {
- switch (message.Trim().ToLower()) // remove the whitespace
- {
- case "*r login successful":
- {
- _syncState.LoginMessageReceived();
-
- // Fire up a thread to send the intial commands.
- CrestronInvoke.BeginInvoke(o =>
- {
- Thread.Sleep(100);
- // disable echo of commands
- SendText("echo off");
- Thread.Sleep(100);
- // set feedback exclusions
- SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callin_country_list");
- Thread.Sleep(100);
- SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callout_country_list");
- Thread.Sleep(100);
-
- if (!_props.DisablePhonebookAutoDownload)
- {
- SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact");
- }
- // switch to json format
- SendText("format json");
- });
-
- break;
- }
- }
- }
- }
-
- ///
- /// Deserializes a JSON formatted response
- ///
- ///
- private void DeserializeResponse(string response)
- {
- try
- {
- var trimmedResponse = response.Trim();
-
- if (trimmedResponse.Length <= 0)
- {
- return;
- }
-
- var message = JObject.Parse(trimmedResponse);
-
- var eType =
- (eZoomRoomResponseType)
- Enum.Parse(typeof (eZoomRoomResponseType), message["type"].Value(), true);
-
- var topKey = message["topKey"].Value();
-
- var responseObj = message[topKey];
-
- Debug.Console(1, "{0} Response Received. topKey: '{1}'\n{2}", eType, topKey, responseObj.ToString());
-
- switch (eType)
- {
- case eZoomRoomResponseType.zConfiguration:
- {
- switch (topKey.ToLower())
- {
- case "call":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Call);
-
- break;
- }
- case "audio":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Audio);
-
- break;
- }
- case "video":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Video);
-
- break;
- }
- case "client":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Client);
-
- break;
- }
- default:
- {
- break;
- }
- }
- break;
- }
- case eZoomRoomResponseType.zCommand:
- {
- switch (topKey.ToLower())
- {
- case "inforesult":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Info);
- break;
- }
- case "phonebooklistresult":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Phonebook);
-
- if (!PhonebookSyncState.InitialSyncComplete)
- {
- PhonebookSyncState.InitialPhonebookFoldersReceived();
- PhonebookSyncState.PhonebookRootEntriesReceived();
- PhonebookSyncState.SetPhonebookHasFolders(false);
- PhonebookSyncState.SetNumberOfContacts(Status.Phonebook.Contacts.Count);
- }
-
- var directoryResults =
- zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts);
-
- DirectoryRoot = directoryResults;
-
- _currentDirectoryResult = DirectoryRoot;
-
- OnDirectoryResultReturned(directoryResults);
-
- break;
- }
- case "listparticipantsresult":
- {
- Debug.Console(1, this, "JTokenType: {0}", responseObj.Type);
-
- switch (responseObj.Type)
- {
- case JTokenType.Array:
- Status.Call.Participants =
- JsonConvert.DeserializeObject>(
- responseObj.ToString());
- break;
- case JTokenType.Object:
- {
- // this is a single participant event notification
-
- var participant =
- JsonConvert.DeserializeObject(
- responseObj.ToString());
-
- if (participant != null)
- {
- switch (participant.Event)
- {
- case "ZRCUserChangedEventUserInfoUpdated":
- case "ZRCUserChangedEventLeftMeeting":
- {
- var existingParticipant =
- Status.Call.Participants.FirstOrDefault(
- p => p.UserId.Equals(participant.UserId));
-
- if (existingParticipant != null)
- {
- switch (participant.Event)
- {
- case "ZRCUserChangedEventLeftMeeting":
- Status.Call.Participants.Remove(existingParticipant);
- break;
- case "ZRCUserChangedEventUserInfoUpdated":
- JsonConvert.PopulateObject(responseObj.ToString(),
- existingParticipant);
- break;
- }
- }
- }
- break;
- case "ZRCUserChangedEventJoinedMeeting":
- Status.Call.Participants.Add(participant);
- break;
- }
- }
- }
- break;
- }
-
- var participants =
- zCommand.ListParticipant.GetGenericParticipantListFromParticipantsResult(
- Status.Call.Participants);
-
- Participants.CurrentParticipants = participants;
-
- PrintCurrentCallParticipants();
-
- break;
- }
- default:
- {
- break;
- }
- }
- break;
- }
- case eZoomRoomResponseType.zEvent:
- {
- switch (topKey.ToLower())
- {
- case "phonebook":
- {
- if (responseObj["Updated Contact"] != null)
- {
- var updatedContact =
- JsonConvert.DeserializeObject(
- responseObj["Updated Contact"].ToString());
-
- var existingContact =
- Status.Phonebook.Contacts.FirstOrDefault(c => c.Jid.Equals(updatedContact.Jid));
-
- if (existingContact != null)
- {
- // Update existing contact
- JsonConvert.PopulateObject(responseObj["Updated Contact"].ToString(),
- existingContact);
- }
- }
- else if (responseObj["Added Contact"] != null)
- {
- var jToken = responseObj["Updated Contact"];
- if (jToken != null)
- {
- var newContact =
- JsonConvert.DeserializeObject(
- jToken.ToString());
-
- // Add a new contact
- Status.Phonebook.Contacts.Add(newContact);
- }
- }
-
- break;
- }
- case "bookingslistresult":
- {
- if (!_syncState.InitialSyncComplete)
- {
- _syncState.LastQueryResponseReceived();
- }
-
- var codecBookings = JsonConvert.DeserializeObject>(
- responseObj.ToString());
-
- if (codecBookings != null && codecBookings.Count > 0)
- {
- CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
- codecBookings, CodecSchedule.MeetingWarningMinutes);
- }
-
- break;
- }
- case "bookings updated":
- {
- GetBookings();
-
- break;
- }
- case "sharingstate":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing);
-
- SetLayout();
-
- break;
- }
- case "incomingcallindication":
- {
- var incomingCall =
- JsonConvert.DeserializeObject(responseObj.ToString());
-
- if (incomingCall != null)
- {
- var newCall = new CodecActiveCallItem
- {
- Direction = eCodecCallDirection.Incoming,
- Status = eCodecCallStatus.Ringing,
- Type = eCodecCallType.Unknown,
- Name = incomingCall.callerName,
- Id = incomingCall.callerJID
- };
-
- ActiveCalls.Add(newCall);
-
- OnCallStatusChange(newCall);
- }
-
- break;
- }
- case "treatedincomingcallindication":
- {
- var incomingCall =
- JsonConvert.DeserializeObject(responseObj.ToString());
-
- if (incomingCall != null)
- {
- var existingCall =
- ActiveCalls.FirstOrDefault(c => c.Id.Equals(incomingCall.callerJID));
-
- if (existingCall != null)
- {
- existingCall.Status = !incomingCall.accepted
- ? eCodecCallStatus.Disconnected
- : eCodecCallStatus.Connecting;
-
- OnCallStatusChange(existingCall);
- }
-
- UpdateCallStatus();
- }
-
- break;
- }
- case "calldisconnect":
- {
- var disconnectEvent =
- JsonConvert.DeserializeObject(responseObj.ToString());
-
- if (disconnectEvent.Successful)
- {
- if (ActiveCalls.Count > 0)
- {
- var activeCall = ActiveCalls.FirstOrDefault(c => c.IsActiveCall);
-
- if (activeCall != null)
- {
- activeCall.Status = eCodecCallStatus.Disconnected;
-
- OnCallStatusChange(activeCall);
- }
- }
- var emptyList = new List();
- Participants.CurrentParticipants = emptyList;
- }
-
- UpdateCallStatus();
- break;
- }
- case "callconnecterror":
- {
- UpdateCallStatus();
- break;
- }
- case "videounmuterequest":
- {
- // TODO: notify room of a request to unmute video
- break;
- }
- case "meetingneedspassword":
- {
- // TODO: notify user to enter a password
- break;
- }
- case "needwaitforhost":
- {
- var needWait =
- JsonConvert.DeserializeObject(responseObj.ToString());
-
- if (needWait.Wait)
- {
- // TODO: notify user to wait for host
- }
-
- break;
- }
- case "openvideofailforhoststop":
- {
- // TODO: notify user that host has disabled unmuting video
- break;
- }
- case "updatedcallrecordinfo":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.CallRecordInfo);
-
- break;
- }
- case "phonecallstatus":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall);
- break;
- }
- default:
- {
- break;
- }
- }
- break;
- }
- case eZoomRoomResponseType.zStatus:
- {
- switch (topKey.ToLower())
- {
- case "login":
- {
- _syncState.LoginMessageReceived();
-
- if (!_syncState.InitialQueryMessagesWereSent)
- {
- SetUpSyncQueries();
- }
-
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Login);
-
- break;
- }
- case "systemunit":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.SystemUnit);
-
- break;
- }
- case "call":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Call);
-
- UpdateCallStatus();
-
- break;
- }
- case "capabilities":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Capabilities);
- break;
- }
- case "sharing":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Sharing);
-
- break;
- }
- case "numberofscreens":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.NumberOfScreens);
- break;
- }
- case "video":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Video);
- break;
- }
- case "camerashare":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.CameraShare);
- break;
- }
- case "layout":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Layout);
- break;
- }
- case "audio input line":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioInputs);
- break;
- }
- case "audio output line":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioOuputs);
- break;
- }
- case "video camera line":
- {
- JsonConvert.PopulateObject(responseObj.ToString(), Status.Cameras);
-
- if (!_syncState.CamerasHaveBeenSetUp)
- {
- SetUpCameras();
- }
-
- break;
- }
- default:
- {
- break;
- }
- }
-
- break;
- }
- default:
- {
- Debug.Console(1, "Unknown Response Type:");
- break;
- }
- }
- }
- catch (Exception ex)
- {
- Debug.Console(1, this, "Error Deserializing feedback: {0}", ex);
- }
- }
-
- private void SetLayout()
- {
- if (!_props.AutoDefaultLayouts) return;
-
- if (
- (Status.Call.Sharing.State == zEvent.eSharingState.Receiving ||
- Status.Call.Sharing.State == zEvent.eSharingState.Sending))
- {
- SendText(String.Format("zconfiguration call layout style: {0}",
- _props.DefaultSharingLayout));
- }
- else
- {
- SendText(String.Format("zconfiguration call layout style: {0}",
- _props.DefaultCallLayout));
- }
- }
-
- public void PrintCurrentCallParticipants()
- {
- if (Debug.Level <= 0)
- {
- return;
- }
-
- Debug.Console(1, this, "****************************Call Participants***************************");
- foreach (var participant in Participants.CurrentParticipants)
- {
- Debug.Console(1, this, "Name: {0} Audio: {1} IsHost: {2}", participant.Name,
- participant.AudioMuteFb, participant.IsHost);
- }
- Debug.Console(1, this, "************************************************************************");
- }
-
- ///
- /// Retrieves bookings list
- ///
- private void GetBookings()
- {
- SendText("zCommand Bookings List");
- }
-
-
- ///
- /// Updates the current call status
- ///
- private void UpdateCallStatus()
- {
- Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
- Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
-
- if (Status.Call != null)
- {
- var callStatus = Status.Call.Status;
-
- // If not currently in a meeting, intialize the call object
- if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING)
- {
- Debug.Console(1, this, "Creating new Status.Call object");
- Status.Call = new zStatus.Call {Status = callStatus};
-
- SetUpCallFeedbackActions();
- }
-
- if (ActiveCalls.Count == 0)
- {
- if (callStatus == zStatus.eCallStatus.CONNECTING_MEETING ||
- callStatus == zStatus.eCallStatus.IN_MEETING)
- {
- var newStatus = eCodecCallStatus.Unknown;
-
- switch (callStatus)
- {
- case zStatus.eCallStatus.CONNECTING_MEETING:
- newStatus = eCodecCallStatus.Connecting;
- break;
- case zStatus.eCallStatus.IN_MEETING:
- newStatus = eCodecCallStatus.Connected;
- break;
- }
-
- var newCall = new CodecActiveCallItem {Status = newStatus};
-
- ActiveCalls.Add(newCall);
-
- Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
- Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
-
- OnCallStatusChange(newCall);
- }
- }
- else
- {
- var existingCall = ActiveCalls.FirstOrDefault(c => !c.Status.Equals(eCodecCallStatus.Ringing));
-
- switch (callStatus)
- {
- case zStatus.eCallStatus.IN_MEETING:
- existingCall.Status = eCodecCallStatus.Connected;
- break;
- case zStatus.eCallStatus.NOT_IN_MEETING:
- existingCall.Status = eCodecCallStatus.Disconnected;
- break;
- }
-
- Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
- Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
-
- OnCallStatusChange(existingCall);
- }
- }
-
- Debug.Console(1, this, "****************************Active Calls*********************************");
-
- // Clean up any disconnected calls left in the list
- for (int i = 0; i < ActiveCalls.Count; i++)
- {
- var call = ActiveCalls[i];
-
- Debug.Console(1, this,
- @"Name: {0}
+ Status.Call.Sharing.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "State")
+ {
+ SharingContentIsOnFeedback.FireUpdate();
+ ReceivingContent.FireUpdate();
+ }
+ };
+
+ Status.Call.PropertyChanged += (o, a) =>
+ {
+ if (a.PropertyName == "Info")
+ {
+ Debug.Console(1, this, "Updating Call Status");
+ UpdateCallStatus();
+ }
+ };
+
+ Status.Sharing.PropertyChanged += (o, a) =>
+ {
+ switch (a.PropertyName)
+ {
+ case "dispState":
+ SharingSourceFeedback.FireUpdate();
+ break;
+ case "password":
+ break;
+ }
+ };
+
+ Status.PhoneCall.PropertyChanged += (o, a) =>
+ {
+ switch (a.PropertyName)
+ {
+ case "IsIncomingCall":
+ Debug.Console(1, this, "Incoming Phone Call: {0}", Status.PhoneCall.IsIncomingCall);
+ break;
+ case "PeerDisplayName":
+ Debug.Console(1, this, "Peer Display Name: {0}", Status.PhoneCall.PeerDisplayName);
+ CallerIdNameFeedback.FireUpdate();
+ break;
+ case "PeerNumber":
+ Debug.Console(1, this, "Peer Number: {0}", Status.PhoneCall.PeerNumber);
+ CallerIdNumberFeedback.FireUpdate();
+ break;
+ case "OffHook":
+ Debug.Console(1, this, "Phone is OffHook: {0}", Status.PhoneCall.OffHook);
+ PhoneOffHookFeedback.FireUpdate();
+ break;
+ }
+ };
+
+ Status.Layout.PropertyChanged += (o, a) =>
+ {
+ switch (a.PropertyName)
+ {
+ case "can_Switch_Speaker_View":
+ case "can_Switch_Wall_View":
+ case "can_Switch_Share_On_All_Screens":
+ {
+ ComputeAvailableLayouts();
+ break;
+ }
+ case "is_In_First_Page":
+ {
+ LayoutViewIsOnFirstPageFeedback.FireUpdate();
+ break;
+ }
+ case "is_In_Last_Page":
+ {
+ LayoutViewIsOnLastPageFeedback.FireUpdate();
+ break;
+ }
+ //case "video_type":
+ // {
+ // It appears as though the actual value we want to watch is Configuration.Call.Layout.Style
+ // LocalLayoutFeedback.FireUpdate();
+ // break;
+ // }
+ }
+ };
+
+ Status.NumberOfScreens.PropertyChanged += (o, a) =>
+ {
+ switch (a.PropertyName)
+ {
+ case "NumberOfScreens":
+ {
+ NumberOfScreensFeedback.FireUpdate();
+ break;
+ }
+ }
+ };
+ }
+
+ private void SetUpDirectory()
+ {
+ DirectoryRoot = new CodecDirectory();
+
+ DirectoryBrowseHistory = new List();
+ DirectoryBrowseHistoryStack = new Stack();
+
+ CurrentDirectoryResultIsNotDirectoryRoot = new BoolFeedback(() => _currentDirectoryResult != DirectoryRoot);
+
+ CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
+ }
+
+ private void SetUpRouting()
+ {
+ // Set up input ports
+ CreateOsdSource();
+ InputPorts.Add(CodecOsdIn);
+
+ // Set up output ports
+ OutputPorts.Add(Output1);
+ }
+
+ ///
+ /// Creates the fake OSD source, and connects it's AudioVideo output to the CodecOsdIn input
+ /// to enable routing
+ ///
+ private void CreateOsdSource()
+ {
+ OsdSource = new DummyRoutingInputsDevice(Key + "[osd]");
+ DeviceManager.AddDevice(OsdSource);
+ var tl = new TieLine(OsdSource.AudioVideoOutputPort, CodecOsdIn);
+ TieLineCollection.Default.Add(tl);
+
+ //foreach(var input in Status.Video.
+ }
+
+ ///
+ /// Starts the HTTP feedback server and syncronizes state of codec
+ ///
+ ///
+ public override bool CustomActivate()
+ {
+ CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on",
+ ConsoleAccessLevelEnum.AccessOperator);
+ if (!_props.DisablePhonebookAutoDownload)
+ {
+ CrestronConsole.AddNewConsoleCommand(s => SendText("zCommand Phonebook List Offset: 0 Limit: 512"),
+ "GetZoomRoomContacts", "Triggers a refresh of the codec phonebook",
+ ConsoleAccessLevelEnum.AccessOperator);
+ }
+
+ CrestronConsole.AddNewConsoleCommand(s => GetBookings(), "GetZoomRoomBookings",
+ "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
+
+ var socket = Communication as ISocketStatus;
+ if (socket != null)
+ {
+ socket.ConnectionChange += socket_ConnectionChange;
+ }
+
+ CommDebuggingIsOn = false;
+
+ Communication.Connect();
+
+ CommunicationMonitor.Start();
+
+ return base.CustomActivate();
+ }
+
+ public void SetCommDebug(string s)
+ {
+ if (s == "1")
+ {
+ CommDebuggingIsOn = true;
+ Debug.Console(0, this, "Comm Debug Enabled.");
+ }
+ else
+ {
+ CommDebuggingIsOn = false;
+ Debug.Console(0, this, "Comm Debug Disabled.");
+ }
+ }
+
+ private void socket_ConnectionChange(object sender, GenericSocketStatusChageEventArgs e)
+ {
+ Debug.Console(1, this, "Socket status change {0}", e.Client.ClientStatus);
+ if (e.Client.IsConnected)
+ {
+ }
+ else
+ {
+ _syncState.CodecDisconnected();
+ PhonebookSyncState.CodecDisconnected();
+ }
+ }
+
+ public void SendText(string command)
+ {
+ if (CommDebuggingIsOn)
+ {
+ Debug.Console(1, this, "Sending: '{0}'", command);
+ }
+
+ Communication.SendText(command + Delimiter);
+ }
+
+ ///
+ /// Gathers responses and enqueues them.
+ ///
+ ///
+ ///
+ private void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args)
+ {
+ //if (CommDebuggingIsOn)
+ // Debug.Console(1, this, "Gathered: '{0}'", args.Text);
+
+ _receiveQueue.Enqueue(args.Text);
+
+ // If the receive thread has for some reason stopped, this will restart it
+ if (_receiveThread.ThreadState != Thread.eThreadStates.ThreadRunning)
+ {
+ _receiveThread.Start();
+ }
+ }
+
+
+ ///
+ /// Runs in it's own thread to dequeue messages in the order they were received to be processed
+ ///
+ ///
+ private object ProcessQueue()
+ {
+ try
+ {
+ while (true)
+ {
+ var message = _receiveQueue.Dequeue();
+
+ ProcessMessage(message);
+ }
+ }
+ catch (Exception e)
+ {
+ Debug.Console(1, this, "Error Processing Queue: {0}", e);
+ }
+
+ return null;
+ }
+
+
+ ///
+ /// Queues the initial queries to be sent upon connection
+ ///
+ private void SetUpSyncQueries()
+ {
+ // zStatus
+ _syncState.AddQueryToQueue("zStatus Call Status");
+ _syncState.AddQueryToQueue("zStatus Audio Input Line");
+ _syncState.AddQueryToQueue("zStatus Audio Output Line");
+ _syncState.AddQueryToQueue("zStatus Video Camera Line");
+ _syncState.AddQueryToQueue("zStatus Video Optimizable");
+ _syncState.AddQueryToQueue("zStatus Capabilities");
+ _syncState.AddQueryToQueue("zStatus Sharing");
+ _syncState.AddQueryToQueue("zStatus CameraShare");
+ _syncState.AddQueryToQueue("zStatus Call Layout");
+ _syncState.AddQueryToQueue("zStatus Call ClosedCaption Available");
+ _syncState.AddQueryToQueue("zStatus NumberOfScreens");
+
+ // zConfiguration
+
+ _syncState.AddQueryToQueue("zConfiguration Call Sharing optimize_video_sharing");
+ _syncState.AddQueryToQueue("zConfiguration Call Microphone Mute");
+ _syncState.AddQueryToQueue("zConfiguration Call Camera Mute");
+ _syncState.AddQueryToQueue("zConfiguration Audio Input SelectedId");
+ _syncState.AddQueryToQueue("zConfiguration Audio Input is_sap_disabled");
+ _syncState.AddQueryToQueue("zConfiguration Audio Input reduce_reverb");
+ _syncState.AddQueryToQueue("zConfiguration Audio Input volume");
+ _syncState.AddQueryToQueue("zConfiguration Audio Output selectedId");
+ _syncState.AddQueryToQueue("zConfiguration Audio Output volume");
+ _syncState.AddQueryToQueue("zConfiguration Video hide_conf_self_video");
+ _syncState.AddQueryToQueue("zConfiguration Video Camera selectedId");
+ _syncState.AddQueryToQueue("zConfiguration Video Camera Mirror");
+ _syncState.AddQueryToQueue("zConfiguration Client appVersion");
+ _syncState.AddQueryToQueue("zConfiguration Client deviceSystem");
+ _syncState.AddQueryToQueue("zConfiguration Call Layout ShareThumb");
+ _syncState.AddQueryToQueue("zConfiguration Call Layout Style");
+ _syncState.AddQueryToQueue("zConfiguration Call Layout Size");
+ _syncState.AddQueryToQueue("zConfiguration Call Layout Position");
+ _syncState.AddQueryToQueue("zConfiguration Call Lock Enable");
+ _syncState.AddQueryToQueue("zConfiguration Call MuteUserOnEntry Enable");
+ _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption FontSize ");
+ _syncState.AddQueryToQueue("zConfiguration Call ClosedCaption Visible");
+
+ // zCommand
+
+ if (!_props.DisablePhonebookAutoDownload)
+ {
+ _syncState.AddQueryToQueue("zCommand Phonebook List Offset: 0 Limit: 512");
+ }
+
+ _syncState.AddQueryToQueue("zCommand Bookings List");
+ _syncState.AddQueryToQueue("zCommand Call ListParticipants");
+ _syncState.AddQueryToQueue("zCommand Call Info");
+
+
+ _syncState.StartSync();
+ }
+
+ ///
+ /// Processes messages as they are dequeued
+ ///
+ ///
+ private void ProcessMessage(string message)
+ {
+ // Counts the curly braces
+ if (message.Contains("client_loop: send disconnect: Broken pipe"))
+ {
+ Debug.Console(0, this, Debug.ErrorLogLevel.Error,
+ "Zoom Room Controller or App connected. Essentials will NOT control the Zoom Room until it is disconnected.");
+
+ return;
+ }
+
+ if (message.Contains('{'))
+ {
+ _jsonCurlyBraceCounter++;
+ }
+
+ if (message.Contains('}'))
+ {
+ _jsonCurlyBraceCounter--;
+ }
+
+ //Debug.Console(2, this, "JSON Curly Brace Count: {0}", _jsonCurlyBraceCounter);
+
+ if (!_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "{" + Delimiter)
+ // Check for the beginning of a new JSON message
+ {
+ _jsonFeedbackMessageIsIncoming = true;
+ _jsonCurlyBraceCounter = 1; // reset the counter for each new message
+
+ _jsonMessage = new StringBuilder();
+
+ _jsonMessage.Append(message);
+
+ if (CommDebuggingIsOn)
+ {
+ Debug.Console(2, this, "Incoming JSON message...");
+ }
+
+ return;
+ }
+ if (_jsonFeedbackMessageIsIncoming && message.Trim('\x20') == "}" + Delimiter)
+ // Check for the end of a JSON message
+ {
+ _jsonMessage.Append(message);
+
+ if (_jsonCurlyBraceCounter == 0)
+ {
+ _jsonFeedbackMessageIsIncoming = false;
+
+ if (CommDebuggingIsOn)
+ {
+ Debug.Console(2, this, "Complete JSON Received:\n{0}", _jsonMessage.ToString());
+ }
+
+ // Forward the complete message to be deserialized
+ DeserializeResponse(_jsonMessage.ToString());
+ }
+
+ //JsonMessage = new StringBuilder();
+ return;
+ }
+
+ // NOTE: This must happen after the above conditions have been checked
+ // Append subsequent partial JSON fragments to the string builder
+ if (_jsonFeedbackMessageIsIncoming)
+ {
+ _jsonMessage.Append(message);
+
+ //Debug.Console(1, this, "Building JSON:\n{0}", JsonMessage.ToString());
+ return;
+ }
+
+ if (CommDebuggingIsOn)
+ {
+ Debug.Console(1, this, "Non-JSON response: '{0}'", message);
+ }
+
+ _jsonCurlyBraceCounter = 0; // reset on non-JSON response
+
+ if (!_syncState.InitialSyncComplete)
+ {
+ switch (message.Trim().ToLower()) // remove the whitespace
+ {
+ case "*r login successful":
+ {
+ _syncState.LoginMessageReceived();
+
+ // Fire up a thread to send the intial commands.
+ CrestronInvoke.BeginInvoke(o =>
+ {
+ Thread.Sleep(100);
+ // disable echo of commands
+ SendText("echo off");
+ Thread.Sleep(100);
+ // set feedback exclusions
+ SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callin_country_list");
+ Thread.Sleep(100);
+ SendText("zFeedback Register Op: ex Path: /Event/InfoResult/info/callout_country_list");
+ Thread.Sleep(100);
+
+ if (!_props.DisablePhonebookAutoDownload)
+ {
+ SendText("zFeedback Register Op: ex Path: /Event/Phonebook/AddedContact");
+ }
+ // switch to json format
+ SendText("format json");
+ });
+
+ break;
+ }
+ }
+ }
+ }
+
+ ///
+ /// Deserializes a JSON formatted response
+ ///
+ ///
+ private void DeserializeResponse(string response)
+ {
+ try
+ {
+ var trimmedResponse = response.Trim();
+
+ if (trimmedResponse.Length <= 0)
+ {
+ return;
+ }
+
+ var message = JObject.Parse(trimmedResponse);
+
+ var eType =
+ (eZoomRoomResponseType)
+ Enum.Parse(typeof(eZoomRoomResponseType), message["type"].Value(), true);
+
+ var topKey = message["topKey"].Value();
+
+ var responseObj = message[topKey];
+
+ Debug.Console(1, "{0} Response Received. topKey: '{1}'\n{2}", eType, topKey, responseObj.ToString());
+
+ switch (eType)
+ {
+ case eZoomRoomResponseType.zConfiguration:
+ {
+ switch (topKey.ToLower())
+ {
+ case "call":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Call);
+
+ break;
+ }
+ case "audio":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Audio);
+
+ break;
+ }
+ case "video":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Video);
+
+ break;
+ }
+ case "client":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Configuration.Client);
+
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ break;
+ }
+ case eZoomRoomResponseType.zCommand:
+ {
+ switch (topKey.ToLower())
+ {
+ case "inforesult":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Info);
+ break;
+ }
+ case "phonebooklistresult":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Phonebook);
+
+ if (!PhonebookSyncState.InitialSyncComplete)
+ {
+ PhonebookSyncState.InitialPhonebookFoldersReceived();
+ PhonebookSyncState.PhonebookRootEntriesReceived();
+ PhonebookSyncState.SetPhonebookHasFolders(false);
+ PhonebookSyncState.SetNumberOfContacts(Status.Phonebook.Contacts.Count);
+ }
+
+ var directoryResults =
+ zStatus.Phonebook.ConvertZoomContactsToGeneric(Status.Phonebook.Contacts);
+
+ DirectoryRoot = directoryResults;
+
+ _currentDirectoryResult = DirectoryRoot;
+
+ OnDirectoryResultReturned(directoryResults);
+
+ break;
+ }
+ case "listparticipantsresult":
+ {
+ Debug.Console(1, this, "JTokenType: {0}", responseObj.Type);
+
+ switch (responseObj.Type)
+ {
+ case JTokenType.Array:
+ Status.Call.Participants =
+ JsonConvert.DeserializeObject>(
+ responseObj.ToString());
+ break;
+ case JTokenType.Object:
+ {
+ // this is a single participant event notification
+
+ var participant =
+ JsonConvert.DeserializeObject(
+ responseObj.ToString());
+
+ if (participant != null)
+ {
+ switch (participant.Event)
+ {
+ case "ZRCUserChangedEventUserInfoUpdated":
+ case "ZRCUserChangedEventLeftMeeting":
+ {
+ var existingParticipant =
+ Status.Call.Participants.FirstOrDefault(
+ p => p.UserId.Equals(participant.UserId));
+
+ if (existingParticipant != null)
+ {
+ switch (participant.Event)
+ {
+ case "ZRCUserChangedEventLeftMeeting":
+ Status.Call.Participants.Remove(existingParticipant);
+ break;
+ case "ZRCUserChangedEventUserInfoUpdated":
+ JsonConvert.PopulateObject(responseObj.ToString(),
+ existingParticipant);
+ break;
+ }
+ }
+ }
+ break;
+ case "ZRCUserChangedEventJoinedMeeting":
+ Status.Call.Participants.Add(participant);
+ break;
+ }
+ }
+ }
+ break;
+ }
+
+ var participants =
+ zCommand.ListParticipant.GetGenericParticipantListFromParticipantsResult(
+ Status.Call.Participants);
+
+ Participants.CurrentParticipants = participants;
+
+ PrintCurrentCallParticipants();
+
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ break;
+ }
+ case eZoomRoomResponseType.zEvent:
+ {
+ switch (topKey.ToLower())
+ {
+ case "phonebook":
+ {
+ if (responseObj["Updated Contact"] != null)
+ {
+ var updatedContact =
+ JsonConvert.DeserializeObject(
+ responseObj["Updated Contact"].ToString());
+
+ var existingContact =
+ Status.Phonebook.Contacts.FirstOrDefault(c => c.Jid.Equals(updatedContact.Jid));
+
+ if (existingContact != null)
+ {
+ // Update existing contact
+ JsonConvert.PopulateObject(responseObj["Updated Contact"].ToString(),
+ existingContact);
+ }
+ }
+ else if (responseObj["Added Contact"] != null)
+ {
+ var jToken = responseObj["Updated Contact"];
+ if (jToken != null)
+ {
+ var newContact =
+ JsonConvert.DeserializeObject(
+ jToken.ToString());
+
+ // Add a new contact
+ Status.Phonebook.Contacts.Add(newContact);
+ }
+ }
+
+ break;
+ }
+ case "bookingslistresult":
+ {
+ if (!_syncState.InitialSyncComplete)
+ {
+ _syncState.LastQueryResponseReceived();
+ }
+
+ var codecBookings = JsonConvert.DeserializeObject>(
+ responseObj.ToString());
+
+ if (codecBookings != null && codecBookings.Count > 0)
+ {
+ CodecSchedule.Meetings = zCommand.GetGenericMeetingsFromBookingResult(
+ codecBookings, CodecSchedule.MeetingWarningMinutes);
+ }
+
+ break;
+ }
+ case "bookings updated":
+ {
+ GetBookings();
+
+ break;
+ }
+ case "sharingstate":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.Sharing);
+
+ SetLayout();
+
+ break;
+ }
+ case "incomingcallindication":
+ {
+ var incomingCall =
+ JsonConvert.DeserializeObject(responseObj.ToString());
+
+ if (incomingCall != null)
+ {
+ var newCall = new CodecActiveCallItem
+ {
+ Direction = eCodecCallDirection.Incoming,
+ Status = eCodecCallStatus.Ringing,
+ Type = eCodecCallType.Unknown,
+ Name = incomingCall.callerName,
+ Id = incomingCall.callerJID
+ };
+
+ ActiveCalls.Add(newCall);
+
+ OnCallStatusChange(newCall);
+ }
+
+ break;
+ }
+ case "treatedincomingcallindication":
+ {
+ var incomingCall =
+ JsonConvert.DeserializeObject(responseObj.ToString());
+
+ if (incomingCall != null)
+ {
+ var existingCall =
+ ActiveCalls.FirstOrDefault(c => c.Id.Equals(incomingCall.callerJID));
+
+ if (existingCall != null)
+ {
+ existingCall.Status = !incomingCall.accepted
+ ? eCodecCallStatus.Disconnected
+ : eCodecCallStatus.Connecting;
+
+ OnCallStatusChange(existingCall);
+ }
+
+ UpdateCallStatus();
+ }
+
+ break;
+ }
+ case "calldisconnect":
+ {
+ var disconnectEvent =
+ JsonConvert.DeserializeObject(responseObj.ToString());
+
+ if (disconnectEvent.Successful)
+ {
+ if (ActiveCalls.Count > 0)
+ {
+ var activeCall = ActiveCalls.FirstOrDefault(c => c.IsActiveCall);
+
+ if (activeCall != null)
+ {
+ activeCall.Status = eCodecCallStatus.Disconnected;
+
+ OnCallStatusChange(activeCall);
+ }
+ }
+ var emptyList = new List();
+ Participants.CurrentParticipants = emptyList;
+ }
+
+ UpdateCallStatus();
+ break;
+ }
+ case "callconnecterror":
+ {
+ UpdateCallStatus();
+ break;
+ }
+ case "videounmuterequest":
+ {
+ // TODO: notify room of a request to unmute video
+ break;
+ }
+ case "meetingneedspassword":
+ {
+ // TODO: notify user to enter a password
+ break;
+ }
+ case "needwaitforhost":
+ {
+ var needWait =
+ JsonConvert.DeserializeObject(responseObj.ToString());
+
+ if (needWait.Wait)
+ {
+ // TODO: notify user to wait for host
+ }
+
+ break;
+ }
+ case "openvideofailforhoststop":
+ {
+ // TODO: notify user that host has disabled unmuting video
+ break;
+ }
+ case "updatedcallrecordinfo":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Call.CallRecordInfo);
+
+ break;
+ }
+ case "phonecallstatus":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.PhoneCall);
+ break;
+ }
+ case "pinstatusofscreennotification":
+ {
+ var status = responseObj.ToObject();
+
+ var participant = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(status.PinnedUserId));
+
+ if (participant != null)
+ {
+ participant.IsPinnedFb = true;
+ participant.ScreenIndexIsPinnedToFb = status.ScreenIndex;
+ }
+ else
+ {
+ participant = Participants.CurrentParticipants.FirstOrDefault(p => p.ScreenIndexIsPinnedToFb.Equals(status.ScreenIndex));
+
+ if (participant == null)
+ {
+ Debug.Console(2, this, "no matching participant found by pinned_user_id: {0} or screen_index: {1}", status.PinnedUserId, status.ScreenIndex);
+ return;
+ }
+ else
+ {
+ participant.IsPinnedFb = false;
+ participant.ScreenIndexIsPinnedToFb = -1;
+ }
+ }
+
+ // fire the event as we've modified the participants list
+ Participants.OnParticipantsChanged();
+
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+ break;
+ }
+ case eZoomRoomResponseType.zStatus:
+ {
+ switch (topKey.ToLower())
+ {
+ case "login":
+ {
+ _syncState.LoginMessageReceived();
+
+ if (!_syncState.InitialQueryMessagesWereSent)
+ {
+ SetUpSyncQueries();
+ }
+
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Login);
+
+ break;
+ }
+ case "systemunit":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.SystemUnit);
+
+ break;
+ }
+ case "call":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Call);
+
+ UpdateCallStatus();
+
+ break;
+ }
+ case "capabilities":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Capabilities);
+ break;
+ }
+ case "sharing":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Sharing);
+
+ break;
+ }
+ case "numberofscreens":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.NumberOfScreens);
+ break;
+ }
+ case "video":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Video);
+ break;
+ }
+ case "camerashare":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.CameraShare);
+ break;
+ }
+ case "layout":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Layout);
+ break;
+ }
+ case "audio input line":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioInputs);
+ break;
+ }
+ case "audio output line":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.AudioOuputs);
+ break;
+ }
+ case "video camera line":
+ {
+ JsonConvert.PopulateObject(responseObj.ToString(), Status.Cameras);
+
+ if (!_syncState.CamerasHaveBeenSetUp)
+ {
+ SetUpCameras();
+ }
+
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+
+ break;
+ }
+ default:
+ {
+ Debug.Console(1, "Unknown Response Type:");
+ break;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.Console(1, this, "Error Deserializing feedback: {0}", ex);
+ }
+ }
+
+ private void SetLayout()
+ {
+ if (!_props.AutoDefaultLayouts) return;
+
+ if (
+ (Status.Call.Sharing.State == zEvent.eSharingState.Receiving ||
+ Status.Call.Sharing.State == zEvent.eSharingState.Sending))
+ {
+ SendText(String.Format("zconfiguration call layout style: {0}",
+ _props.DefaultSharingLayout));
+ }
+ else
+ {
+ SendText(String.Format("zconfiguration call layout style: {0}",
+ _props.DefaultCallLayout));
+ }
+ }
+
+ public void PrintCurrentCallParticipants()
+ {
+ if (Debug.Level <= 0)
+ {
+ return;
+ }
+
+ Debug.Console(1, this, "****************************Call Participants***************************");
+ foreach (var participant in Participants.CurrentParticipants)
+ {
+ Debug.Console(1, this, "Name: {0} Audio: {1} IsHost: {2}", participant.Name,
+ participant.AudioMuteFb, participant.IsHost);
+ }
+ Debug.Console(1, this, "************************************************************************");
+ }
+
+ ///
+ /// Retrieves bookings list
+ ///
+ private void GetBookings()
+ {
+ SendText("zCommand Bookings List");
+ }
+
+
+ ///
+ /// Updates the current call status
+ ///
+ private void UpdateCallStatus()
+ {
+ Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
+ Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
+
+ if (Status.Call != null)
+ {
+ var callStatus = Status.Call.Status;
+
+ // If not currently in a meeting, intialize the call object
+ if (callStatus != zStatus.eCallStatus.IN_MEETING && callStatus != zStatus.eCallStatus.CONNECTING_MEETING)
+ {
+ Debug.Console(1, this, "Creating new Status.Call object");
+ Status.Call = new zStatus.Call { Status = callStatus };
+
+ SetUpCallFeedbackActions();
+ }
+
+ if (ActiveCalls.Count == 0)
+ {
+ if (callStatus == zStatus.eCallStatus.CONNECTING_MEETING ||
+ callStatus == zStatus.eCallStatus.IN_MEETING)
+ {
+ var newStatus = eCodecCallStatus.Unknown;
+
+ switch (callStatus)
+ {
+ case zStatus.eCallStatus.CONNECTING_MEETING:
+ newStatus = eCodecCallStatus.Connecting;
+ break;
+ case zStatus.eCallStatus.IN_MEETING:
+ newStatus = eCodecCallStatus.Connected;
+ break;
+ }
+
+ var newCall = new CodecActiveCallItem { Status = newStatus };
+
+ ActiveCalls.Add(newCall);
+
+ Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
+ Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
+
+ OnCallStatusChange(newCall);
+ }
+ }
+ else
+ {
+ var existingCall = ActiveCalls.FirstOrDefault(c => !c.Status.Equals(eCodecCallStatus.Ringing));
+
+ switch (callStatus)
+ {
+ case zStatus.eCallStatus.IN_MEETING:
+ existingCall.Status = eCodecCallStatus.Connected;
+ break;
+ case zStatus.eCallStatus.NOT_IN_MEETING:
+ existingCall.Status = eCodecCallStatus.Disconnected;
+ break;
+ }
+
+ Debug.Console(1, this, "[UpdateCallStatus] Current Call Status: {0}",
+ Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
+
+ OnCallStatusChange(existingCall);
+ }
+ }
+
+ Debug.Console(1, this, "****************************Active Calls*********************************");
+
+ // Clean up any disconnected calls left in the list
+ for (int i = 0; i < ActiveCalls.Count; i++)
+ {
+ var call = ActiveCalls[i];
+
+ Debug.Console(1, this,
+ @"Name: {0}
ID: {1}
IsActive: {2}
Status: {3}
Direction: {4}", call.Name, call.Id, call.IsActiveCall, call.Status, call.Direction);
- if (!call.IsActiveCall)
- {
- Debug.Console(1, this, "******Removing Inactive Call: {0}******", call.Name);
- ActiveCalls.Remove(call);
- }
- }
- Debug.Console(1, this, "**************************************************************************");
-
- //clear participants list after call cleanup
- if (ActiveCalls.Count == 0)
- {
- Participants.CurrentParticipants = new List();
- }
- }
-
- protected override void OnCallStatusChange(CodecActiveCallItem item)
- {
- base.OnCallStatusChange(item);
-
- Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
- Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
-
- if (_props.AutoDefaultLayouts)
- {
- SetLayout();
- }
- }
-
- public override void StartSharing()
- {
- SendText("zCommand Call Sharing HDMI Start");
- }
-
- ///
- /// Stops sharing the current presentation
- ///
- public override void StopSharing()
- {
- SendText("zCommand Call Sharing Disconnect");
- }
-
- public override void PrivacyModeOn()
- {
- SendText("zConfiguration Call Microphone Mute: on");
- }
-
- public override void PrivacyModeOff()
- {
- SendText("zConfiguration Call Microphone Mute: off");
- }
-
- public override void PrivacyModeToggle()
- {
- if (PrivacyModeIsOnFeedback.BoolValue)
- {
- PrivacyModeOff();
- }
- else
- {
- PrivacyModeOn();
- }
- }
-
- public override void MuteOff()
- {
- SetVolume((ushort) _previousVolumeLevel);
- }
-
- public override void MuteOn()
- {
- _previousVolumeLevel = Configuration.Audio.Output.Volume; // Store the previous level for recall
-
- SetVolume(0);
- }
-
- public override void MuteToggle()
- {
- if (MuteFeedback.BoolValue)
- {
- MuteOff();
- }
- else
- {
- MuteOn();
- }
- }
-
-
- ///
- /// Increments the voluem
- ///
- ///
- public override void VolumeUp(bool pressRelease)
- {
- // TODO: Implment volume decrement that calls SetVolume()
- }
-
- ///
- /// Decrements the volume
- ///
- ///
- public override void VolumeDown(bool pressRelease)
- {
- // TODO: Implment volume decrement that calls SetVolume()
- }
-
- ///
- /// Scales the level and sets the codec to the specified level within its range
- ///
- /// level from slider (0-65535 range)
- public override void SetVolume(ushort level)
- {
- var scaledLevel = CrestronEnvironment.ScaleWithLimits(level, 65535, 0, 100, 0);
- SendText(string.Format("zConfiguration Audio Output volume: {0}", scaledLevel));
- }
-
- ///
- /// Recalls the default volume on the codec
- ///
- public void VolumeSetToDefault()
- {
- }
-
- ///
- ///
- ///
- public override void StandbyActivate()
- {
- // No corresponding function on device
- }
-
- ///
- ///
- ///
- public override void StandbyDeactivate()
- {
- // No corresponding function on device
- }
-
- public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
- {
- LinkVideoCodecToApi(this, trilist, joinStart, joinMapKey, bridge);
- }
-
- public override void ExecuteSwitch(object selector)
- {
- var action = selector as Action;
- if (action == null)
- {
- return;
- }
-
- action();
- }
-
- public void AcceptCall()
- {
- var incomingCall =
- ActiveCalls.FirstOrDefault(
- c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming));
-
- AcceptCall(incomingCall);
- }
-
- public override void AcceptCall(CodecActiveCallItem call)
- {
- SendText(string.Format("zCommand Call Accept callerJID: {0}", call.Id));
-
- call.Status = eCodecCallStatus.Connected;
-
- OnCallStatusChange(call);
-
- UpdateCallStatus();
- }
-
- public void RejectCall()
- {
- var incomingCall =
- ActiveCalls.FirstOrDefault(
- c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming));
-
- RejectCall(incomingCall);
- }
-
- public override void RejectCall(CodecActiveCallItem call)
- {
- SendText(string.Format("zCommand Call Reject callerJID: {0}", call.Id));
-
- call.Status = eCodecCallStatus.Disconnected;
-
- OnCallStatusChange(call);
-
- UpdateCallStatus();
- }
-
- public override void Dial(Meeting meeting)
- {
- Debug.Console(1, this,"Dialing meeting.Id: {0} Title: {1}", meeting.Id, meeting.Title);
- SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id));
- }
-
- public override void Dial(string number)
- {
- SendText(string.Format("zCommand Dial Join meetingNumber: {0}", number));
- }
-
- ///
- /// Invites a contact to either a new meeting (if not already in a meeting) or the current meeting.
- /// Currently only invites a single user
- ///
- ///
- public override void Dial(IInvitableContact contact)
- {
- var ic = contact as zStatus.ZoomDirectoryContact;
-
- if (ic != null)
- {
- Debug.Console(1, this, "Attempting to Dial (Invite): {0}", ic.Name);
-
- if (!IsInCall)
- {
- SendText(string.Format("zCommand Invite Duration: {0} user: {1}", DefaultMeetingDurationMin,
- ic.ContactId));
- }
- else
- {
- SendText(string.Format("zCommand Call invite user: {0}", ic.ContactId));
- }
- }
- }
-
- public override void EndCall(CodecActiveCallItem call)
- {
- SendText("zCommand Call Disconnect");
- }
-
- public override void EndAllCalls()
- {
- SendText("zCommand Call Disconnect");
- }
-
- public override void SendDtmf(string s)
- {
- SendDtmfToPhone(s);
- }
-
- ///
- /// Call when directory results are updated
- ///
- ///
- private void OnDirectoryResultReturned(CodecDirectory result)
- {
- CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
-
- // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology
- var handler = DirectoryResultReturned;
- if (handler != null)
- {
- handler(this, new DirectoryEventArgs
- {
- Directory = result,
- DirectoryIsOnRoot = !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue
- });
- }
-
- //PrintDirectory(result);
- }
-
- ///
- /// Builds the cameras List by using the Zoom Room zStatus.Cameras data. Could later be modified to build from config data
- ///
- private void SetUpCameras()
- {
- SelectedCameraFeedback = new StringFeedback(() => Configuration.Video.Camera.SelectedId);
-
- ControllingFarEndCameraFeedback = new BoolFeedback(() => SelectedCamera is IAmFarEndCamera);
-
- foreach (var cam in Status.Cameras)
- {
- var camera = new ZoomRoomCamera(cam.id, cam.Name, this);
-
- Cameras.Add(camera);
-
- if (cam.Selected)
- {
- SelectedCamera = camera;
- }
- }
-
- if (IsInCall)
- {
- UpdateFarEndCameras();
- }
-
- _syncState.CamerasSetUp();
- }
-
- ///
- /// Dynamically creates far end cameras for call participants who have far end control enabled.
- ///
- private void UpdateFarEndCameras()
- {
- // TODO: set up far end cameras for the current call
- }
-
- #region Implementation of IHasParticipants
-
- public CodecParticipants Participants { get; private set; }
-
- #endregion
-
- #region Implementation of IHasCameraOff
-
- public BoolFeedback CameraIsOffFeedback { get; private set; }
-
- public void CameraOff()
- {
- CameraMuteOn();
- }
-
- #endregion
-
- public BoolFeedback CameraIsMutedFeedback { get; private set; }
-
- public void CameraMuteOn()
- {
- SendText("zConfiguration Call Camera Mute: On");
- }
+ if (!call.IsActiveCall)
+ {
+ Debug.Console(1, this, "******Removing Inactive Call: {0}******", call.Name);
+ ActiveCalls.Remove(call);
+ }
+ }
+ Debug.Console(1, this, "**************************************************************************");
+
+ //clear participants list after call cleanup
+ if (ActiveCalls.Count == 0)
+ {
+ Participants.CurrentParticipants = new List();
+ }
+ }
+
+ protected override void OnCallStatusChange(CodecActiveCallItem item)
+ {
+ base.OnCallStatusChange(item);
+
+ Debug.Console(1, this, "[OnCallStatusChange] Current Call Status: {0}",
+ Status.Call != null ? Status.Call.Sharing.State.ToString() : "no call");
+
+ if (_props.AutoDefaultLayouts)
+ {
+ SetLayout();
+ }
+ }
+
+ public override void StartSharing()
+ {
+ SendText("zCommand Call Sharing HDMI Start");
+ }
+
+ ///
+ /// Stops sharing the current presentation
+ ///
+ public override void StopSharing()
+ {
+ SendText("zCommand Call Sharing Disconnect");
+ }
+
+ public override void PrivacyModeOn()
+ {
+ SendText("zConfiguration Call Microphone Mute: on");
+ }
+
+ public override void PrivacyModeOff()
+ {
+ SendText("zConfiguration Call Microphone Mute: off");
+ }
+
+ public override void PrivacyModeToggle()
+ {
+ if (PrivacyModeIsOnFeedback.BoolValue)
+ {
+ PrivacyModeOff();
+ }
+ else
+ {
+ PrivacyModeOn();
+ }
+ }
+
+ public override void MuteOff()
+ {
+ SetVolume((ushort)_previousVolumeLevel);
+ }
+
+ public override void MuteOn()
+ {
+ _previousVolumeLevel = Configuration.Audio.Output.Volume; // Store the previous level for recall
+
+ SetVolume(0);
+ }
+
+ public override void MuteToggle()
+ {
+ if (MuteFeedback.BoolValue)
+ {
+ MuteOff();
+ }
+ else
+ {
+ MuteOn();
+ }
+ }
+
+
+ ///
+ /// Increments the voluem
+ ///
+ ///
+ public override void VolumeUp(bool pressRelease)
+ {
+ // TODO: Implment volume decrement that calls SetVolume()
+ }
+
+ ///
+ /// Decrements the volume
+ ///
+ ///
+ public override void VolumeDown(bool pressRelease)
+ {
+ // TODO: Implment volume decrement that calls SetVolume()
+ }
+
+ ///
+ /// Scales the level and sets the codec to the specified level within its range
+ ///
+ /// level from slider (0-65535 range)
+ public override void SetVolume(ushort level)
+ {
+ var scaledLevel = CrestronEnvironment.ScaleWithLimits(level, 65535, 0, 100, 0);
+ SendText(string.Format("zConfiguration Audio Output volume: {0}", scaledLevel));
+ }
+
+ ///
+ /// Recalls the default volume on the codec
+ ///
+ public void VolumeSetToDefault()
+ {
+ }
+
+ ///
+ ///
+ ///
+ public override void StandbyActivate()
+ {
+ // No corresponding function on device
+ }
+
+ ///
+ ///
+ ///
+ public override void StandbyDeactivate()
+ {
+ // No corresponding function on device
+ }
+
+ public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
+ {
+ var joinMap = new ZoomRoomJoinMap(joinStart);
+
+ var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
+
+ if (customJoins != null)
+ {
+ joinMap.SetCustomJoinData(customJoins);
+ }
+
+ if (bridge != null)
+ {
+ bridge.AddJoinMap(Key, joinMap);
+ }
+
+ LinkVideoCodecToApi(this, trilist, joinMap);
+
+ LinkZoomRoomToApi(trilist, joinMap);
+ }
+
+ ///
+ /// Links all the specific Zoom functionality to the API bridge
+ ///
+ ///
+ ///
+ public void LinkZoomRoomToApi(BasicTriList trilist, ZoomRoomJoinMap joinMap)
+ {
+ var layoutsCodec = this as IHasZoomRoomLayouts;
+ if (layoutsCodec != null)
+ {
+ layoutsCodec.AvailableLayoutsChanged += (o, a) =>
+ {
+ trilist.SetBool(joinMap.LayoutGalleryIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Gallery
+ == (a.AvailableLayouts & zConfiguration.eLayoutStyle.Gallery));
+ trilist.SetBool(joinMap.LayoutSpeakerIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Speaker
+ == (a.AvailableLayouts & zConfiguration.eLayoutStyle.Speaker));
+ trilist.SetBool(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip
+ == (a.AvailableLayouts & zConfiguration.eLayoutStyle.Strip));
+ trilist.SetBool(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll
+ == (a.AvailableLayouts & zConfiguration.eLayoutStyle.ShareAll));
+
+ // pass the names used to set the layout through the bridge
+ trilist.SetString(joinMap.LayoutGalleryIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Gallery.ToString());
+ trilist.SetString(joinMap.LayoutSpeakerIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Speaker.ToString());
+ trilist.SetString(joinMap.LayoutStripIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.Strip.ToString());
+ trilist.SetString(joinMap.LayoutShareAllIsAvailable.JoinNumber, zConfiguration.eLayoutStyle.ShareAll.ToString());
+ };
+
+ layoutsCodec.CanSwapContentWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.CanSwapContentWithThumbnail.JoinNumber]);
+ trilist.SetSigFalseAction(joinMap.SwapContentWithThumbnail.JoinNumber, () => layoutsCodec.SwapContentWithThumbnail());
+ layoutsCodec.ContentSwappedWithThumbnailFeedback.LinkInputSig(trilist.BooleanInput[joinMap.SwapContentWithThumbnail.JoinNumber]);
+
+ layoutsCodec.LayoutViewIsOnFirstPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnFirstPage.JoinNumber]);
+ layoutsCodec.LayoutViewIsOnLastPageFeedback.LinkInputSig(trilist.BooleanInput[joinMap.LayoutIsOnLastPage.JoinNumber]);
+ trilist.SetSigFalseAction(joinMap.LayoutTurnToNextPage.JoinNumber, () => layoutsCodec.LayoutTurnNextPage());
+ trilist.SetSigFalseAction(joinMap.LayoutTurnToPreviousPage.JoinNumber, () => layoutsCodec.LayoutTurnPreviousPage());
+ trilist.SetSigFalseAction(joinMap.GetAvailableLayouts.JoinNumber, () => layoutsCodec.GetAvailableLayouts());
+
+ trilist.SetStringSigAction(joinMap.GetSetCurrentLayout.JoinNumber, (s) =>
+ {
+ try
+ {
+ var style = (zConfiguration.eLayoutStyle)Enum.Parse(typeof(zConfiguration.eLayoutStyle), s, true);
+ SetLayout(style);
+ }
+ catch (Exception e)
+ {
+ Debug.Console(1, this, "Unable to parse '{0}' to zConfiguration.eLayoutStyle: {1}", s, e);
+ }
+ });
+
+ layoutsCodec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.GetSetCurrentLayout.JoinNumber]);
+ }
+
+ var pinCodec = this as IHasParticipantPinUnpin;
+ if (pinCodec != null)
+ {
+ pinCodec.NumberOfScreensFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfScreens.JoinNumber]);
+
+ // Set the value of the local property to be used when pinning a participant
+ trilist.SetUShortSigAction(joinMap.ScreenIndexToPinUserTo.JoinNumber, (u) => ScreenIndexToPinUserTo = u);
+ }
+ }
+
+ public override void ExecuteSwitch(object selector)
+ {
+ var action = selector as Action;
+ if (action == null)
+ {
+ return;
+ }
+
+ action();
+ }
+
+ public void AcceptCall()
+ {
+ var incomingCall =
+ ActiveCalls.FirstOrDefault(
+ c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming));
+
+ AcceptCall(incomingCall);
+ }
+
+ public override void AcceptCall(CodecActiveCallItem call)
+ {
+ SendText(string.Format("zCommand Call Accept callerJID: {0}", call.Id));
+
+ call.Status = eCodecCallStatus.Connected;
+
+ OnCallStatusChange(call);
+
+ UpdateCallStatus();
+ }
+
+ public void RejectCall()
+ {
+ var incomingCall =
+ ActiveCalls.FirstOrDefault(
+ c => c.Status.Equals(eCodecCallStatus.Ringing) && c.Direction.Equals(eCodecCallDirection.Incoming));
+
+ RejectCall(incomingCall);
+ }
+
+ public override void RejectCall(CodecActiveCallItem call)
+ {
+ SendText(string.Format("zCommand Call Reject callerJID: {0}", call.Id));
+
+ call.Status = eCodecCallStatus.Disconnected;
+
+ OnCallStatusChange(call);
+
+ UpdateCallStatus();
+ }
+
+ public override void Dial(Meeting meeting)
+ {
+ Debug.Console(1, this, "Dialing meeting.Id: {0} Title: {1}", meeting.Id, meeting.Title);
+ SendText(string.Format("zCommand Dial Start meetingNumber: {0}", meeting.Id));
+ }
+
+ public override void Dial(string number)
+ {
+ SendText(string.Format("zCommand Dial Join meetingNumber: {0}", number));
+ }
+
+ ///
+ /// Invites a contact to either a new meeting (if not already in a meeting) or the current meeting.
+ /// Currently only invites a single user
+ ///
+ ///
+ public override void Dial(IInvitableContact contact)
+ {
+ var ic = contact as zStatus.ZoomDirectoryContact;
+
+ if (ic != null)
+ {
+ Debug.Console(1, this, "Attempting to Dial (Invite): {0}", ic.Name);
+
+ if (!IsInCall)
+ {
+ SendText(string.Format("zCommand Invite Duration: {0} user: {1}", DefaultMeetingDurationMin,
+ ic.ContactId));
+ }
+ else
+ {
+ SendText(string.Format("zCommand Call invite user: {0}", ic.ContactId));
+ }
+ }
+ }
+
+ public override void EndCall(CodecActiveCallItem call)
+ {
+ SendText("zCommand Call Disconnect");
+ }
+
+ public override void EndAllCalls()
+ {
+ SendText("zCommand Call Disconnect");
+ }
+
+ public override void SendDtmf(string s)
+ {
+ SendDtmfToPhone(s);
+ }
+
+ ///
+ /// Call when directory results are updated
+ ///
+ ///
+ private void OnDirectoryResultReturned(CodecDirectory result)
+ {
+ CurrentDirectoryResultIsNotDirectoryRoot.FireUpdate();
+
+ // This will return the latest results to all UIs. Multiple indendent UI Directory browsing will require a different methodology
+ var handler = DirectoryResultReturned;
+ if (handler != null)
+ {
+ handler(this, new DirectoryEventArgs
+ {
+ Directory = result,
+ DirectoryIsOnRoot = !CurrentDirectoryResultIsNotDirectoryRoot.BoolValue
+ });
+ }
+
+ //PrintDirectory(result);
+ }
+
+ ///
+ /// Builds the cameras List by using the Zoom Room zStatus.Cameras data. Could later be modified to build from config data
+ ///
+ private void SetUpCameras()
+ {
+ SelectedCameraFeedback = new StringFeedback(() => Configuration.Video.Camera.SelectedId);
+
+ ControllingFarEndCameraFeedback = new BoolFeedback(() => SelectedCamera is IAmFarEndCamera);
+
+ foreach (var cam in Status.Cameras)
+ {
+ var camera = new ZoomRoomCamera(cam.id, cam.Name, this);
+
+ Cameras.Add(camera);
+
+ if (cam.Selected)
+ {
+ SelectedCamera = camera;
+ }
+ }
+
+ if (IsInCall)
+ {
+ UpdateFarEndCameras();
+ }
+
+ _syncState.CamerasSetUp();
+ }
+
+ ///
+ /// Dynamically creates far end cameras for call participants who have far end control enabled.
+ ///
+ private void UpdateFarEndCameras()
+ {
+ // TODO: set up far end cameras for the current call
+ }
+
+ #region Implementation of IHasParticipants
+
+ public CodecParticipants Participants { get; private set; }
+
+ #endregion
+
+ #region IHasParticipantAudioMute Members
+
+ public void MuteAudioForParticipant(int userId)
+ {
+ SendText(string.Format("zCommand Call MuteParticipant Mute: on Id: {0}", userId));
+ }
+
+ public void UnmuteAudioForParticipant(int userId)
+ {
+ SendText(string.Format("zCommand Call MuteParticipant Mute: off Id: {0}", userId));
+ }
+
+ public void ToggleAudioForParticipant(int userId)
+ {
+ var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId));
+
+ if (user == null)
+ {
+ Debug.Console(2, this, "Unable to find user with id: {0}", userId);
+ return;
+ }
+
+ if (user.AudioMuteFb)
+ {
+ UnmuteAudioForParticipant(userId);
+ }
+ else
+ {
+ MuteAudioForParticipant(userId);
+ }
+ }
+
+ #endregion
+
+ #region IHasParticipantVideoMute Members
+
+ public void MuteVideoForParticipant(int userId)
+ {
+ SendText(string.Format("zCommand Call MuteParticipantVideo Mute: on Id: {0}", userId));
+ }
+
+ public void UnmuteVideoForParticipant(int userId)
+ {
+ SendText(string.Format("zCommand Call MuteParticipantVideo Mute: off Id: {0}", userId));
+ }
+
+ public void ToggleVideoForParticipant(int userId)
+ {
+ var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId));
+
+ if (user == null)
+ {
+ Debug.Console(2, this, "Unable to find user with id: {0}", userId);
+ return;
+ }
+
+ if (user.VideoMuteFb)
+ {
+ UnmuteVideoForParticipant(userId);
+ }
+ else
+ {
+ MuteVideoForParticipant(userId);
+ }
+ }
+
+ #endregion
+
+ #region IHasParticipantPinUnpin Members
- public void CameraMuteOff()
- {
- SendText("zConfiguration Call Camera Mute: Off");
- }
+ private Func NumberOfScreensFeedbackFunc { get { return () => Status.NumberOfScreens.NumOfScreens; } }
- public void CameraMuteToggle()
- {
- if (CameraIsMutedFeedback.BoolValue)
- CameraMuteOff();
- else
- CameraMuteOn();
- }
+ public IntFeedback NumberOfScreensFeedback { get; private set; }
- #region Implementation of IHasCameraAutoMode
+ public int ScreenIndexToPinUserTo { get; private set; }
- //Zoom doesn't support camera auto modes. Setting this to just unmute video
- public void CameraAutoModeOn()
- {
- CameraMuteOff();
- throw new NotImplementedException("Zoom Room Doesn't support camera auto mode");
- }
+ public void PinParticipant(int userId, int screenIndex)
+ {
+ SendText(string.Format("zCommand Call Pin Id: {0} Enable: on Screen: {1}", userId, screenIndex));
+ }
- //Zoom doesn't support camera auto modes. Setting this to just unmute video
- public void CameraAutoModeOff()
- {
- SendText("zConfiguration Call Camera Mute: Off");
- }
+ public void UnPinParticipant(int userId)
+ {
+ SendText(string.Format("zCommand Call Pin Id: {0} Enable: off", userId));
+ }
- public void CameraAutoModeToggle()
- {
- throw new NotImplementedException("Zoom Room doesn't support camera auto mode");
- }
+ public void ToggleParticipantPinState(int userId, int screenIndex)
+ {
+ var user = Participants.CurrentParticipants.FirstOrDefault(p => p.UserId.Equals(userId));
- public BoolFeedback CameraAutoModeIsOnFeedback { get; private set; }
+ if (user == null)
+ {
+ Debug.Console(2, this, "Unable to find user with id: {0}", userId);
+ return;
+ }
- #endregion
+ if (user.IsPinnedFb)
+ {
+ UnPinParticipant(userId);
+ }
+ else
+ {
+ PinParticipant(userId, screenIndex);
+ }
+ }
- #region Implementation of IHasFarEndContentStatus
+ #endregion
+
+ #region Implementation of IHasCameraOff
- public BoolFeedback ReceivingContent { get; private set; }
+ public BoolFeedback CameraIsOffFeedback { get; private set; }
- #endregion
+ public void CameraOff()
+ {
+ CameraMuteOn();
+ }
- #region Implementation of IHasSelfviewPosition
+ #endregion
- private CodecCommandWithLabel _currentSelfviewPipPosition;
+ public BoolFeedback CameraIsMutedFeedback { get; private set; }
- public StringFeedback SelfviewPipPositionFeedback { get; private set; }
+ public void CameraMuteOn()
+ {
+ SendText("zConfiguration Call Camera Mute: On");
+ }
- public void SelfviewPipPositionSet(CodecCommandWithLabel position)
- {
- SendText(String.Format("zConfiguration Call Layout Position: {0}", position.Command));
- }
+ public void CameraMuteOff()
+ {
+ SendText("zConfiguration Call Camera Mute: Off");
+ }
- public void SelfviewPipPositionToggle()
- {
- if (_currentSelfviewPipPosition != null)
- {
- var nextPipPositionIndex = SelfviewPipPositions.IndexOf(_currentSelfviewPipPosition) + 1;
+ public void CameraMuteToggle()
+ {
+ if (CameraIsMutedFeedback.BoolValue)
+ CameraMuteOff();
+ else
+ CameraMuteOn();
+ }
- if (nextPipPositionIndex >= SelfviewPipPositions.Count)
- // Check if we need to loop back to the first item in the list
- nextPipPositionIndex = 0;
+ #region Implementation of IHasCameraAutoMode
- SelfviewPipPositionSet(SelfviewPipPositions[nextPipPositionIndex]);
- }
- }
+ //Zoom doesn't support camera auto modes. Setting this to just unmute video
+ public void CameraAutoModeOn()
+ {
+ CameraMuteOff();
+ throw new NotImplementedException("Zoom Room Doesn't support camera auto mode");
+ }
- public List SelfviewPipPositions = new List()
+ //Zoom doesn't support camera auto modes. Setting this to just unmute video
+ public void CameraAutoModeOff()
+ {
+ SendText("zConfiguration Call Camera Mute: Off");
+ }
+
+ public void CameraAutoModeToggle()
+ {
+ throw new NotImplementedException("Zoom Room doesn't support camera auto mode");
+ }
+
+ public BoolFeedback CameraAutoModeIsOnFeedback { get; private set; }
+
+ #endregion
+
+ #region Implementation of IHasFarEndContentStatus
+
+ public BoolFeedback ReceivingContent { get; private set; }
+
+ #endregion
+
+ #region Implementation of IHasSelfviewPosition
+
+ private CodecCommandWithLabel _currentSelfviewPipPosition;
+
+ public StringFeedback SelfviewPipPositionFeedback { get; private set; }
+
+ public void SelfviewPipPositionSet(CodecCommandWithLabel position)
+ {
+ SendText(String.Format("zConfiguration Call Layout Position: {0}", position.Command));
+ }
+
+ public void SelfviewPipPositionToggle()
+ {
+ if (_currentSelfviewPipPosition != null)
+ {
+ var nextPipPositionIndex = SelfviewPipPositions.IndexOf(_currentSelfviewPipPosition) + 1;
+
+ if (nextPipPositionIndex >= SelfviewPipPositions.Count)
+ // Check if we need to loop back to the first item in the list
+ nextPipPositionIndex = 0;
+
+ SelfviewPipPositionSet(SelfviewPipPositions[nextPipPositionIndex]);
+ }
+ }
+
+ public List SelfviewPipPositions = new List()
{
new CodecCommandWithLabel("UpLeft", "Center Left"),
new CodecCommandWithLabel("UpRight", "Center Right"),
@@ -1864,265 +2177,396 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
new CodecCommandWithLabel("DownLeft", "Lower Left")
};
- private void ComputeSelfviewPipStatus()
- {
- _currentSelfviewPipPosition =
- SelfviewPipPositions.FirstOrDefault(
- p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower()));
- }
+ private void ComputeSelfviewPipStatus()
+ {
+ _currentSelfviewPipPosition =
+ SelfviewPipPositions.FirstOrDefault(
+ p => p.Command.ToLower().Equals(Configuration.Call.Layout.Position.ToString().ToLower()));
+ }
- #endregion
+ #endregion
- #region Implementation of IHasPhoneDialing
+ #region Implementation of IHasPhoneDialing
- private Func PhoneOffHookFeedbackFunc {get {return () => Status.PhoneCall.OffHook; }}
- private Func CallerIdNameFeedbackFunc { get { return () => Status.PhoneCall.PeerDisplayName; } }
- private Func CallerIdNumberFeedbackFunc { get { return () => Status.PhoneCall.PeerNumber; } }
+ private Func PhoneOffHookFeedbackFunc { get { return () => Status.PhoneCall.OffHook; } }
+ private Func CallerIdNameFeedbackFunc { get { return () => Status.PhoneCall.PeerDisplayName; } }
+ private Func CallerIdNumberFeedbackFunc { get { return () => Status.PhoneCall.PeerNumber; } }
- public BoolFeedback PhoneOffHookFeedback { get; private set; }
- public StringFeedback CallerIdNameFeedback { get; private set; }
- public StringFeedback CallerIdNumberFeedback { get; private set; }
+ public BoolFeedback PhoneOffHookFeedback { get; private set; }
+ public StringFeedback CallerIdNameFeedback { get; private set; }
+ public StringFeedback CallerIdNumberFeedback { get; private set; }
- public void DialPhoneCall(string number)
- {
- SendText(String.Format("zCommand Dial PhoneCallOut Number: {0}", number));
- }
+ public void DialPhoneCall(string number)
+ {
+ SendText(String.Format("zCommand Dial PhoneCallOut Number: {0}", number));
+ }
- public void EndPhoneCall()
- {
- SendText(String.Format("zCommand Dial PhoneHangUp CallId: {0}", Status.PhoneCall.CallId));
- }
+ public void EndPhoneCall()
+ {
+ SendText(String.Format("zCommand Dial PhoneHangUp CallId: {0}", Status.PhoneCall.CallId));
+ }
- public void SendDtmfToPhone(string digit)
- {
- SendText(String.Format("zCommand SendSipDTMF CallId: {0} Key: {1}", Status.PhoneCall.CallId, digit));
- }
+ public void SendDtmfToPhone(string digit)
+ {
+ SendText(String.Format("zCommand SendSipDTMF CallId: {0} Key: {1}", Status.PhoneCall.CallId, digit));
+ }
- #endregion
- }
+ #endregion
- ///
- /// Zoom Room specific info object
- ///
- public class ZoomRoomInfo : VideoCodecInfo
- {
- public ZoomRoomInfo(ZoomRoomStatus status, ZoomRoomConfiguration configuration)
- {
- Status = status;
- Configuration = configuration;
- }
+ #region IHasZoomRoomLayouts Members
- public ZoomRoomStatus Status { get; private set; }
- public ZoomRoomConfiguration Configuration { get; private set; }
+ public event EventHandler AvailableLayoutsChanged;
- public override bool AutoAnswerEnabled
- {
- get { return Status.SystemUnit.RoomInfo.AutoAnswerIsEnabled; }
- }
+ private Func LayoutViewIsOnFirstPageFeedbackFunc { get { return () => Status.Layout.is_In_First_Page; } }
+ private Func LayoutViewIsOnLastPageFeedbackFunc { get { return () => Status.Layout.is_In_Last_Page; } }
+ private Func CanSwapContentWithThumbnailFeedbackFunc { get { return () => Status.Layout.can_Switch_Floating_Share_Content; } }
+ private Func ContentSwappedWithThumbnailFeedbackFunc { get { return () => Configuration.Call.Layout.ShareThumb; } }
- public override string E164Alias
+ public BoolFeedback LayoutViewIsOnFirstPageFeedback { get; private set; }
+
+ public BoolFeedback LayoutViewIsOnLastPageFeedback { get; private set; }
+
+ public BoolFeedback CanSwapContentWithThumbnailFeedback { get; private set; }
+
+ public BoolFeedback ContentSwappedWithThumbnailFeedback { get; private set; }
+
+
+ public zConfiguration.eLayoutStyle LastSelectedLayout { get; private set; }
+
+ public zConfiguration.eLayoutStyle AvailableLayouts { get; private set; }
+
+ ///
+ /// Reads individual properties to determine if which layouts are avalailable
+ ///
+ private void ComputeAvailableLayouts()
+ {
+ zConfiguration.eLayoutStyle availableLayouts = zConfiguration.eLayoutStyle.None;
+ // TODO: #697 [X] Compute the avaialble layouts and set the value of AvailableLayouts
+ // Will need to test and confirm that this logic evaluates correctly
+ if (Status.Layout.can_Switch_Wall_View)
+ {
+ availableLayouts |= zConfiguration.eLayoutStyle.Gallery;
+ }
+
+ if (Status.Layout.can_Switch_Speaker_View)
+ {
+ availableLayouts |= zConfiguration.eLayoutStyle.Speaker;
+ }
+
+ if (Status.Layout.can_Switch_Share_On_All_Screens)
+ {
+ availableLayouts |= zConfiguration.eLayoutStyle.ShareAll;
+ }
+
+ // There is no property that directly reports if strip mode is valid, but API stipulates
+ // that strip mode is available if the number of screens is 1
+ if (Status.NumberOfScreens.NumOfScreens == 1)
+ {
+ availableLayouts |= zConfiguration.eLayoutStyle.Strip;
+ }
+
+ var handler = AvailableLayoutsChanged;
+ if (handler != null)
+ {
+ handler(this, new LayoutInfoChangedEventArgs() { AvailableLayouts = availableLayouts });
+ }
+
+ AvailableLayouts = availableLayouts;
+ }
+
+ public void GetAvailableLayouts()
+ {
+ SendText("zStatus Call Layout");
+ }
+
+ public void SetLayout(zConfiguration.eLayoutStyle layoutStyle)
+ {
+ LastSelectedLayout = layoutStyle;
+ SendText(String.Format("zConfiguration Call Layout Style: {0}", layoutStyle.ToString()));
+ }
+
+ public void SwapContentWithThumbnail()
+ {
+ if (CanSwapContentWithThumbnailFeedback.BoolValue)
+ {
+ var oppositeValue = ContentSwappedWithThumbnailFeedback.BoolValue ? "on" : "off"; // Get the value based on the opposite of the current state
+ // TODO: #697 [*] Need to verify the ternary above and make sure that the correct on/off value is being send based on the true/false value of the feedback
+ // to toggle the state
+ SendText(String.Format("zConfiguration Call Layout ShareThumb: {0}", oppositeValue));
+ }
+ }
+
+ public void LayoutTurnNextPage()
+ {
+ SendText("zCommand Call Layout TurnPage Forward: On");
+ }
+
+ public void LayoutTurnPreviousPage()
+ {
+ SendText("zCommand Call Layout TurnPage Forward: Off");
+ }
+
+ #endregion
+
+ #region IHasCodecLayouts Members
+
+ private Func LocalLayoutFeedbackFunc
{
get
{
- if (!string.IsNullOrEmpty(Status.SystemUnit.MeetingNumber))
- {
- return Status.SystemUnit.MeetingNumber;
- }
- return string.Empty;
- }
- }
-
- public override string H323Id
- {
- get
- {
- if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.h323_address))
- {
- return Status.Call.Info.meeting_list_item.third_party.h323_address;
- }
- return string.Empty;
- }
- }
-
- public override string IpAddress
- {
- get
- {
- if (!string.IsNullOrEmpty(Status.SystemUnit.RoomInfo.AccountEmail))
- {
- return Status.SystemUnit.RoomInfo.AccountEmail;
- }
- return string.Empty;
- }
- }
-
- public override bool MultiSiteOptionIsEnabled
- {
- get { return true; }
- }
-
- public override string SipPhoneNumber
- {
- get
- {
- if (!string.IsNullOrEmpty(Status.Call.Info.dialIn))
- {
- return Status.Call.Info.dialIn;
- }
- return string.Empty;
- }
- }
-
- public override string SipUri
- {
- get
- {
- if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.sip_address))
- {
- return Status.Call.Info.meeting_list_item.third_party.sip_address;
- }
- return string.Empty;
- }
- }
- }
-
- ///
- /// Tracks the initial sycnronization state when establishing a new connection
- ///
- public class ZoomRoomSyncState : IKeyed
- {
- private readonly ZoomRoom _parent;
- private readonly CrestronQueue _syncQueries;
- private bool _initialSyncComplete;
-
- public ZoomRoomSyncState(string key, ZoomRoom parent)
- {
- _parent = parent;
- Key = key;
- _syncQueries = new CrestronQueue(50);
- CodecDisconnected();
- }
-
- public bool InitialSyncComplete
- {
- get { return _initialSyncComplete; }
- private set
- {
- if (value)
- {
- var handler = InitialSyncCompleted;
- if (handler != null)
+ return () =>
{
- handler(this, new EventArgs());
- }
- }
- _initialSyncComplete = value;
+ if (Configuration.Call.Layout.Style != zConfiguration.eLayoutStyle.None)
+ return Configuration.Call.Layout.Style.ToString();
+ else
+ return Configuration.Client.Call.Layout.Style.ToString();
+ };
}
}
- public bool LoginMessageWasReceived { get; private set; }
+ public StringFeedback LocalLayoutFeedback { get; private set; }
- public bool InitialQueryMessagesWereSent { get; private set; }
+ public void LocalLayoutToggle()
+ {
+ throw new NotImplementedException();
+ }
- public bool LastQueryResponseWasReceived { get; private set; }
+ public void LocalLayoutToggleSingleProminent()
+ {
+ throw new NotImplementedException();
+ }
- public bool CamerasHaveBeenSetUp { get; private set; }
+ public void MinMaxLayoutToggle()
+ {
+ throw new NotImplementedException();
+ }
- #region IKeyed Members
+ #endregion
- public string Key { get; private set; }
+ }
- #endregion
+ ///
+ /// Zoom Room specific info object
+ ///
+ public class ZoomRoomInfo : VideoCodecInfo
+ {
+ public ZoomRoomInfo(ZoomRoomStatus status, ZoomRoomConfiguration configuration)
+ {
+ Status = status;
+ Configuration = configuration;
+ }
- public event EventHandler InitialSyncCompleted;
+ public ZoomRoomStatus Status { get; private set; }
+ public ZoomRoomConfiguration Configuration { get; private set; }
- public void StartSync()
- {
- DequeueQueries();
- }
+ public override bool AutoAnswerEnabled
+ {
+ get { return Status.SystemUnit.RoomInfo.AutoAnswerIsEnabled; }
+ }
- private void DequeueQueries()
- {
- while (!_syncQueries.IsEmpty)
- {
- var query = _syncQueries.Dequeue();
+ public override string E164Alias
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Status.SystemUnit.MeetingNumber))
+ {
+ return Status.SystemUnit.MeetingNumber;
+ }
+ return string.Empty;
+ }
+ }
- _parent.SendText(query);
- }
+ public override string H323Id
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.h323_address))
+ {
+ return Status.Call.Info.meeting_list_item.third_party.h323_address;
+ }
+ return string.Empty;
+ }
+ }
- InitialQueryMessagesSent();
- }
+ public override string IpAddress
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Status.SystemUnit.RoomInfo.AccountEmail))
+ {
+ return Status.SystemUnit.RoomInfo.AccountEmail;
+ }
+ return string.Empty;
+ }
+ }
- public void AddQueryToQueue(string query)
- {
- _syncQueries.Enqueue(query);
- }
+ public override bool MultiSiteOptionIsEnabled
+ {
+ get { return true; }
+ }
- public void LoginMessageReceived()
- {
- LoginMessageWasReceived = true;
- Debug.Console(1, this, "Login Message Received.");
- CheckSyncStatus();
- }
+ public override string SipPhoneNumber
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Status.Call.Info.dialIn))
+ {
+ return Status.Call.Info.dialIn;
+ }
+ return string.Empty;
+ }
+ }
- public void InitialQueryMessagesSent()
- {
- InitialQueryMessagesWereSent = true;
- Debug.Console(1, this, "Query Messages Sent.");
- CheckSyncStatus();
- }
+ public override string SipUri
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(Status.Call.Info.meeting_list_item.third_party.sip_address))
+ {
+ return Status.Call.Info.meeting_list_item.third_party.sip_address;
+ }
+ return string.Empty;
+ }
+ }
+ }
- public void LastQueryResponseReceived()
- {
- LastQueryResponseWasReceived = true;
- Debug.Console(1, this, "Last Query Response Received.");
- CheckSyncStatus();
- }
+ ///
+ /// Tracks the initial sycnronization state when establishing a new connection
+ ///
+ public class ZoomRoomSyncState : IKeyed
+ {
+ private readonly ZoomRoom _parent;
+ private readonly CrestronQueue _syncQueries;
+ private bool _initialSyncComplete;
- public void CamerasSetUp()
- {
- CamerasHaveBeenSetUp = true;
- Debug.Console(1, this, "Cameras Set Up.");
- CheckSyncStatus();
- }
+ public ZoomRoomSyncState(string key, ZoomRoom parent)
+ {
+ _parent = parent;
+ Key = key;
+ _syncQueries = new CrestronQueue(50);
+ CodecDisconnected();
+ }
- public void CodecDisconnected()
- {
- _syncQueries.Clear();
- LoginMessageWasReceived = false;
- InitialQueryMessagesWereSent = false;
- LastQueryResponseWasReceived = false;
- CamerasHaveBeenSetUp = false;
- InitialSyncComplete = false;
- }
+ public bool InitialSyncComplete
+ {
+ get { return _initialSyncComplete; }
+ private set
+ {
+ if (value)
+ {
+ var handler = InitialSyncCompleted;
+ if (handler != null)
+ {
+ handler(this, new EventArgs());
+ }
+ }
+ _initialSyncComplete = value;
+ }
+ }
- private void CheckSyncStatus()
- {
- if (LoginMessageWasReceived && InitialQueryMessagesWereSent && LastQueryResponseWasReceived &&
- CamerasHaveBeenSetUp)
- {
- InitialSyncComplete = true;
- Debug.Console(1, this, "Initial Codec Sync Complete!");
- }
- else
- {
- InitialSyncComplete = false;
- }
- }
- }
+ public bool LoginMessageWasReceived { get; private set; }
- public class ZoomRoomFactory : EssentialsDeviceFactory
- {
- public ZoomRoomFactory()
- {
- TypeNames = new List {"zoomroom"};
- }
+ public bool InitialQueryMessagesWereSent { get; private set; }
- public override EssentialsDevice BuildDevice(DeviceConfig dc)
- {
- Debug.Console(1, "Factory Attempting to create new ZoomRoom Device");
- var comm = CommFactory.CreateCommForDevice(dc);
- return new ZoomRoom(dc, comm);
- }
- }
+ public bool LastQueryResponseWasReceived { get; private set; }
+
+ public bool CamerasHaveBeenSetUp { get; private set; }
+
+ #region IKeyed Members
+
+ public string Key { get; private set; }
+
+ #endregion
+
+ public event EventHandler InitialSyncCompleted;
+
+ public void StartSync()
+ {
+ DequeueQueries();
+ }
+
+ private void DequeueQueries()
+ {
+ while (!_syncQueries.IsEmpty)
+ {
+ var query = _syncQueries.Dequeue();
+
+ _parent.SendText(query);
+ }
+
+ InitialQueryMessagesSent();
+ }
+
+ public void AddQueryToQueue(string query)
+ {
+ _syncQueries.Enqueue(query);
+ }
+
+ public void LoginMessageReceived()
+ {
+ LoginMessageWasReceived = true;
+ Debug.Console(1, this, "Login Message Received.");
+ CheckSyncStatus();
+ }
+
+ public void InitialQueryMessagesSent()
+ {
+ InitialQueryMessagesWereSent = true;
+ Debug.Console(1, this, "Query Messages Sent.");
+ CheckSyncStatus();
+ }
+
+ public void LastQueryResponseReceived()
+ {
+ LastQueryResponseWasReceived = true;
+ Debug.Console(1, this, "Last Query Response Received.");
+ CheckSyncStatus();
+ }
+
+ public void CamerasSetUp()
+ {
+ CamerasHaveBeenSetUp = true;
+ Debug.Console(1, this, "Cameras Set Up.");
+ CheckSyncStatus();
+ }
+
+ public void CodecDisconnected()
+ {
+ _syncQueries.Clear();
+ LoginMessageWasReceived = false;
+ InitialQueryMessagesWereSent = false;
+ LastQueryResponseWasReceived = false;
+ CamerasHaveBeenSetUp = false;
+ InitialSyncComplete = false;
+ }
+
+ private void CheckSyncStatus()
+ {
+ if (LoginMessageWasReceived && InitialQueryMessagesWereSent && LastQueryResponseWasReceived &&
+ CamerasHaveBeenSetUp)
+ {
+ InitialSyncComplete = true;
+ Debug.Console(1, this, "Initial Codec Sync Complete!");
+ }
+ else
+ {
+ InitialSyncComplete = false;
+ }
+ }
+ }
+
+ public class ZoomRoomFactory : EssentialsDeviceFactory
+ {
+ public ZoomRoomFactory()
+ {
+ TypeNames = new List { "zoomroom" };
+ }
+
+ public override EssentialsDevice BuildDevice(DeviceConfig dc)
+ {
+ Debug.Console(1, "Factory Attempting to create new ZoomRoom Device");
+ var comm = CommFactory.CreateCommForDevice(dc);
+ return new ZoomRoom(dc, comm);
+ }
+ }
}
\ No newline at end of file
diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs
new file mode 100644
index 00000000..07265d20
--- /dev/null
+++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/VideoCodec/ZoomRoom/ZoomRoomJoinMap.cs
@@ -0,0 +1,273 @@
+using System;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Bridges.JoinMaps;
+
+namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
+{
+ public class ZoomRoomJoinMap : VideoCodecControllerJoinMap
+ {
+ // TODO: #697 [X] Set join numbers
+
+ #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
+ });
+
+ //[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
+ });
+
+ #endregion
+
+ public ZoomRoomJoinMap(uint joinStart)
+ : base(joinStart, typeof(ZoomRoomJoinMap))
+ {
+ }
+
+ public ZoomRoomJoinMap(uint joinStart, Type type)
+ : base(joinStart, type)
+ {
+ }
+ }
+}
\ No newline at end of file