mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-02 14:24:59 +00:00
Compare commits
1 Commits
1.9.8-alph
...
1.9.7-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afa9eb32cb |
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@@ -22,7 +22,7 @@ env:
|
||||
RELEASE_BRANCH: main
|
||||
jobs:
|
||||
Build_Project:
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
# First we checkout the source repo
|
||||
- name: Checkout repo
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Push_Nuget_Package:
|
||||
needs: Build_Project
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Download Build Version Info
|
||||
uses: actions/download-artifact@v1
|
||||
|
||||
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -19,7 +19,7 @@ env:
|
||||
RELEASE_BRANCH: main
|
||||
jobs:
|
||||
Build_Project:
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
# First we checkout the source repo
|
||||
- name: Checkout repo
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Push_Nuget_Package:
|
||||
needs: Build_Project
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Download Build Version Info
|
||||
uses: actions/download-artifact@v1
|
||||
|
||||
@@ -46,14 +46,6 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Raw Occupancy Us Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("IdentityModeOn")]
|
||||
public JoinDataComplete IdentityMode = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Enable Identity Mode", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("IdentityModeFeedback")]
|
||||
public JoinDataComplete IdentityModeFeedback = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Identity Mode Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("EnableLedFlash")]
|
||||
public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
|
||||
new JoinMetadata { Description = "Enable Led Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
@@ -5,9 +5,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
{
|
||||
public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
#region Digital
|
||||
|
||||
[JoinName("IsOnline")]
|
||||
public JoinDataComplete IsOnline = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -22,7 +19,20 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
|
||||
[JoinName("Name")]
|
||||
public JoinDataComplete Name = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 1,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Sensor Name",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("Enable")]
|
||||
public JoinDataComplete Enable = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -91,11 +101,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
Description = "Sensor Decrease Sensitivity",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Analog
|
||||
});
|
||||
|
||||
[JoinName("Sensitivity")]
|
||||
public JoinDataComplete Sensitivity = new JoinDataComplete(
|
||||
@@ -111,28 +117,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Serial
|
||||
|
||||
[JoinName("Name")]
|
||||
public JoinDataComplete Name = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 1,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Sensor Name",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructor to use when instantiating this Join Map without inheriting from it
|
||||
/// </summary>
|
||||
|
||||
@@ -20,21 +20,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("SendDtmfToSpecificCallIndex")]
|
||||
public JoinDataComplete SendDtmfToSpecificCallIndex = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 10,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "If High, will send DTMF tones to the call set by SelectCall analog. If low sends DTMF tones to last connected call.",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf1")]
|
||||
[JoinName("1")]
|
||||
public JoinDataComplete Dtmf1 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -48,7 +34,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf2")]
|
||||
[JoinName("2")]
|
||||
public JoinDataComplete Dtmf2 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -62,7 +48,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf3")]
|
||||
[JoinName("3")]
|
||||
public JoinDataComplete Dtmf3 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -76,7 +62,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf4")]
|
||||
[JoinName("4")]
|
||||
public JoinDataComplete Dtmf4 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -90,7 +76,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf5")]
|
||||
[JoinName("5")]
|
||||
public JoinDataComplete Dtmf5 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -104,7 +90,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf6")]
|
||||
[JoinName("6")]
|
||||
public JoinDataComplete Dtmf6 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -118,7 +104,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf7")]
|
||||
[JoinName("7")]
|
||||
public JoinDataComplete Dtmf7 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -132,7 +118,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf8")]
|
||||
[JoinName("8")]
|
||||
public JoinDataComplete Dtmf8 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -146,7 +132,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf9")]
|
||||
[JoinName("9")]
|
||||
public JoinDataComplete Dtmf9 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -160,7 +146,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("Dtmf0")]
|
||||
[JoinName("0")]
|
||||
public JoinDataComplete Dtmf0 = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -174,7 +160,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DtmfStar")]
|
||||
[JoinName("*")]
|
||||
public JoinDataComplete DtmfStar = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -188,7 +174,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DtmfPound")]
|
||||
[JoinName("#")]
|
||||
public JoinDataComplete DtmfPound = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -202,8 +188,8 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("EndAllCalls")]
|
||||
public JoinDataComplete EndAllCalls = new JoinDataComplete(
|
||||
[JoinName("EndCall")]
|
||||
public JoinDataComplete EndCall = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 24,
|
||||
@@ -211,7 +197,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "End All Calls",
|
||||
Description = "Hang Up",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
@@ -240,7 +226,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Speed Dial",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
@@ -295,12 +281,12 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Dial manual string specified by CurrentDialString serial join",
|
||||
Description = "Dial manual string",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DialPhone")]
|
||||
[JoinName("DialPhoneCall")]
|
||||
public JoinDataComplete DialPhone = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -328,7 +314,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("HangUpPhone")]
|
||||
[JoinName("EndPhoneCall")]
|
||||
public JoinDataComplete HangUpPhone = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -337,53 +323,11 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Hang Up Phone",
|
||||
Description = "Hang Up PHone",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("EndCallStart")]
|
||||
public JoinDataComplete EndCallStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 81,
|
||||
JoinSpan = 8
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "End a specific call by call index. ",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("JoinAllCalls")]
|
||||
public JoinDataComplete JoinAllCalls = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 90,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Join all calls",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("JoinCallStart")]
|
||||
public JoinDataComplete JoinCallStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 91,
|
||||
JoinSpan = 8
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Join a specific call by call index. ",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DirectorySearchBusy")]
|
||||
public JoinDataComplete DirectorySearchBusy = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -464,7 +408,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Go to Directory Root",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
@@ -496,33 +440,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DirectoryDisableAutoDialSelectedLine")]
|
||||
public JoinDataComplete DirectoryDisableAutoDialSelectedLine = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 107,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Set high to disable automatic dialing of a contact when selected",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DirectoryDialSelectedContactMethod")]
|
||||
public JoinDataComplete DirectoryDialSelectedContactMethod = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 108,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Pulse to dial the selected contact method",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("CameraTiltUp")]
|
||||
public JoinDataComplete CameraTiltUp = new JoinDataComplete(
|
||||
@@ -608,48 +525,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("CameraFocusNear")]
|
||||
public JoinDataComplete CameraFocusNear = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 117,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Focus Near",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("CameraFocusFar")]
|
||||
public JoinDataComplete CameraFocusFar = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 118,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Focus Far",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("CameraFocusAuto")]
|
||||
public JoinDataComplete CameraFocusAuto = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 119,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Auto Focus Trigger",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("CameraPresetSave")]
|
||||
public JoinDataComplete CameraPresetSave = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -659,7 +534,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Pulse to save selected preset spcified by CameraPresetSelect analog join. FB will pulse for 3s when preset saved.",
|
||||
Description = "Save Selected Preset",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
@@ -673,7 +548,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Mode Auto. Enables camera auto tracking mode, with feedback",
|
||||
Description = "Camera Mode Auto",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
@@ -687,7 +562,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Mode Manual. Disables camera auto tracking mode, with feedback",
|
||||
Description = "Camera Mode Manual",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
@@ -701,7 +576,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Mode Off. Disables camera video, with feedback. Works like video mute.",
|
||||
Description = "Camera Mode Off",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
@@ -930,34 +805,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("RemoveSelectedRecentCallItem")]
|
||||
public JoinDataComplete RemoveSelectedRecentCallItem = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 181,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Pulse to remove the selected recent call item specified by the SelectRecentCallItem analog join",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("DialSelectedRecentCallItem")]
|
||||
public JoinDataComplete DialSelectedRecentCallItem = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 182,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Pulse to dial the selected recent call item specified by the SelectRecentCallItem analog join",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("SourceShareStart")]
|
||||
public JoinDataComplete SourceShareStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1023,81 +870,11 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Toggles selfview position",
|
||||
Description = "advance selfview position",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("HoldAllCalls")]
|
||||
public JoinDataComplete HoldAllCalls = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 220,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Holds all calls",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("HoldCallsStart")]
|
||||
public JoinDataComplete HoldCallsStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 221,
|
||||
JoinSpan = 8
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Holds Call at specified index. FB reported on Call Status XSIG",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("ResumeCallsStart")]
|
||||
public JoinDataComplete ResumeCallsStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 231,
|
||||
JoinSpan = 8
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Resume Call at specified index",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("MultiSiteOptionIsEnabled")]
|
||||
public JoinDataComplete MultiSiteOptionIsEnabled = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 301,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Multi site option is enabled FB",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("AutoAnswerEnabled")]
|
||||
public JoinDataComplete AutoAnswerEnabled = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 302,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Auto Answer is enabled FB",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("ParticipantAudioMuteToggleStart")]
|
||||
public JoinDataComplete ParticipantAudioMuteToggleStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1147,35 +924,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
|
||||
#region Analog
|
||||
|
||||
[JoinName("SelectCall")]
|
||||
public JoinDataComplete SelectCall = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 24,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Sets the selected Call for DTMF commands. Valid values 1-8",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
|
||||
[JoinName("ConnectedCallCount")]
|
||||
public JoinDataComplete ConnectedCallCount = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 25,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Reports the number of currently connected calls",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("MinutesBeforeMeetingStart")]
|
||||
public JoinDataComplete MinutesBeforeMeetingStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1199,25 +947,11 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Number Select/FB. 1 based index. Valid range is 1 to the value reported by CameraCount.",
|
||||
Description = "Camera Number Select/FB",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("CameraCount")]
|
||||
public JoinDataComplete CameraCount = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 61,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Reports the number of cameras",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("DirectoryRowCount")]
|
||||
public JoinDataComplete DirectoryRowCount = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1246,34 +980,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("SelectedContactMethodCount")]
|
||||
public JoinDataComplete SelectedContactMethodCount = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 102,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Reports the number of contact methods for the selected contact",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("SelectContactMethod")]
|
||||
public JoinDataComplete SelectContactMethod = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 103,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Selects a contact method by index",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("CameraPresetSelect")]
|
||||
public JoinDataComplete CameraPresetSelect = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1284,24 +990,10 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Preset Select",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("FarEndPresetSelect")]
|
||||
public JoinDataComplete FarEndPresetSelect = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 122,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Far End Preset Preset Select",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("ParticipantCount")]
|
||||
public JoinDataComplete ParticipantCount = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1344,48 +1036,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("SelectRecentCallItem")]
|
||||
public JoinDataComplete SelectRecentCallItem = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 180,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Select/FB for Recent Call Item. Valid values 1 - 10",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("RecentCallOccurrenceType")]
|
||||
public JoinDataComplete RecentCallOccurrenceType = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 181,
|
||||
JoinSpan = 10
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Recent Call Occurrence Type. [0-3] 0 = Unknown, 1 = Placed, 2 = Received, 3 = NoAnswer",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("RecentCallCount")]
|
||||
public JoinDataComplete RecentCallCount = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 191,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Recent Call Count",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1401,12 +1051,12 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Value to dial when ManualDial digital join is pulsed",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
Description = "Current Dial String",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("PhoneDialString")]
|
||||
[JoinName("PhoneString")]
|
||||
public JoinDataComplete PhoneDialString = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -1420,7 +1070,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("CurrentCallData")]
|
||||
[JoinName("CurrentCallName")]
|
||||
public JoinDataComplete CurrentCallData = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
@@ -1519,20 +1169,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("ContactMethods")]
|
||||
public JoinDataComplete ContactMethods = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 103,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Contact Methods - XSig, 10 entries",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("CameraPresetNames")]
|
||||
public JoinDataComplete CameraPresetNames = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1547,8 +1183,8 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("CurrentLayoutStringFb")]
|
||||
public JoinDataComplete CurrentLayoutStringFb = new JoinDataComplete(
|
||||
[JoinName("CameraLayoutStringFb")]
|
||||
public JoinDataComplete CameraLayoutStringFb = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 141,
|
||||
@@ -1575,76 +1211,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("CameraNamesFb")]
|
||||
public JoinDataComplete CameraNamesFb = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 161,
|
||||
JoinSpan = 10
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Camera Name Fb",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("SelectedRecentCallName")]
|
||||
public JoinDataComplete SelectedRecentCallName = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 171,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Selected Recent Call Name",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("SelectedRecentCallNumber")]
|
||||
public JoinDataComplete SelectedRecentCallNumber = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 172,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Selected Recent Call Number",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("RecentCallNamesStart")]
|
||||
public JoinDataComplete RecentCallNamesStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 181,
|
||||
JoinSpan = 10
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Recent Call Names",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("RecentCallTimesStart")]
|
||||
public JoinDataComplete RecentCallTimesStart = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 191,
|
||||
JoinSpan = 10
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Recent Calls Times",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("CurrentSource")]
|
||||
public JoinDataComplete CurrentSource = new JoinDataComplete(
|
||||
new JoinData
|
||||
@@ -1671,77 +1237,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
Description = "advance selfview position",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("DeviceIpAddresss")]
|
||||
public JoinDataComplete DeviceIpAddresss = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 301,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "IP Address of device",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("SipPhoneNumber")]
|
||||
public JoinDataComplete SipPhoneNumber = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 302,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "SIP phone number of device",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("E164Alias")]
|
||||
public JoinDataComplete E164Alias = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 303,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "E164 alias of device",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("H323Id")]
|
||||
public JoinDataComplete H323Id = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 304,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "H323 ID of device",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
[JoinName("SipUri")]
|
||||
public JoinDataComplete SipUri = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 305,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "SIP URI of device",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
});
|
||||
|
||||
[JoinName("DirectoryEntrySelectedName")]
|
||||
public JoinDataComplete DirectoryEntrySelectedName = new JoinDataComplete(
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Resources;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
@@ -62,8 +61,6 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public BoolFeedback RawOccupancyUsFeedback { get; private set; }
|
||||
|
||||
public BoolFeedback IdentityModeFeedback { get; private set; }
|
||||
|
||||
// Debug properties
|
||||
public bool InTestMode { get; private set; }
|
||||
|
||||
@@ -120,8 +117,6 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
RawOccupancyUsFeedback = new BoolFeedback(() => OccSensor.RawOccupancyDetectedByUltrasonicSensorFeedback.BoolValue);
|
||||
|
||||
IdentityModeFeedback = new BoolFeedback(()=>OccSensor.IdentityModeOnFeedback.BoolValue);
|
||||
|
||||
UltrasonicSensitivityInVacantStateFeedback = new IntFeedback(() => (int)OccSensor.UltrasonicSensorSensitivityInVacantStateFeedback);
|
||||
|
||||
UltrasonicSensitivityInOccupiedStateFeedback = new IntFeedback(() => (int)OccSensor.UltrasonicSensorSensitivityInOccupiedStateFeedback);
|
||||
@@ -204,27 +199,6 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
SetAndWhenVacatedState((bool)PropertiesConfig.AndWhenVacatedState);
|
||||
}
|
||||
|
||||
// TODO [ ] feature/cenoodtcpoe-sensor-sensitivity-configuration
|
||||
if (PropertiesConfig.UsSensitivityOccupied != null)
|
||||
{
|
||||
SetUsSensitivityOccupied((ushort)PropertiesConfig.UsSensitivityOccupied);
|
||||
}
|
||||
|
||||
if (PropertiesConfig.UsSensitivityVacant != null)
|
||||
{
|
||||
SetUsSensitivityVacant((ushort)PropertiesConfig.UsSensitivityVacant);
|
||||
}
|
||||
|
||||
if (PropertiesConfig.PirSensitivityOccupied != null)
|
||||
{
|
||||
SetPirSensitivityOccupied((ushort)PropertiesConfig.PirSensitivityOccupied);
|
||||
}
|
||||
|
||||
if (PropertiesConfig.PirSensitivityVacant != null)
|
||||
{
|
||||
SetPirSensitivityVacant((ushort)PropertiesConfig.PirSensitivityVacant);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -305,21 +279,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the identity mode on or off
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
public void SetIdentityMode(bool state)
|
||||
{
|
||||
if (state)
|
||||
OccSensor.IdentityModeOn();
|
||||
else
|
||||
OccSensor.IdentityModeOff();
|
||||
|
||||
Debug.Console(1, this, "Identity Mode: {0}", OccSensor.IdentityModeOnFeedback.BoolValue ? "On" : "Off");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Enables or disables the PIR sensor
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
@@ -546,54 +506,6 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the US sensor sensitivity for occupied state
|
||||
/// </summary>
|
||||
/// <param name="sensitivity"></param>
|
||||
public void SetUsSensitivityOccupied(ushort sensitivity)
|
||||
{
|
||||
var level = (eSensitivityLevel) sensitivity;
|
||||
if (level == 0) return;
|
||||
|
||||
OccSensor.UltrasonicSensorSensitivityInOccupiedState = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the US sensor sensitivity for vacant state
|
||||
/// </summary>
|
||||
/// <param name="sensitivity"></param>
|
||||
public void SetUsSensitivityVacant(ushort sensitivity)
|
||||
{
|
||||
var level = (eSensitivityLevel)sensitivity;
|
||||
if (level == 0) return;
|
||||
|
||||
OccSensor.UltrasonicSensorSensitivityInVacantState = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the PIR sensor sensitivity for occupied state
|
||||
/// </summary>
|
||||
/// <param name="sensitivity"></param>
|
||||
public void SetPirSensitivityOccupied(ushort sensitivity)
|
||||
{
|
||||
var level = (eSensitivityLevel)sensitivity;
|
||||
if (level == 0) return;
|
||||
|
||||
OccSensor.PassiveInfraredSensorSensitivityInOccupiedState = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the PIR sensor sensitivity for vacant state
|
||||
/// </summary>
|
||||
/// <param name="sensitivity"></param>
|
||||
public void SetPirSensitivityVacant(ushort sensitivity)
|
||||
{
|
||||
var level = (eSensitivityLevel)sensitivity;
|
||||
if (level == 0) return;
|
||||
|
||||
OccSensor.PassiveInfraredSensorSensitivityInVacantState = level;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method to print current settings to console
|
||||
/// </summary>
|
||||
@@ -735,11 +647,8 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
//Sensor Raw States
|
||||
occController.RawOccupancyPirFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyPirFeedback.JoinNumber]);
|
||||
occController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]);
|
||||
|
||||
// Identity mode
|
||||
trilist.SetBoolSigAction(joinMap.IdentityMode.JoinNumber, occController.SetIdentityMode);
|
||||
occController.IdentityModeFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IdentityModeFeedback.JoinNumber]);
|
||||
occController.RawOccupancyUsFeedback.LinkInputSig(trilist.BooleanInput[joinMap.RawOccupancyUsFeedback.JoinNumber]);
|
||||
|
||||
}
|
||||
|
||||
public class CenOdtOccupancySensorBaseControllerFactory : EssentialsDeviceFactory<CenOdtOccupancySensorBaseController>
|
||||
|
||||
@@ -47,35 +47,5 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
[JsonProperty("andWhenVacatedState")]
|
||||
public bool? AndWhenVacatedState { get; set; }
|
||||
|
||||
// PoE Sensors: CenOdtCPoe
|
||||
|
||||
/// <summary>
|
||||
/// Sets the sensitivity level for US while sensor is in occupied state
|
||||
/// 1 = low; 2 = medium; 3 = high; 4 = xlow; 5 = 2xlow; 6 = 3xlow
|
||||
/// </summary>
|
||||
[JsonProperty("usSensitivityOccupied")]
|
||||
public ushort? UsSensitivityOccupied { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the sensitivity level for US while sensor is in vacant state
|
||||
/// 1 = low; 2 = medium; 3 = high; 4 = xlow; 5 = 2xlow; 6 = 3xlow
|
||||
/// </summary>
|
||||
[JsonProperty("usSensitivityVacant")]
|
||||
public ushort? UsSensitivityVacant { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the sensitivity level for PIR while sensor is in occupied state
|
||||
/// 1 = low; 2 = medium; 3 = high
|
||||
/// </summary>
|
||||
[JsonProperty("pirSensitivityOccupied")]
|
||||
public ushort? PirSensitivityOccupied { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the sensitivity level for PIR while sensor is in vacant state
|
||||
/// 1 = low; 2 = medium; 3 = high
|
||||
/// </summary>
|
||||
[JsonProperty("pirSensitivityVacant")]
|
||||
public ushort? PirSensitivityVacant { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.GeneralIO;
|
||||
using Newtonsoft.Json;
|
||||
@@ -10,18 +9,15 @@ using PepperDash.Essentials.Core.Bridges.JoinMaps;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash_Essentials_Core.PartitionSensor;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
[Description("Wrapper class for GLS Cresnet Partition Sensor")]
|
||||
public class GlsPartitionSensorController : CrestronGenericBridgeableBaseDevice, IPartitionStateProvider
|
||||
{
|
||||
private GlsPartCn _partitionSensor;
|
||||
|
||||
public GlsPartitionSensorPropertiesConfig PropertiesConfig { get; private set; }
|
||||
|
||||
private GlsPartCn _partitionSensor;
|
||||
|
||||
public StringFeedback NameFeedback { get; private set; }
|
||||
public BoolFeedback EnableFeedback { get; private set; }
|
||||
public BoolFeedback PartitionPresentFeedback { get; private set; }
|
||||
public BoolFeedback PartitionNotSensedFeedback { get; private set; }
|
||||
@@ -36,71 +32,23 @@ namespace PepperDash.Essentials.Core
|
||||
public GlsPartitionSensorController(string key, Func<DeviceConfig, GlsPartCn> preActivationFunc, DeviceConfig config)
|
||||
: base(key, config.Name)
|
||||
{
|
||||
|
||||
var props = config.Properties.ToObject<GlsPartitionSensorPropertiesConfig>();
|
||||
if (props != null)
|
||||
{
|
||||
PropertiesConfig = props;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, this, "props are null. Unable to deserialize into GlsPartSensorPropertiesConfig");
|
||||
}
|
||||
|
||||
AddPreActivationAction(() =>
|
||||
{
|
||||
_partitionSensor = preActivationFunc(config);
|
||||
|
||||
|
||||
RegisterCrestronGenericBase(_partitionSensor);
|
||||
|
||||
|
||||
NameFeedback = new StringFeedback(() => Name);
|
||||
EnableFeedback = new BoolFeedback(() => InTestMode ? TestEnableFeedback : _partitionSensor.EnableFeedback.BoolValue);
|
||||
PartitionPresentFeedback = new BoolFeedback(() => InTestMode ? TestPartitionSensedFeedback : _partitionSensor.PartitionSensedFeedback.BoolValue);
|
||||
PartitionNotSensedFeedback = new BoolFeedback(() => InTestMode ? !TestPartitionSensedFeedback : _partitionSensor.PartitionNotSensedFeedback.BoolValue);
|
||||
SensitivityFeedback = new IntFeedback(() => InTestMode ? TestSensitivityFeedback : _partitionSensor.SensitivityFeedback.UShortValue);
|
||||
|
||||
if (_partitionSensor != null)
|
||||
{
|
||||
_partitionSensor.BaseEvent += PartitionSensor_BaseEvent;
|
||||
}
|
||||
if (_partitionSensor != null) _partitionSensor.BaseEvent += PartitionSensor_BaseEvent;
|
||||
});
|
||||
}
|
||||
|
||||
AddPostActivationAction(() =>
|
||||
{
|
||||
_partitionSensor.OnlineStatusChange += (o, a) =>
|
||||
{
|
||||
if (a.DeviceOnLine)
|
||||
{
|
||||
ApplySettingsToSensorFromConfig();
|
||||
}
|
||||
};
|
||||
|
||||
if (_partitionSensor.IsOnline)
|
||||
{
|
||||
ApplySettingsToSensorFromConfig();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void ApplySettingsToSensorFromConfig()
|
||||
{
|
||||
if (_partitionSensor.IsOnline == false) return;
|
||||
|
||||
Debug.Console(1, this, "Attempting to apply settings to sensor from config");
|
||||
|
||||
if (PropertiesConfig.Sensitivity != null)
|
||||
{
|
||||
Debug.Console(1, this, "Sensitivity found, attempting to set value '{0}' from config",
|
||||
PropertiesConfig.Sensitivity);
|
||||
_partitionSensor.Sensitivity.UShortValue = (ushort) PropertiesConfig.Sensitivity;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, this, "Sensitivity null, no value specified in config");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void PartitionSensor_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
private void PartitionSensor_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
Debug.Console(2, this, "EventId: {0}, Index: {1}", args.EventId, args.Index);
|
||||
|
||||
@@ -113,13 +61,11 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
case (GlsPartCn.PartitionSensedFeedbackEventId):
|
||||
{
|
||||
Debug.Console(1, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue);
|
||||
PartitionPresentFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
case (GlsPartCn.PartitionNotSensedFeedbackEventId):
|
||||
{
|
||||
Debug.Console(1, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue);
|
||||
PartitionNotSensedFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
@@ -127,7 +73,7 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
SensitivityFeedback.FireUpdate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
Debug.Console(2, this, "Unhandled args.EventId: {0}", args.EventId);
|
||||
@@ -187,22 +133,7 @@ namespace PepperDash.Essentials.Core
|
||||
Debug.Console(1, this, "InTestMode: {0}, unable to set sensitivity value: {1}", InTestMode.ToString(), value);
|
||||
}
|
||||
|
||||
public void GetSettings()
|
||||
{
|
||||
var dash = new string('*', 50);
|
||||
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
||||
|
||||
Debug.Console(0, this, "Enabled State: {0}", _partitionSensor.EnableFeedback.BoolValue);
|
||||
|
||||
Debug.Console(0, this, "Partition Sensed State: {0}", _partitionSensor.PartitionSensedFeedback.BoolValue);
|
||||
Debug.Console(0, this, "Partition Not Sensed State: {0}", _partitionSensor.PartitionNotSensedFeedback.BoolValue);
|
||||
|
||||
Debug.Console(0, this, "Sensitivity Value: {0}", _partitionSensor.SensitivityFeedback.UShortValue);
|
||||
|
||||
CrestronConsole.PrintLine(string.Format("{0}\n", dash));
|
||||
}
|
||||
|
||||
public void SetEnableState(bool state)
|
||||
public void SetEnableState(bool state)
|
||||
{
|
||||
Debug.Console(2, this, "Sensor is {0}, SetEnableState: {1}", _partitionSensor == null ? "null" : "not null", state);
|
||||
if (_partitionSensor == null)
|
||||
@@ -258,20 +189,18 @@ namespace PepperDash.Essentials.Core
|
||||
Debug.Console(1, this, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
|
||||
Debug.Console(0, this, "Linking to Bridge Type {0}", GetType().Name);
|
||||
|
||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name;
|
||||
|
||||
// link input from simpl
|
||||
trilist.SetBoolSigAction(joinMap.Enable.JoinNumber, SetEnableState);
|
||||
EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]);
|
||||
|
||||
PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]);
|
||||
PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]);
|
||||
|
||||
trilist.SetSigTrueAction(joinMap.IncreaseSensitivity.JoinNumber, IncreaseSensitivity);
|
||||
trilist.SetSigTrueAction(joinMap.DecreaseSensitivity.JoinNumber, DecreaseSensitivity);
|
||||
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
||||
|
||||
SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]);
|
||||
trilist.SetUShortSigAction(joinMap.Sensitivity.JoinNumber, SetSensitivity);
|
||||
// link output to simpl
|
||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||
EnableFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Enable.JoinNumber]);
|
||||
PartitionPresentFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionSensed.JoinNumber]);
|
||||
PartitionNotSensedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PartitionNotSensed.JoinNumber]);
|
||||
SensitivityFeedback.LinkInputSig(trilist.UShortInput[joinMap.Sensitivity.JoinNumber]);
|
||||
|
||||
FeedbacksFireUpdates();
|
||||
|
||||
@@ -289,7 +218,6 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
if (a.DeviceOnLine)
|
||||
{
|
||||
trilist.StringInput[joinMap.Name.JoinNumber].StringValue = _partitionSensor.Name;
|
||||
FeedbacksFireUpdates();
|
||||
}
|
||||
};
|
||||
@@ -297,7 +225,8 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
private void FeedbacksFireUpdates()
|
||||
{
|
||||
IsOnline.FireUpdate();
|
||||
IsOnline.FireUpdate();
|
||||
NameFeedback.FireUpdate();
|
||||
EnableFeedback.FireUpdate();
|
||||
PartitionPresentFeedback.FireUpdate();
|
||||
PartitionNotSensedFeedback.FireUpdate();
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash_Essentials_Core.PartitionSensor
|
||||
{
|
||||
public class GlsPartitionSensorPropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the sensor sensitivity
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The sensitivity range shall be between 1(lowest) to 10 (highest).
|
||||
/// </remarks>
|
||||
[JsonProperty("sensitivity")]
|
||||
public ushort? Sensitivity { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -236,7 +236,6 @@
|
||||
<Compile Include="Occupancy\GlsOccupancySensorPropertiesConfig.cs" />
|
||||
<Compile Include="Occupancy\GlsOirOccupancySensorController.cs" />
|
||||
<Compile Include="PartitionSensor\EssentialsPartitionController.cs" />
|
||||
<Compile Include="PartitionSensor\GlsPartitionSensorPropertiesConfig.cs" />
|
||||
<Compile Include="PartitionSensor\IPartitionStateProvider.cs" />
|
||||
<Compile Include="Occupancy\OccupancyAggregatorConfig.cs" />
|
||||
<Compile Include="Queues\ComsMessage.cs" />
|
||||
|
||||
@@ -1285,10 +1285,7 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
var output = outputSelector as DMOutput;
|
||||
|
||||
var isUsbInput = (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput;
|
||||
var isUsbOutput = (sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput;
|
||||
|
||||
if (output == null && !(isUsbOutput || isUsbInput))
|
||||
if (output == null)
|
||||
{
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
||||
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
||||
@@ -1319,10 +1316,7 @@ namespace PepperDash.Essentials.DM
|
||||
if ((sigType & eRoutingSignalType.Video) == eRoutingSignalType.Video)
|
||||
{
|
||||
Chassis.VideoEnter.BoolValue = true;
|
||||
if (output != null)
|
||||
{
|
||||
output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard;
|
||||
}
|
||||
output.VideoOut = input; //Chassis.Outputs[output].VideoOut = inCard;
|
||||
}
|
||||
|
||||
if ((sigType & eRoutingSignalType.Audio) == eRoutingSignalType.Audio)
|
||||
@@ -1332,66 +1326,17 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
dmMdMnxn.AudioEnter.BoolValue = true;
|
||||
}
|
||||
if (output != null)
|
||||
{
|
||||
output.AudioOut = input;
|
||||
}
|
||||
output.AudioOut = input;
|
||||
//Chassis.Outputs[output].AudioOut = inCard;
|
||||
}
|
||||
|
||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||
|
||||
{
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
if (inputSelector == null && output != null)
|
||||
{
|
||||
//clearing the route is intended
|
||||
output.USBRoutedTo = null;
|
||||
return;
|
||||
}
|
||||
|
||||
if (inputSelector != null && input == null)
|
||||
{
|
||||
//input selector is DMOutput...we're doing a out to out route
|
||||
var tempInput = inputSelector as DMOutput;
|
||||
|
||||
if (tempInput == null || output == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
output.USBRoutedTo = tempInput;
|
||||
return;
|
||||
}
|
||||
|
||||
if (input != null & output != null)
|
||||
{
|
||||
output.USBRoutedTo = input;
|
||||
}
|
||||
}
|
||||
|
||||
if((sigType & eRoutingSignalType.UsbInput) != eRoutingSignalType.UsbInput)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
if (output != null)
|
||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput || (sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||
{
|
||||
Chassis.USBEnter.BoolValue = true;
|
||||
output.USBRoutedTo = input;
|
||||
return;
|
||||
}
|
||||
var tempOutput = outputSelector as DMInput;
|
||||
|
||||
if (tempOutput == null)
|
||||
{
|
||||
Debug.Console(0, this, Debug.ErrorLogLevel.Warning,
|
||||
"Unable to execute switch for inputSelector {0} to outputSelector {1}", inputSelector,
|
||||
outputSelector);
|
||||
return;
|
||||
}
|
||||
|
||||
tempOutput.USBRoutedTo = input;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRoutingNumeric Members
|
||||
@@ -1404,10 +1349,8 @@ namespace PepperDash.Essentials.DM
|
||||
|
||||
DMInputOutputBase dmCard;
|
||||
|
||||
//Routing Input to Input or Output to Input
|
||||
if ((sigType & eRoutingSignalType.UsbInput) == eRoutingSignalType.UsbInput)
|
||||
{
|
||||
Debug.Console(2, this, "Executing USB Input switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
||||
if (outputSelector > chassisSize)
|
||||
{
|
||||
uint outputIndex;
|
||||
@@ -1427,14 +1370,13 @@ namespace PepperDash.Essentials.DM
|
||||
dmCard = Chassis.Inputs[inputSelector];
|
||||
}
|
||||
|
||||
ExecuteSwitch(dmCard, Chassis.Inputs[outputSelector], sigType);
|
||||
ExecuteSwitch(dmCard, Chassis.Outputs[outputSelector], sigType);
|
||||
return;
|
||||
}
|
||||
if ((sigType & eRoutingSignalType.UsbOutput) == eRoutingSignalType.UsbOutput)
|
||||
{
|
||||
Debug.Console(2, this, "Executing USB Output switch.\r\n in:{0} output: {1}", inputSelector, outputSelector);
|
||||
|
||||
//routing Output to Output or Input to Output
|
||||
if (inputSelector > chassisSize)
|
||||
{
|
||||
//wanting to route an output to an output. Subtract chassis size and get output, unless it's 8x8
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
|
||||
SendCameraPresetNamesToApi(presetsCamera, joinMap, trilist);
|
||||
|
||||
for (int i = 0; i < joinMap.NumberOfPresets.JoinNumber; i++)
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
int tempNum = i;
|
||||
|
||||
|
||||
@@ -12,40 +12,34 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
public class CodecActiveCallItem
|
||||
{
|
||||
[JsonProperty("name", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("number", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonProperty("number")]
|
||||
public string Number { get; set; }
|
||||
|
||||
[JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonProperty("type")]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public eCodecCallType Type { get; set; }
|
||||
|
||||
[JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonProperty("status")]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public eCodecCallStatus Status { get; set; }
|
||||
|
||||
[JsonProperty("direction", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonProperty("direction")]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public eCodecCallDirection Direction { get; set; }
|
||||
|
||||
[JsonProperty("id", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("isOnHold", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool IsOnHold { get; set; }
|
||||
|
||||
[JsonProperty("duration", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public TimeSpan Duration { get; set; }
|
||||
|
||||
//public object CallMetaData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when this call is any status other than
|
||||
/// Unknown, Disconnected, Disconnecting
|
||||
/// </summary>
|
||||
[JsonProperty("isActiveCall", NullValueHandling = NullValueHandling.Ignore)]
|
||||
[JsonProperty("isActiveCall")]
|
||||
public bool IsActiveCall
|
||||
{
|
||||
get
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
public interface IHasCallHold
|
||||
{
|
||||
/// <summary>
|
||||
/// Put the specified call on hold
|
||||
/// </summary>
|
||||
/// <param name="activeCall"></param>
|
||||
void HoldCall(CodecActiveCallItem activeCall);
|
||||
|
||||
/// <summary>
|
||||
/// Resume the specified call
|
||||
/// </summary>
|
||||
/// <param name="activeCall"></param>
|
||||
void ResumeCall(CodecActiveCallItem activeCall);
|
||||
}
|
||||
}
|
||||
@@ -23,9 +23,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
public enum eCodecOccurrenceType
|
||||
{
|
||||
Unknown = 0,
|
||||
Placed = 1,
|
||||
Received = 2,
|
||||
NoAnswer = 3,
|
||||
Placed,
|
||||
Received,
|
||||
NoAnswer
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
<Compile Include="Codec\eCodecCallStatus.cs" />
|
||||
<Compile Include="Codec\eMeetingPrivacy.cs" />
|
||||
<Compile Include="Codec\iCodecAudio.cs" />
|
||||
<Compile Include="Codec\IHasCallHold.cs" />
|
||||
<Compile Include="Codec\IHasDoNotDisturb.cs" />
|
||||
<Compile Include="Codec\IHasExternalSourceSwitching.cs" />
|
||||
<Compile Include="ImageProcessors\TVOneCorio.cs" />
|
||||
@@ -130,7 +129,6 @@
|
||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasStandbyMode.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IHasStartMeeting.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\IJoinCalls.cs" />
|
||||
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
|
||||
<Compile Include="Codec\iHasCallFavorites.cs" />
|
||||
<Compile Include="Codec\iHasCallHistory.cs" />
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// <summary>
|
||||
/// The ID of the camera on the codec
|
||||
/// </summary>
|
||||
public uint CameraId { get; private set; }
|
||||
protected uint CameraId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Valid range 1-15
|
||||
|
||||
@@ -9,39 +9,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
#region Digital
|
||||
|
||||
[JoinName("PresentationLocalOnly")]
|
||||
public JoinDataComplete PresentationLocalOnly = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 205,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Presentation Local Only Feedback",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("PresentationLocalRemote")]
|
||||
public JoinDataComplete PresentationLocalRemote = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 206,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Presentation Local and Remote Feedback",
|
||||
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||
JoinType = eJoinType.Digital
|
||||
});
|
||||
|
||||
[JoinName("ActivateDoNotDisturbMode")]
|
||||
public JoinDataComplete ActivateDoNotDisturbMode = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 241,
|
||||
JoinNumber = 221,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
@@ -55,7 +27,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public JoinDataComplete DeactivateDoNotDisturbMode = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 242,
|
||||
JoinNumber = 222,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
@@ -69,7 +41,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public JoinDataComplete ToggleDoNotDisturbMode = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 243,
|
||||
JoinNumber = 223,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
@@ -83,7 +55,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public JoinDataComplete ActivateStandby = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 246,
|
||||
JoinNumber = 226,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
@@ -97,7 +69,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public JoinDataComplete DeactivateStandby = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 247,
|
||||
JoinNumber = 227,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
@@ -111,7 +83,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public JoinDataComplete ActivateHalfWakeMode = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 248,
|
||||
JoinNumber = 228,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
@@ -125,7 +97,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public JoinDataComplete EnteringStandbyMode = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 249,
|
||||
JoinNumber = 229,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
@@ -140,55 +112,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
#region Analog
|
||||
|
||||
[JoinName("RingtoneVolume")]
|
||||
public JoinDataComplete RingtoneVolume = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 21,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Ringtone volume set/FB. Valid values are 0 - 100 in increments of 5 (5, 10, 15, 20, etc.)",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
[JoinName("PresentationSource")]
|
||||
public JoinDataComplete PresentationSource = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 201,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Presentation set/FB. Valid values are 0 - 6 depending on the codec model.",
|
||||
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||
JoinType = eJoinType.Analog
|
||||
});
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Serials
|
||||
|
||||
[JoinName("CommandToDevice")]
|
||||
public JoinDataComplete CommandToDevice = new JoinDataComplete(
|
||||
new JoinData
|
||||
{
|
||||
JoinNumber = 5,
|
||||
JoinSpan = 1
|
||||
},
|
||||
new JoinMetadata
|
||||
{
|
||||
Description = "Sends a serial command to the device. Do not include the delimiter, it will be added automatically.",
|
||||
JoinCapabilities = eJoinCapabilities.FromSIMPL,
|
||||
JoinType = eJoinType.Serial
|
||||
});
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -30,10 +30,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
||||
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets,
|
||||
IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute, IHasDoNotDisturbMode,
|
||||
IHasHalfWakeMode, IHasCallHold, IJoinCalls
|
||||
IHasHalfWakeMode
|
||||
{
|
||||
private CiscoSparkCodecPropertiesConfig _config;
|
||||
|
||||
private bool _externalSourceChangeRequested;
|
||||
|
||||
public event EventHandler<DirectoryEventArgs> DirectoryResultReturned;
|
||||
@@ -44,11 +42,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||
|
||||
private GenericQueue _receiveQueue;
|
||||
private GenericQueue ReceiveQueue;
|
||||
|
||||
public BoolFeedback PresentationViewMaximizedFeedback { get; private set; }
|
||||
|
||||
private string _currentPresentationView;
|
||||
string CurrentPresentationView;
|
||||
|
||||
public BoolFeedback RoomIsOccupiedFeedback { get; private set; }
|
||||
|
||||
@@ -66,11 +64,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public BoolFeedback FarEndIsSharingContentFeedback { get; private set; }
|
||||
|
||||
public IntFeedback RingtoneVolumeFeedback { get; private set; }
|
||||
private CodecCommandWithLabel CurrentSelfviewPipPosition;
|
||||
|
||||
private CodecCommandWithLabel _currentSelfviewPipPosition;
|
||||
|
||||
private CodecCommandWithLabel _currentLocalLayout;
|
||||
private CodecCommandWithLabel CurrentLocalLayout;
|
||||
|
||||
/// <summary>
|
||||
/// List the available positions for the selfview PIP window
|
||||
@@ -169,7 +165,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
get
|
||||
{
|
||||
return () => _presentationSourceKey;
|
||||
return () => PresentationSourceKey;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +229,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
get
|
||||
{
|
||||
return () => _currentSelfviewPipPosition.Label;
|
||||
return () => CurrentSelfviewPipPosition.Label;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +237,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
get
|
||||
{
|
||||
return () => _currentLocalLayout.Label;
|
||||
return () => CurrentLocalLayout.Label;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,58 +245,43 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
get
|
||||
{
|
||||
return () => _currentLocalLayout.Label == "Prominent";
|
||||
return () => CurrentLocalLayout.Label == "Prominent";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string _cliFeedbackRegistrationExpression;
|
||||
private string CliFeedbackRegistrationExpression;
|
||||
|
||||
private CodecSyncState _syncState;
|
||||
private CodecSyncState SyncState;
|
||||
|
||||
public CodecPhonebookSyncState PhonebookSyncState { get; private set; }
|
||||
|
||||
private StringBuilder _jsonMessage;
|
||||
private StringBuilder JsonMessage;
|
||||
|
||||
private bool _jsonFeedbackMessageIsIncoming;
|
||||
private bool JsonFeedbackMessageIsIncoming;
|
||||
|
||||
public bool CommDebuggingIsOn;
|
||||
|
||||
string Delimiter = "\r\n";
|
||||
|
||||
public IntFeedback PresentationSourceFeedback { get; private set; }
|
||||
|
||||
public BoolFeedback PresentationSendingLocalOnlyFeedback { get; private set; }
|
||||
|
||||
public BoolFeedback PresentationSendingLocalRemoteFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the current connector used for the presentation source
|
||||
/// </summary>
|
||||
private int _presentationSource;
|
||||
int PresentationSource;
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the connector that is desired to be the current presentation source (until the command is send)
|
||||
/// </summary>
|
||||
private int _desiredPresentationSource;
|
||||
string PresentationSourceKey;
|
||||
|
||||
private string _presentationSourceKey;
|
||||
string PhonebookMode = "Local"; // Default to Local
|
||||
|
||||
private bool _presentationLocalOnly;
|
||||
uint PhonebookResultsLimit = 255; // Could be set later by config.
|
||||
|
||||
private bool _presentationLocalRemote;
|
||||
|
||||
private string _phonebookMode = "Local"; // Default to Local
|
||||
|
||||
private uint _phonebookResultsLimit = 255; // Could be set later by config.
|
||||
|
||||
private CTimer _loginMessageReceivedTimer;
|
||||
private CTimer _retryConnectionTimer;
|
||||
CTimer LoginMessageReceivedTimer;
|
||||
CTimer RetryConnectionTimer;
|
||||
|
||||
// **___________________________________________________________________**
|
||||
// Timers to be moved to the global system timer at a later point....
|
||||
private CTimer BookingsRefreshTimer;
|
||||
private CTimer PhonebookRefreshTimer;
|
||||
CTimer BookingsRefreshTimer;
|
||||
CTimer PhonebookRefreshTimer;
|
||||
// **___________________________________________________________________**
|
||||
|
||||
public RoutingInputPort CodecOsdIn { get; private set; }
|
||||
@@ -316,16 +297,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
var props = JsonConvert.DeserializeObject<Codec.CiscoSparkCodecPropertiesConfig>(config.Properties.ToString());
|
||||
|
||||
_config = props;
|
||||
|
||||
// Use the configured phonebook results limit if present
|
||||
if (props.PhonebookResultsLimit > 0)
|
||||
{
|
||||
_phonebookResultsLimit = props.PhonebookResultsLimit;
|
||||
PhonebookResultsLimit = props.PhonebookResultsLimit;
|
||||
}
|
||||
|
||||
// The queue that will collect the repsonses in the order they are received
|
||||
_receiveQueue = new GenericQueue(this.Key + "-rxQueue", 25);
|
||||
ReceiveQueue = new GenericQueue(this.Key + "-rxQueue", 25);
|
||||
|
||||
RoomIsOccupiedFeedback = new BoolFeedback(RoomIsOccupiedFeedbackFunc);
|
||||
PeopleCountFeedback = new IntFeedback(PeopleCountFeedbackFunc);
|
||||
@@ -343,13 +322,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
HalfWakeModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Standby.State.Value.ToLower() == "halfwake");
|
||||
EnteringStandbyModeFeedback = new BoolFeedback(() => CodecStatus.Status.Standby.State.Value.ToLower() == "enteringstandby");
|
||||
|
||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => _currentPresentationView == "Maximized");
|
||||
|
||||
RingtoneVolumeFeedback = new IntFeedback(() => CodecConfiguration.Configuration.Audio.SoundsAndAlerts.RingVolume.Volume);
|
||||
|
||||
PresentationSourceFeedback = new IntFeedback(() => _presentationSource);
|
||||
PresentationSendingLocalOnlyFeedback = new BoolFeedback(() => _presentationLocalOnly);
|
||||
PresentationSendingLocalRemoteFeedback = new BoolFeedback(() => _presentationLocalRemote);
|
||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
||||
|
||||
Communication = comm;
|
||||
|
||||
@@ -369,13 +342,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
DeviceManager.AddDevice(CommunicationMonitor);
|
||||
|
||||
_phonebookMode = props.PhonebookMode;
|
||||
PhonebookMode = props.PhonebookMode;
|
||||
|
||||
_syncState = new CodecSyncState(Key + "--Sync");
|
||||
SyncState = new CodecSyncState(Key + "--Sync");
|
||||
|
||||
PhonebookSyncState = new CodecPhonebookSyncState(Key + "--PhonebookSync");
|
||||
|
||||
_syncState.InitialSyncCompleted += new EventHandler<EventArgs>(SyncState_InitialSyncCompleted);
|
||||
SyncState.InitialSyncCompleted += new EventHandler<EventArgs>(SyncState_InitialSyncCompleted);
|
||||
|
||||
PortGather = new CommunicationGather(Communication, Delimiter);
|
||||
PortGather.IncludeDelimiter = true;
|
||||
@@ -421,6 +394,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
InputPorts.Add(HdmiIn2);
|
||||
InputPorts.Add(HdmiIn3);
|
||||
OutputPorts.Add(HdmiOut1);
|
||||
|
||||
SetUpCameras();
|
||||
|
||||
CreateOsdSource();
|
||||
|
||||
ExternalSourceListEnabled = props.ExternalSourceListEnabled;
|
||||
@@ -456,15 +432,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
CodecStatus.Status.Video.Selfview.Mode.ValueChangedAction = SelfviewIsOnFeedback.FireUpdate;
|
||||
CodecStatus.Status.Video.Selfview.PIPPosition.ValueChangedAction = ComputeSelfviewPipStatus;
|
||||
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = () =>
|
||||
{
|
||||
SharingContentIsOnFeedback.FireUpdate();
|
||||
FarEndIsSharingContentFeedback.FireUpdate();
|
||||
};
|
||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = SharingContentIsOnFeedback.FireUpdate;
|
||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
||||
CodecStatus.Status.Conference.DoNotDisturb.ValueChangedAction = DoNotDisturbModeIsOnFeedback.FireUpdate;
|
||||
|
||||
CodecConfiguration.Configuration.Audio.SoundsAndAlerts.RingVolume.ValueChangedAction = RingtoneVolumeFeedback.FireUpdate;
|
||||
|
||||
try
|
||||
{
|
||||
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
||||
@@ -593,16 +564,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
PhonebookSyncState.InitialSyncCompleted += new EventHandler<EventArgs>(PhonebookSyncState_InitialSyncCompleted);
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
void PhonebookSyncState_InitialSyncCompleted(object sender, EventArgs e)
|
||||
{
|
||||
OnDirectoryResultReturned(DirectoryRoot);
|
||||
}
|
||||
|
||||
#region Overrides of Device
|
||||
|
||||
public override void Initialize()
|
||||
@@ -619,7 +583,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
const string prefix = "xFeedback register ";
|
||||
|
||||
_cliFeedbackRegistrationExpression =
|
||||
CliFeedbackRegistrationExpression =
|
||||
prefix + "/Configuration" + Delimiter +
|
||||
prefix + "/Status/Audio" + Delimiter +
|
||||
prefix + "/Status/Call" + Delimiter +
|
||||
@@ -649,36 +613,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// <param name="e"></param>
|
||||
void SyncState_InitialSyncCompleted(object sender, EventArgs e)
|
||||
{
|
||||
// Check for camera config info first
|
||||
if (_config.CameraInfo.Count > 0)
|
||||
{
|
||||
Debug.Console(0, this, "Reading codec cameraInfo from config properties.");
|
||||
SetUpCameras(_config.CameraInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "No cameraInfo defined in video codec config. Attempting to get camera info from codec status data");
|
||||
try
|
||||
{
|
||||
var cameraInfo = new List<CameraInfo>();
|
||||
|
||||
foreach (var camera in CodecStatus.Status.Cameras.Camera)
|
||||
{
|
||||
var id = Convert.ToUInt16(camera.id);
|
||||
var info = new CameraInfo() { CameraNumber = id, Name = string.Format("{0} {1}", camera.Manufacturer, camera.Model), SourceId = camera.DetectedConnector.ConnectorId };
|
||||
cameraInfo.Add(info);
|
||||
}
|
||||
|
||||
Debug.Console(0, this, "Successfully got cameraInfo for {0} cameras from codec.", cameraInfo.Count);
|
||||
|
||||
SetUpCameras(cameraInfo);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(2, this, "Error generating camera info from codec status data: {0}", ex);
|
||||
}
|
||||
}
|
||||
|
||||
// Fire the ready event
|
||||
SetIsReady();
|
||||
//CommDebuggingIsOn = false;
|
||||
|
||||
GetCallHistory();
|
||||
@@ -688,9 +624,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
BookingsRefreshTimer = new CTimer(GetBookings, 900000, 900000); // 15 minute timer to check for new booking info
|
||||
GetBookings(null);
|
||||
|
||||
// Fire the ready event
|
||||
SetIsReady();
|
||||
}
|
||||
|
||||
public void SetCommDebug(string s)
|
||||
@@ -712,12 +645,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
Debug.Console(1, this, "Socket status change {0}", e.Client.ClientStatus);
|
||||
if (e.Client.IsConnected)
|
||||
{
|
||||
if(!_syncState.LoginMessageWasReceived)
|
||||
_loginMessageReceivedTimer = new CTimer(o => DisconnectClientAndReconnect(), 5000);
|
||||
if(!SyncState.LoginMessageWasReceived)
|
||||
LoginMessageReceivedTimer = new CTimer(o => DisconnectClientAndReconnect(), 5000);
|
||||
}
|
||||
else
|
||||
{
|
||||
_syncState.CodecDisconnected();
|
||||
SyncState.CodecDisconnected();
|
||||
PhonebookSyncState.CodecDisconnected();
|
||||
|
||||
if (PhonebookRefreshTimer != null)
|
||||
@@ -740,7 +673,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
Communication.Disconnect();
|
||||
|
||||
_retryConnectionTimer = new CTimer(o => Communication.Connect(), 2000);
|
||||
RetryConnectionTimer = new CTimer(o => Communication.Connect(), 2000);
|
||||
|
||||
//CrestronEnvironment.Sleep(2000);
|
||||
|
||||
@@ -757,66 +690,66 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
if (CommDebuggingIsOn)
|
||||
{
|
||||
if (!_jsonFeedbackMessageIsIncoming)
|
||||
if (!JsonFeedbackMessageIsIncoming)
|
||||
Debug.Console(1, this, "RX: '{0}'", args.Text);
|
||||
}
|
||||
|
||||
if (args.Text == "{" + Delimiter) // Check for the beginning of a new JSON message
|
||||
{
|
||||
_jsonFeedbackMessageIsIncoming = true;
|
||||
JsonFeedbackMessageIsIncoming = true;
|
||||
|
||||
if (CommDebuggingIsOn)
|
||||
Debug.Console(1, this, "Incoming JSON message...");
|
||||
|
||||
_jsonMessage = new StringBuilder();
|
||||
JsonMessage = new StringBuilder();
|
||||
}
|
||||
else if (args.Text == "}" + Delimiter) // Check for the end of a JSON message
|
||||
{
|
||||
_jsonFeedbackMessageIsIncoming = false;
|
||||
JsonFeedbackMessageIsIncoming = false;
|
||||
|
||||
_jsonMessage.Append(args.Text);
|
||||
JsonMessage.Append(args.Text);
|
||||
|
||||
if (CommDebuggingIsOn)
|
||||
Debug.Console(1, this, "Complete JSON Received:\n{0}", _jsonMessage.ToString());
|
||||
Debug.Console(1, this, "Complete JSON Received:\n{0}", JsonMessage.ToString());
|
||||
|
||||
// Enqueue the complete message to be deserialized
|
||||
|
||||
_receiveQueue.Enqueue(new ProcessStringMessage(_jsonMessage.ToString(), DeserializeResponse));
|
||||
ReceiveQueue.Enqueue(new ProcessStringMessage(JsonMessage.ToString(), DeserializeResponse));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(_jsonFeedbackMessageIsIncoming)
|
||||
if(JsonFeedbackMessageIsIncoming)
|
||||
{
|
||||
_jsonMessage.Append(args.Text);
|
||||
JsonMessage.Append(args.Text);
|
||||
|
||||
//Debug.Console(1, this, "Building JSON:\n{0}", JsonMessage.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_syncState.InitialSyncComplete)
|
||||
if (!SyncState.InitialSyncComplete)
|
||||
{
|
||||
switch (args.Text.Trim().ToLower()) // remove the whitespace
|
||||
{
|
||||
case "*r login successful":
|
||||
{
|
||||
_syncState.LoginMessageReceived();
|
||||
SyncState.LoginMessageReceived();
|
||||
|
||||
if(_loginMessageReceivedTimer != null)
|
||||
_loginMessageReceivedTimer.Stop();
|
||||
if(LoginMessageReceivedTimer != null)
|
||||
LoginMessageReceivedTimer.Stop();
|
||||
|
||||
SendText("xPreferences outputmode json");
|
||||
break;
|
||||
}
|
||||
case "xpreferences outputmode json":
|
||||
{
|
||||
if (!_syncState.InitialStatusMessageWasReceived)
|
||||
if (!SyncState.InitialStatusMessageWasReceived)
|
||||
SendText("xStatus");
|
||||
break;
|
||||
}
|
||||
case "xfeedback register /event/calldisconnect":
|
||||
{
|
||||
_syncState.FeedbackRegistered();
|
||||
SyncState.FeedbackRegistered();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -859,35 +792,14 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
// Check to see if the message contains /Status/Conference/Presentation/LocalInstance and extract source value
|
||||
var conference = tempCodecStatus.Status.Conference;
|
||||
|
||||
if (conference.Presentation != null && conference.Presentation.LocalInstance == null)
|
||||
{
|
||||
// Handles an empty presentation object response
|
||||
return;
|
||||
}
|
||||
|
||||
if (conference.Presentation.LocalInstance.Count > 0)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(conference.Presentation.LocalInstance[0].ghost))
|
||||
{
|
||||
_presentationSource = 0;
|
||||
_presentationLocalOnly = false;
|
||||
_presentationLocalRemote = false;
|
||||
}
|
||||
PresentationSource = 0;
|
||||
else if (conference.Presentation.LocalInstance[0].Source != null)
|
||||
{
|
||||
_presentationSource = conference.Presentation.LocalInstance[0].Source.IntValue;
|
||||
|
||||
// Check for any values in the SendingMode property
|
||||
if (conference.Presentation.LocalInstance.Any((i) => !string.IsNullOrEmpty(i.SendingMode.Value)))
|
||||
{
|
||||
_presentationLocalOnly = conference.Presentation.LocalInstance.Any((i) => i.SendingMode.LocalOnly);
|
||||
_presentationLocalRemote = conference.Presentation.LocalInstance.Any((i) => i.SendingMode.LocalRemote);
|
||||
}
|
||||
PresentationSource = conference.Presentation.LocalInstance[0].Source.IntValue;
|
||||
}
|
||||
|
||||
PresentationSourceFeedback.FireUpdate();
|
||||
PresentationSendingLocalOnlyFeedback.FireUpdate();
|
||||
PresentationSendingLocalRemoteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
// Check to see if this is a call status message received after the initial status message
|
||||
@@ -909,10 +821,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
if (!string.IsNullOrEmpty(call.Status.Value))
|
||||
{
|
||||
tempActiveCall.Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value);
|
||||
if (tempActiveCall.Status == eCodecCallStatus.OnHold)
|
||||
{
|
||||
tempActiveCall.IsOnHold = true;
|
||||
}
|
||||
|
||||
if (newStatus == eCodecCallStatus.Connected)
|
||||
GetCallHistory();
|
||||
@@ -939,19 +847,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
changeDetected = true;
|
||||
}
|
||||
}
|
||||
if(call.Duration != null)
|
||||
{
|
||||
if(!string.IsNullOrEmpty(call.Duration.Value))
|
||||
{
|
||||
tempActiveCall.Duration = call.Duration.DurationValue;
|
||||
changeDetected = true;
|
||||
}
|
||||
}
|
||||
if(call.PlacedOnHold != null)
|
||||
{
|
||||
tempActiveCall.IsOnHold = call.PlacedOnHold.BoolValue;
|
||||
changeDetected = true;
|
||||
}
|
||||
|
||||
if (changeDetected)
|
||||
{
|
||||
@@ -970,9 +865,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
Name = call.DisplayName.Value,
|
||||
Number = call.RemoteNumber.Value,
|
||||
Type = CodecCallType.ConvertToTypeEnum(call.CallType.Value),
|
||||
Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value),
|
||||
Duration = call.Duration.DurationValue,
|
||||
IsOnHold = call.PlacedOnHold.BoolValue,
|
||||
Direction = CodecCallDirection.ConvertToDirectionEnum(call.Direction.Value)
|
||||
};
|
||||
|
||||
// Add it to the ActiveCalls List
|
||||
@@ -1052,11 +945,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
JsonConvert.PopulateObject(response, CodecStatus);
|
||||
}
|
||||
|
||||
if (!_syncState.InitialStatusMessageWasReceived)
|
||||
if (!SyncState.InitialStatusMessageWasReceived)
|
||||
{
|
||||
_syncState.InitialStatusMessageReceived();
|
||||
SyncState.InitialStatusMessageReceived();
|
||||
|
||||
if (!_syncState.InitialConfigurationMessageWasReceived)
|
||||
if (!SyncState.InitialConfigurationMessageWasReceived)
|
||||
SendText("xConfiguration");
|
||||
}
|
||||
}
|
||||
@@ -1066,12 +959,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
JsonConvert.PopulateObject(response, CodecConfiguration);
|
||||
|
||||
if (!_syncState.InitialConfigurationMessageWasReceived)
|
||||
if (!SyncState.InitialConfigurationMessageWasReceived)
|
||||
{
|
||||
_syncState.InitialConfigurationMessageReceived();
|
||||
if (!_syncState.FeedbackWasRegistered)
|
||||
SyncState.InitialConfigurationMessageReceived();
|
||||
if (!SyncState.FeedbackWasRegistered)
|
||||
{
|
||||
SendText(_cliFeedbackRegistrationExpression);
|
||||
SendText(CliFeedbackRegistrationExpression);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1186,16 +1079,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Console(1, this, "Error Deserializing feedback from codec: {0}", ex);
|
||||
|
||||
if (ex is Newtonsoft.Json.JsonReaderException)
|
||||
{
|
||||
Debug.Console(1, this, "Received malformed response from codec.");
|
||||
|
||||
//Communication.Disconnect();
|
||||
|
||||
//Initialize();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1211,7 +1094,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
var handler = DirectoryResultReturned;
|
||||
if (handler != null)
|
||||
{
|
||||
Debug.Console(2, this, "Directory result returned");
|
||||
handler(this, new DirectoryEventArgs()
|
||||
{
|
||||
Directory = result,
|
||||
@@ -1255,7 +1137,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public override void ExecuteSwitch(object selector)
|
||||
{
|
||||
(selector as Action)();
|
||||
_presentationSourceKey = selector.ToString();
|
||||
PresentationSourceKey = selector.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1265,7 +1147,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
ExecuteSwitch(inputSelector);
|
||||
_presentationSourceKey = inputSelector.ToString();
|
||||
PresentationSourceKey = inputSelector.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -1344,13 +1226,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
private void GetPhonebookFolders()
|
||||
{
|
||||
// Get Phonebook Folders (determine local/corporate from config, and set results limit)
|
||||
SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Folder", _phonebookMode));
|
||||
SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Folder", PhonebookMode));
|
||||
}
|
||||
|
||||
private void GetPhonebookContacts()
|
||||
{
|
||||
// Get Phonebook Folders (determine local/corporate from config, and set results limit)
|
||||
SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact Limit: {1}", _phonebookMode, _phonebookResultsLimit));
|
||||
SendText(string.Format("xCommand Phonebook Search PhonebookType: {0} ContactType: Contact Limit: {1}", PhonebookMode, PhonebookResultsLimit));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1359,7 +1241,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// <param name="searchString"></param>
|
||||
public void SearchDirectory(string searchString)
|
||||
{
|
||||
SendText(string.Format("xCommand Phonebook Search SearchString: \"{0}\" PhonebookType: {1} ContactType: Contact Limit: {2}", searchString, _phonebookMode, _phonebookResultsLimit));
|
||||
SendText(string.Format("xCommand Phonebook Search SearchString: \"{0}\" PhonebookType: {1} ContactType: Contact Limit: {2}", searchString, PhonebookMode, PhonebookResultsLimit));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1368,7 +1250,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// <param name="folderId"></param>
|
||||
public void GetDirectoryFolderContents(string folderId)
|
||||
{
|
||||
SendText(string.Format("xCommand Phonebook Search FolderId: {0} PhonebookType: {1} ContactType: Any Limit: {2}", folderId, _phonebookMode, _phonebookResultsLimit));
|
||||
SendText(string.Format("xCommand Phonebook Search FolderId: {0} PhonebookType: {1} ContactType: Any Limit: {2}", folderId, PhonebookMode, PhonebookResultsLimit));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1466,8 +1348,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
SendText(string.Format("xCommand Dial Number: \"{0}\" Protocol: {1} CallRate: {2} CallType: {3} BookingId: {4}", number, protocol, callRate, callType, meetingId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void EndCall(CodecActiveCallItem activeCall)
|
||||
{
|
||||
SendText(string.Format("xCommand Call Disconnect CallId: {0}", activeCall.Id));
|
||||
@@ -1491,94 +1372,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SendText("xCommand Call Reject");
|
||||
}
|
||||
|
||||
#region IHasCallHold Members
|
||||
|
||||
public void HoldCall(CodecActiveCallItem activeCall)
|
||||
{
|
||||
SendText(string.Format("xCommand Call Hold CallId: {0}", activeCall.Id));
|
||||
}
|
||||
|
||||
public void ResumeCall(CodecActiveCallItem activeCall)
|
||||
{
|
||||
SendText(string.Format("xCommand Call Resume CallId: {0}", activeCall.Id));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IJoinCalls
|
||||
|
||||
public void JoinCall(CodecActiveCallItem activeCall)
|
||||
{
|
||||
SendText(string.Format("xCommand Call Join CallId: {0}", activeCall.Id));
|
||||
}
|
||||
|
||||
public void JoinAllCalls()
|
||||
{
|
||||
StringBuilder ids = new StringBuilder();
|
||||
|
||||
foreach (var call in ActiveCalls)
|
||||
{
|
||||
if (call.IsActiveCall)
|
||||
{
|
||||
ids.Append(string.Format(" CallId: {0}", call.Id));
|
||||
}
|
||||
}
|
||||
|
||||
if (ids.Length > 0)
|
||||
{
|
||||
SendText(string.Format("xCommand Call Join {0}", ids.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Sends tones to the last connected call
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
public override void SendDtmf(string s)
|
||||
{
|
||||
SendText(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", GetCallId(), s));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends tones to a specific call
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <param name="activeCall"></param>
|
||||
public override void SendDtmf(string s, CodecActiveCallItem activeCall)
|
||||
{
|
||||
SendText(string.Format("xCommand Call DTMFSend CallId: {0} DTMFString: \"{1}\"", activeCall.Id, s));
|
||||
}
|
||||
|
||||
public void SelectPresentationSource(int source)
|
||||
{
|
||||
_desiredPresentationSource = source;
|
||||
PresentationSource = source;
|
||||
|
||||
StartSharing();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the ringtone volume level
|
||||
/// </summary>
|
||||
/// <param name="volume">level from 0 - 100 in increments of 5</param>
|
||||
public void SetRingtoneVolume(int volume)
|
||||
{
|
||||
if (volume < 0 || volume > 100)
|
||||
{
|
||||
Debug.Console(0, this, "Cannot set ringtone volume to '{0}'. Value must be between 0 - 100", volume);
|
||||
return;
|
||||
}
|
||||
|
||||
if (volume % 5 != 0)
|
||||
{
|
||||
Debug.Console(0, this, "Cannot set ringtone volume to '{0}'. Value must be between 0 - 100 and a multiple of 5", volume);
|
||||
return;
|
||||
}
|
||||
|
||||
SendText(string.Format("xConfiguration Audio SoundsAndAlerts RingVolume: {0}", volume));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select source 1 as the presetnation source
|
||||
/// </summary>
|
||||
@@ -1595,8 +1400,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SelectPresentationSource(3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Starts presentation sharing
|
||||
/// </summary>
|
||||
@@ -1609,8 +1412,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
else
|
||||
sendingMode = "LocalOnly";
|
||||
|
||||
if (_desiredPresentationSource > 0)
|
||||
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", _desiredPresentationSource, sendingMode));
|
||||
if(PresentationSource > 0)
|
||||
SendText(string.Format("xCommand Presentation Start PresentationSource: {0} SendingMode: {1}", PresentationSource, sendingMode));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1618,13 +1421,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
public override void StopSharing()
|
||||
{
|
||||
_desiredPresentationSource = 0;
|
||||
PresentationSource = 0;
|
||||
|
||||
SendText("xCommand Presentation Stop");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void PrivacyModeOn()
|
||||
{
|
||||
SendText("xCommand Audio Microphones Mute");
|
||||
@@ -1730,10 +1531,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap)
|
||||
{
|
||||
// Custom commands to codec
|
||||
trilist.SetStringSigAction(joinMap.CommandToDevice.JoinNumber, (s) => this.SendText(s));
|
||||
|
||||
|
||||
var dndCodec = this as IHasDoNotDisturbMode;
|
||||
if (dndCodec != null)
|
||||
{
|
||||
@@ -1757,17 +1554,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
trilist.SetSigFalseAction(joinMap.DeactivateStandby.JoinNumber, () => halfwakeCodec.StandbyDeactivate());
|
||||
trilist.SetSigFalseAction(joinMap.ActivateHalfWakeMode.JoinNumber, () => halfwakeCodec.HalfwakeActivate());
|
||||
}
|
||||
|
||||
// Ringtone volume
|
||||
trilist.SetUShortSigAction(joinMap.RingtoneVolume.JoinNumber, (u) => SetRingtoneVolume(u));
|
||||
RingtoneVolumeFeedback.LinkInputSig(trilist.UShortInput[joinMap.RingtoneVolume.JoinNumber]);
|
||||
|
||||
// Presentation Source
|
||||
trilist.SetUShortSigAction(joinMap.PresentationSource.JoinNumber, (u) => SelectPresentationSource(u));
|
||||
PresentationSourceFeedback.LinkInputSig(trilist.UShortInput[joinMap.PresentationSource.JoinNumber]);
|
||||
|
||||
PresentationSendingLocalOnlyFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PresentationLocalOnly.JoinNumber]);
|
||||
PresentationSendingLocalRemoteFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PresentationLocalRemote.JoinNumber]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1841,9 +1627,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
public void SelfviewPipPositionToggle()
|
||||
{
|
||||
if (_currentSelfviewPipPosition != null)
|
||||
if (CurrentSelfviewPipPosition != null)
|
||||
{
|
||||
var nextPipPositionIndex = SelfviewPipPositions.IndexOf(_currentSelfviewPipPosition) + 1;
|
||||
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;
|
||||
@@ -1866,9 +1652,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
public void LocalLayoutToggle()
|
||||
{
|
||||
if(_currentLocalLayout != null)
|
||||
if(CurrentLocalLayout != null)
|
||||
{
|
||||
var nextLocalLayoutIndex = LocalLayouts.IndexOf(_currentLocalLayout) + 1;
|
||||
var nextLocalLayoutIndex = LocalLayouts.IndexOf(CurrentLocalLayout) + 1;
|
||||
|
||||
if (nextLocalLayoutIndex >= LocalLayouts.Count) // Check if we need to loop back to the first item in the list
|
||||
nextLocalLayoutIndex = 0;
|
||||
@@ -1882,9 +1668,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
public void LocalLayoutToggleSingleProminent()
|
||||
{
|
||||
if (_currentLocalLayout != null)
|
||||
if (CurrentLocalLayout != null)
|
||||
{
|
||||
if (_currentLocalLayout.Label != "Prominent")
|
||||
if (CurrentLocalLayout.Label != "Prominent")
|
||||
LocalLayoutSet(LocalLayouts.FirstOrDefault(l => l.Label.Equals("Prominent")));
|
||||
else
|
||||
LocalLayoutSet(LocalLayouts.FirstOrDefault(l => l.Label.Equals("Single")));
|
||||
@@ -1898,11 +1684,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public void MinMaxLayoutToggle()
|
||||
{
|
||||
if (PresentationViewMaximizedFeedback.BoolValue)
|
||||
_currentPresentationView = "Minimized";
|
||||
CurrentPresentationView = "Minimized";
|
||||
else
|
||||
_currentPresentationView = "Maximized";
|
||||
CurrentPresentationView = "Maximized";
|
||||
|
||||
SendText(string.Format("xCommand Video PresentationView Set View: {0}", _currentPresentationView));
|
||||
SendText(string.Format("xCommand Video PresentationView Set View: {0}", CurrentPresentationView));
|
||||
PresentationViewMaximizedFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
@@ -1911,9 +1697,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
void ComputeSelfviewPipStatus()
|
||||
{
|
||||
_currentSelfviewPipPosition = SelfviewPipPositions.FirstOrDefault(p => p.Command.ToLower().Equals(CodecStatus.Status.Video.Selfview.PIPPosition.Value.ToLower()));
|
||||
CurrentSelfviewPipPosition = SelfviewPipPositions.FirstOrDefault(p => p.Command.ToLower().Equals(CodecStatus.Status.Video.Selfview.PIPPosition.Value.ToLower()));
|
||||
|
||||
if(_currentSelfviewPipPosition != null)
|
||||
if(CurrentSelfviewPipPosition != null)
|
||||
SelfviewIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
@@ -1922,9 +1708,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// </summary>
|
||||
void ComputeLocalLayout()
|
||||
{
|
||||
_currentLocalLayout = LocalLayouts.FirstOrDefault(l => l.Command.ToLower().Equals(CodecStatus.Status.Video.Layout.LayoutFamily.Local.Value.ToLower()));
|
||||
CurrentLocalLayout = LocalLayouts.FirstOrDefault(l => l.Command.ToLower().Equals(CodecStatus.Status.Video.Layout.LayoutFamily.Local.Value.ToLower()));
|
||||
|
||||
if (_currentLocalLayout != null)
|
||||
if (CurrentLocalLayout != null)
|
||||
LocalLayoutFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
@@ -1972,70 +1758,30 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// <summary>
|
||||
/// Builds the cameras List. Could later be modified to build from config data
|
||||
/// </summary>
|
||||
void SetUpCameras(List<CameraInfo> cameraInfo)
|
||||
void SetUpCameras()
|
||||
{
|
||||
// Add the internal camera
|
||||
Cameras = new List<CameraBase>();
|
||||
|
||||
var camCount = CodecStatus.Status.Cameras.Camera.Count;
|
||||
var internalCamera = new CiscoSparkCamera(Key + "-camera1", "Near End", this, 1);
|
||||
|
||||
Debug.Console(0, this, "Codec reports {0} cameras", camCount);
|
||||
|
||||
|
||||
// Deal with the case of 1 or no reported cameras
|
||||
if (camCount <= 1)
|
||||
{
|
||||
var internalCamera = new CiscoSparkCamera(Key + "-camera1", "Near End", this, 1);
|
||||
|
||||
if (camCount > 0)
|
||||
{
|
||||
// Try to get the capabilities from the codec
|
||||
if (CodecStatus.Status.Cameras.Camera[0] != null && CodecStatus.Status.Cameras.Camera[0].Capabilities != null)
|
||||
{
|
||||
internalCamera.SetCapabilites(CodecStatus.Status.Cameras.Camera[0].Capabilities.Options.Value);
|
||||
}
|
||||
}
|
||||
|
||||
Cameras.Add(internalCamera);
|
||||
DeviceManager.AddDevice(internalCamera);
|
||||
}
|
||||
if(CodecStatus.Status.Cameras.Camera.Count > 0)
|
||||
internalCamera.SetCapabilites(CodecStatus.Status.Cameras.Camera[0].Capabilities.Options.Value);
|
||||
else
|
||||
{
|
||||
// Setup all the cameras
|
||||
for (int i = 0; i < camCount; i++)
|
||||
{
|
||||
var cam = CodecStatus.Status.Cameras.Camera[i];
|
||||
// Somehow subscribe to the event on the Options.Value property and update when it changes.
|
||||
|
||||
var id = (uint)i;
|
||||
var name = string.Format("Camera {0}", id);
|
||||
|
||||
// Check for a config object that matches the camera number
|
||||
var camInfo = cameraInfo.FirstOrDefault(c => c.CameraNumber == i + 1);
|
||||
if (camInfo != null)
|
||||
{
|
||||
id = (uint)camInfo.SourceId;
|
||||
name = camInfo.Name;
|
||||
}
|
||||
|
||||
var key = string.Format("{0}-camera{1}", Key, id);
|
||||
var camera = new CiscoSparkCamera(key, name, this, id);
|
||||
|
||||
if (cam.Capabilities != null)
|
||||
{
|
||||
camera.SetCapabilites(cam.Capabilities.Options.Value);
|
||||
}
|
||||
|
||||
Cameras.Add(camera);
|
||||
}
|
||||
}
|
||||
Cameras.Add(internalCamera);
|
||||
|
||||
// Add the far end camera
|
||||
var farEndCamera = new CiscoFarEndCamera(Key + "-cameraFar", "Far End", this);
|
||||
Cameras.Add(farEndCamera);
|
||||
|
||||
SelectedCameraFeedback = new StringFeedback(() => SelectedCamera.Key);
|
||||
SelectedCameraFeedback = new StringFeedback(() => SelectedCamera.Key);
|
||||
|
||||
ControllingFarEndCameraFeedback = new BoolFeedback(() => SelectedCamera is IAmFarEndCamera);
|
||||
ControllingFarEndCameraFeedback = new BoolFeedback(() => SelectedCamera is IAmFarEndCamera);
|
||||
|
||||
DeviceManager.AddDevice(internalCamera);
|
||||
DeviceManager.AddDevice(farEndCamera);
|
||||
|
||||
NearEndPresets = new List<CodecRoomPreset>(15);
|
||||
|
||||
@@ -2048,8 +1794,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
FarEndRoomPresets.Add(new CodecRoomPreset(i, label, true, false));
|
||||
}
|
||||
|
||||
SelectedCamera = Cameras[0]; ; // call the method to select the camera and ensure the feedbacks get updated.
|
||||
|
||||
SelectedCamera = internalCamera; ; // call the method to select the camera and ensure the feedbacks get updated.
|
||||
}
|
||||
|
||||
#region IHasCodecCameras Members
|
||||
@@ -2097,12 +1842,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
}
|
||||
else
|
||||
Debug.Console(2, this, "Unable to select camera with key: '{0}'", key);
|
||||
|
||||
var ciscoCam = camera as CiscoSparkCamera;
|
||||
if (ciscoCam != null)
|
||||
{
|
||||
SendText(string.Format("xCommand Video Input SetMainVideoSource SourceId: {0}", ciscoCam.CameraId));
|
||||
}
|
||||
}
|
||||
|
||||
public CameraBase FarEndCamera { get; private set; }
|
||||
@@ -2220,8 +1959,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CodecConfiguration.Configuration.Conference.AutoAnswer.Mode.Value == null) return false;
|
||||
return CodecConfiguration.Configuration.Conference.AutoAnswer.Mode.Value.ToLower() == "on";
|
||||
if (CodecConfiguration.Configuration.Conference.AutoAnswer.Mode.Value.ToLower() == "on")
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,16 +50,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
public uint PhonebookResultsLimit { get; set; }
|
||||
|
||||
[JsonProperty("UiBranding")]
|
||||
public BrandingLogoProperties UiBranding { get; set; }
|
||||
public BrandingLogoProperties UiBranding { get; set; }
|
||||
|
||||
[JsonProperty("cameraInfo")]
|
||||
public List<CameraInfo> CameraInfo { get; set; }
|
||||
|
||||
|
||||
public CiscoSparkCodecPropertiesConfig()
|
||||
{
|
||||
CameraInfo = new List<CameraInfo>();
|
||||
}
|
||||
}
|
||||
|
||||
public class SharingProperties
|
||||
@@ -76,14 +68,4 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
[JsonProperty("brandingUrl")]
|
||||
public string BrandingUrl { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes configuration information for the near end cameras
|
||||
/// </summary>
|
||||
public class CameraInfo
|
||||
{
|
||||
public int CameraNumber { get; set; }
|
||||
public string Name { get; set; }
|
||||
public int SourceId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,8 +26,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
void CodecRoomPresetSelect(int preset);
|
||||
|
||||
void CodecRoomPresetStore(int preset, string description);
|
||||
|
||||
void SelectFarEndPreset(int preset);
|
||||
}
|
||||
|
||||
public static class RoomPresets
|
||||
|
||||
@@ -112,46 +112,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class RingVolume : ValueProperty
|
||||
public class RingVolume
|
||||
{
|
||||
public string valueSpaceRef { get; set; }
|
||||
|
||||
string _Value;
|
||||
|
||||
/// <summary>
|
||||
/// Sets Value and triggers the action when set
|
||||
/// </summary>
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_Value = value;
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public int Volume
|
||||
{
|
||||
get
|
||||
{
|
||||
return Int32.Parse(_Value);
|
||||
}
|
||||
}
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class SoundsAndAlerts
|
||||
{
|
||||
public RingTone RingTone { get; set; }
|
||||
public RingVolume RingVolume { get; set; }
|
||||
|
||||
public SoundsAndAlerts()
|
||||
{
|
||||
RingVolume = new RingVolume();
|
||||
}
|
||||
}
|
||||
|
||||
public class Audio
|
||||
@@ -161,12 +131,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public Microphones Microphones { get; set; }
|
||||
public Output Output { get; set; }
|
||||
public SoundsAndAlerts SoundsAndAlerts { get; set; }
|
||||
|
||||
|
||||
public Audio()
|
||||
{
|
||||
SoundsAndAlerts = new SoundsAndAlerts();
|
||||
}
|
||||
}
|
||||
|
||||
public class DefaultMode
|
||||
@@ -376,13 +340,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public Delay Delay { get; set; }
|
||||
public Mode9 Mode { get; set; }
|
||||
public Mute2 Mute { get; set; }
|
||||
|
||||
public AutoAnswer()
|
||||
{
|
||||
Mode = new Mode9();
|
||||
Delay = new Delay();
|
||||
Mute = new Mute2();
|
||||
}
|
||||
}
|
||||
|
||||
public class Protocol
|
||||
@@ -483,11 +440,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public MaxTotalTransmitCallRate MaxTotalTransmitCallRate { get; set; }
|
||||
public MaxTransmitCallRate MaxTransmitCallRate { get; set; }
|
||||
public MultiStream MultiStream { get; set; }
|
||||
|
||||
public Conference()
|
||||
{
|
||||
AutoAnswer = new AutoAnswer();
|
||||
}
|
||||
}
|
||||
|
||||
public class LoginName
|
||||
@@ -1845,22 +1797,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public UserInterface UserInterface { get; set; }
|
||||
public UserManagement UserManagement { get; set; }
|
||||
public Video2 Video { get; set; }
|
||||
|
||||
public Configuration()
|
||||
{
|
||||
Audio = new Audio();
|
||||
Conference = new Conference();
|
||||
}
|
||||
}
|
||||
|
||||
public class RootObject
|
||||
{
|
||||
public Configuration Configuration { get; set; }
|
||||
|
||||
public RootObject()
|
||||
{
|
||||
Configuration = new Configuration();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,28 +12,28 @@ using PepperDash.Essentials.Devices.Common.VideoCodec.CiscoCodec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
// Helper Classes for Proerties
|
||||
public abstract class ValueProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// Triggered when Value is set
|
||||
/// </summary>
|
||||
public Action ValueChangedAction { get; set; }
|
||||
|
||||
protected void OnValueChanged()
|
||||
{
|
||||
var a = ValueChangedAction;
|
||||
if (a != null)
|
||||
a();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This class exists to capture serialized data sent back by a Cisco codec in JSON output mode
|
||||
/// </summary>
|
||||
public class CiscoCodecStatus
|
||||
{
|
||||
// Helper Classes for Proerties
|
||||
public abstract class ValueProperty
|
||||
{
|
||||
/// <summary>
|
||||
/// Triggered when Value is set
|
||||
/// </summary>
|
||||
public Action ValueChangedAction { get; set; }
|
||||
|
||||
protected void OnValueChanged()
|
||||
{
|
||||
var a = ValueChangedAction;
|
||||
if (a != null)
|
||||
a();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ConnectionStatus
|
||||
{
|
||||
@@ -262,25 +262,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class DectectedConnector
|
||||
{
|
||||
public string Value { get; set; }
|
||||
|
||||
public int ConnectorId
|
||||
{
|
||||
get
|
||||
{
|
||||
return Convert.ToUInt16(Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Camera
|
||||
{
|
||||
public string id { get; set; }
|
||||
public Capabilities Capabilities { get; set; }
|
||||
public Connected Connected { get; set; }
|
||||
public DectectedConnector DetectedConnector { get; set; }
|
||||
public Flip Flip { get; set; }
|
||||
public HardwareID HardwareID { get; set; }
|
||||
public MacAddress MacAddress { get; set; }
|
||||
@@ -312,34 +298,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
}
|
||||
}
|
||||
|
||||
public class CallStatus : ValueProperty
|
||||
{
|
||||
string _Value;
|
||||
public bool BoolValue { get; private set; }
|
||||
|
||||
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
// If the incoming value is "Active" it sets the BoolValue true, otherwise sets it false
|
||||
_Value = value;
|
||||
BoolValue = value == "Connected";
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Status2 : ValueProperty
|
||||
{
|
||||
string _Value;
|
||||
public bool BoolValue { get; private set; }
|
||||
|
||||
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
@@ -595,47 +558,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
}
|
||||
}
|
||||
|
||||
public class SendingMode : ValueProperty
|
||||
public class SendingMode
|
||||
{
|
||||
string _Value;
|
||||
|
||||
/// <summary>
|
||||
/// Sets Value and triggers the action when set
|
||||
/// </summary>
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_Value = value;
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public bool LocalOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
if(string.IsNullOrEmpty(_Value))
|
||||
return false;
|
||||
|
||||
return _Value.ToLower() == "localonly";
|
||||
}
|
||||
}
|
||||
|
||||
public bool LocalRemote
|
||||
{
|
||||
get
|
||||
{
|
||||
if(string.IsNullOrEmpty(_Value))
|
||||
return false;
|
||||
|
||||
return _Value.ToLower() == "localremote";
|
||||
}
|
||||
}
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class LocalInstance
|
||||
@@ -648,7 +573,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public LocalInstance()
|
||||
{
|
||||
Source = new Source2();
|
||||
SendingMode = new SendingMode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2025,30 +1949,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Duration : ValueProperty
|
||||
public class Duration
|
||||
{
|
||||
private string _Value;
|
||||
|
||||
public string Value
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Value;
|
||||
}
|
||||
set
|
||||
{
|
||||
_Value = value;
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public TimeSpan DurationValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return new TimeSpan(0, 0, Int32.Parse(_Value));
|
||||
}
|
||||
}
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class FacilityServiceId
|
||||
@@ -2061,19 +1964,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class PlacedOnHold : ValueProperty
|
||||
public class PlacedOnHold
|
||||
{
|
||||
public bool BoolValue { get; private set; }
|
||||
|
||||
public string Value
|
||||
{
|
||||
set
|
||||
{
|
||||
// If the incoming value is "True" it sets the BoolValue true, otherwise sets it false
|
||||
BoolValue = value == "True";
|
||||
OnValueChanged();
|
||||
}
|
||||
}
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
public class Protocol
|
||||
@@ -2114,15 +2007,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
public Protocol Protocol { get; set; }
|
||||
public ReceiveCallRate ReceiveCallRate { get; set; }
|
||||
public RemoteNumber RemoteNumber { get; set; }
|
||||
public CallStatus Status { get; set; }
|
||||
public Status2 Status { get; set; }
|
||||
public TransmitCallRate TransmitCallRate { get; set; }
|
||||
|
||||
public Call()
|
||||
{
|
||||
CallType = new CallType();
|
||||
Status = new CallStatus();
|
||||
Duration = new Duration();
|
||||
PlacedOnHold = new PlacedOnHold();
|
||||
Status = new Status2();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
using PepperDash.Essentials.Devices.Common.Codec;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
public interface IJoinCalls
|
||||
{
|
||||
void JoinCall(CodecActiveCallItem activeCall);
|
||||
void JoinAllCalls();
|
||||
}
|
||||
}
|
||||
@@ -751,11 +751,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
SetConfig(Config);
|
||||
}
|
||||
|
||||
public void SelectFarEndPreset(int i)
|
||||
{
|
||||
Debug.Console(1, this, "Selecting Far End Preset: {0}", i);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected override void CustomSetConfig(DeviceConfig config)
|
||||
|
||||
@@ -149,7 +149,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
public abstract void AcceptCall(CodecActiveCallItem call);
|
||||
public abstract void RejectCall(CodecActiveCallItem call);
|
||||
public abstract void SendDtmf(string s);
|
||||
public virtual void SendDtmf(string s, CodecActiveCallItem call) { }
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -257,12 +256,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public virtual void ListCalls()
|
||||
{
|
||||
Debug.Console(1, this, "Active Calls:");
|
||||
|
||||
var sb = new StringBuilder();
|
||||
foreach (var c in ActiveCalls)
|
||||
{
|
||||
sb.AppendFormat("id: {0} number: {1} -- name: {2} status: {3} onHold: {4}\r\n", c.Id, c.Number, c.Name, c.Status, c.IsOnHold);
|
||||
sb.AppendFormat("{0} {1} -- {2} {3}\n", c.Id, c.Number, c.Name, c.Status);
|
||||
}
|
||||
Debug.Console(1, this, "\n{0}\n", sb.ToString());
|
||||
}
|
||||
@@ -330,22 +327,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
LinkVideoCodecVolumeToApi(trilist, joinMap);
|
||||
|
||||
LinkVideoCodecInfoToApi(trilist, joinMap);
|
||||
|
||||
// Register for this event to link any functions that require the codec to be ready first
|
||||
codec.IsReadyChange += (o, a) =>
|
||||
{
|
||||
if (codec is IHasCodecCameras)
|
||||
{
|
||||
LinkVideoCodecCameraToApi(codec as IHasCodecCameras, trilist, joinMap);
|
||||
}
|
||||
};
|
||||
|
||||
if (codec is ICommunicationMonitor)
|
||||
{
|
||||
LinkVideoCodecCommMonitorToApi(codec as ICommunicationMonitor, trilist, joinMap);
|
||||
}
|
||||
|
||||
if (codec is IHasCodecCameras)
|
||||
{
|
||||
LinkVideoCodecCameraToApi(codec as IHasCodecCameras, trilist, joinMap);
|
||||
}
|
||||
|
||||
if (codec is IHasCodecSelfView)
|
||||
{
|
||||
@@ -399,11 +389,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
LinkVideoCodecPhoneToApi(codec as IHasPhoneDialing, trilist, joinMap);
|
||||
}
|
||||
|
||||
if (codec is IHasCallHistory)
|
||||
{
|
||||
LinkVideoCodecCallHistoryToApi(codec as IHasCallHistory, trilist, joinMap);
|
||||
}
|
||||
|
||||
trilist.OnlineStatusChange += (device, args) =>
|
||||
{
|
||||
if (!args.DeviceOnLine) return;
|
||||
@@ -450,11 +435,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
(codec as IHasPhoneDialing).PhoneOffHookFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
if (codec is IHasCallHistory)
|
||||
{
|
||||
UpdateCallHistory((codec as IHasCallHistory), trilist, joinMap);
|
||||
}
|
||||
|
||||
SharingContentIsOnFeedback.FireUpdate();
|
||||
|
||||
trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall);
|
||||
@@ -463,31 +443,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
};
|
||||
}
|
||||
|
||||
private void LinkVideoCodecInfoToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
trilist.SetBool(joinMap.MultiSiteOptionIsEnabled.JoinNumber, this.CodecInfo.MultiSiteOptionIsEnabled);
|
||||
trilist.SetBool(joinMap.AutoAnswerEnabled.JoinNumber, this.CodecInfo.AutoAnswerEnabled);
|
||||
trilist.SetString(joinMap.DeviceIpAddresss.JoinNumber, this.CodecInfo.IpAddress);
|
||||
trilist.SetString(joinMap.SipPhoneNumber.JoinNumber, this.CodecInfo.SipPhoneNumber);
|
||||
trilist.SetString(joinMap.E164Alias.JoinNumber, this.CodecInfo.E164Alias);
|
||||
trilist.SetString(joinMap.H323Id.JoinNumber, this.CodecInfo.H323Id);
|
||||
trilist.SetString(joinMap.SipUri.JoinNumber, this.CodecInfo.SipUri);
|
||||
|
||||
trilist.OnlineStatusChange += (o, a) =>
|
||||
{
|
||||
if (a.DeviceOnLine)
|
||||
{
|
||||
trilist.SetBool(joinMap.MultiSiteOptionIsEnabled.JoinNumber, this.CodecInfo.MultiSiteOptionIsEnabled);
|
||||
trilist.SetBool(joinMap.AutoAnswerEnabled.JoinNumber, this.CodecInfo.AutoAnswerEnabled);
|
||||
trilist.SetString(joinMap.DeviceIpAddresss.JoinNumber, this.CodecInfo.IpAddress);
|
||||
trilist.SetString(joinMap.SipPhoneNumber.JoinNumber, this.CodecInfo.SipPhoneNumber);
|
||||
trilist.SetString(joinMap.E164Alias.JoinNumber, this.CodecInfo.E164Alias);
|
||||
trilist.SetString(joinMap.H323Id.JoinNumber, this.CodecInfo.H323Id);
|
||||
trilist.SetString(joinMap.SipUri.JoinNumber, this.CodecInfo.SipUri);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void LinkVideoCodecPhoneToApi(IHasPhoneDialing codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
codec.PhoneOffHookFeedback.LinkInputSig(trilist.BooleanInput[joinMap.PhoneHookState.JoinNumber]);
|
||||
@@ -939,33 +894,18 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
private void LinkVideoCodecDirectoryToApi(IHasDirectory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
codec.CurrentDirectoryResultIsNotDirectoryRoot.LinkComplementInputSig(
|
||||
trilist.BooleanInput[joinMap.DirectoryIsRoot.JoinNumber]);
|
||||
trilist.BooleanInput[joinMap.DirectoryIsRoot.JoinNumber]);
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.DirectoryRoot.JoinNumber, codec.SetCurrentDirectoryToRoot);
|
||||
|
||||
trilist.SetStringSigAction(joinMap.DirectorySearchString.JoinNumber, codec.SearchDirectory);
|
||||
|
||||
trilist.SetUShortSigAction(joinMap.DirectorySelectRow.JoinNumber, (i) => SelectDirectoryEntry(codec, i, trilist, joinMap));
|
||||
|
||||
// Report feedback for number of contact methods for selected contact
|
||||
trilist.SetUShortSigAction(joinMap.DirectorySelectRow.JoinNumber, (i) => SelectDirectoryEntry(codec, i));
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.DirectoryRoot.JoinNumber, codec.SetCurrentDirectoryToRoot);
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.DirectoryFolderBack.JoinNumber, codec.GetDirectoryParentFolderContents);
|
||||
|
||||
if (codec.DirectoryRoot != null)
|
||||
{
|
||||
trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)codec.DirectoryRoot.CurrentDirectoryResults.Count);
|
||||
|
||||
var clearBytes = XSigHelpers.ClearOutputs();
|
||||
|
||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber,
|
||||
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
||||
var directoryXSig = UpdateDirectoryXSig(codec.DirectoryRoot, !codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue);
|
||||
|
||||
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||
|
||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig);
|
||||
}
|
||||
|
||||
codec.DirectoryResultReturned += (sender, args) =>
|
||||
{
|
||||
trilist.SetUshort(joinMap.DirectoryRowCount.JoinNumber, (ushort)args.Directory.CurrentDirectoryResults.Count);
|
||||
@@ -976,160 +916,44 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
||||
var directoryXSig = UpdateDirectoryXSig(args.Directory, !codec.CurrentDirectoryResultIsNotDirectoryRoot.BoolValue);
|
||||
|
||||
Debug.Console(2, this, "Directory XSig Length: {0}", directoryXSig.Length);
|
||||
|
||||
trilist.SetString(joinMap.DirectoryEntries.JoinNumber, directoryXSig);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void SelectDirectoryEntry(IHasDirectory codec, ushort i, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
private void SelectDirectoryEntry(IHasDirectory codec, ushort i)
|
||||
{
|
||||
if (i < 1 || i > codec.CurrentDirectoryResult.CurrentDirectoryResults.Count) return;
|
||||
var entry = codec.CurrentDirectoryResult.CurrentDirectoryResults[i - 1];
|
||||
|
||||
_selectedDirectoryItem = codec.CurrentDirectoryResult.CurrentDirectoryResults[i - 1];
|
||||
|
||||
|
||||
if (_selectedDirectoryItem is DirectoryFolder)
|
||||
if (entry is DirectoryFolder)
|
||||
{
|
||||
codec.GetDirectoryFolderContents(_selectedDirectoryItem.FolderId);
|
||||
trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0);
|
||||
trilist.SetString(joinMap.DirectorySelectedFolderName.JoinNumber, _selectedDirectoryItem.Name);
|
||||
trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, string.Empty);
|
||||
trilist.ClearUShortSigAction(joinMap.SelectContactMethod.JoinNumber);
|
||||
trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedLine.JoinNumber);
|
||||
trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber);
|
||||
return;
|
||||
codec.GetDirectoryFolderContents(entry.FolderId);
|
||||
return;
|
||||
}
|
||||
|
||||
// not a folder. Clear this value
|
||||
trilist.SetString(joinMap.DirectorySelectedFolderName.JoinNumber, string.Empty);
|
||||
var dialableEntry = entry as IInvitableContact;
|
||||
|
||||
var selectedContact = _selectedDirectoryItem as DirectoryContact;
|
||||
if (selectedContact != null)
|
||||
{
|
||||
trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, selectedContact.Name);
|
||||
|
||||
}
|
||||
if (dialableEntry != null)
|
||||
{
|
||||
Dial(dialableEntry);
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow auto dial of selected line. Always dials first contact method
|
||||
if (!trilist.GetBool(joinMap.DirectoryDisableAutoDialSelectedLine.JoinNumber))
|
||||
{
|
||||
var invitableEntry = _selectedDirectoryItem as IInvitableContact;
|
||||
var entryToDial = entry as DirectoryContact;
|
||||
|
||||
if (invitableEntry != null)
|
||||
{
|
||||
Dial(invitableEntry);
|
||||
return;
|
||||
}
|
||||
if (entryToDial == null) return;
|
||||
|
||||
var entryToDial = _selectedDirectoryItem as DirectoryContact;
|
||||
|
||||
trilist.SetString(joinMap.DirectoryEntrySelectedNumber.JoinNumber, selectedContact.ContactMethods[0].Number);
|
||||
|
||||
if (entryToDial == null) return;
|
||||
|
||||
Dial(entryToDial.ContactMethods[0].Number);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If auto dial is disabled...
|
||||
var entryToDial = _selectedDirectoryItem as DirectoryContact;
|
||||
|
||||
if (entryToDial == null)
|
||||
{
|
||||
// Clear out values and actions from last selected item
|
||||
trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, 0);
|
||||
trilist.SetString(joinMap.DirectoryEntrySelectedName.JoinNumber, string.Empty);
|
||||
trilist.ClearUShortSigAction(joinMap.SelectContactMethod.JoinNumber);
|
||||
trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedLine.JoinNumber);
|
||||
trilist.ClearBoolSigAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber);
|
||||
return;
|
||||
}
|
||||
|
||||
trilist.SetUshort(joinMap.SelectedContactMethodCount.JoinNumber, (ushort)entryToDial.ContactMethods.Count);
|
||||
|
||||
// Update the action to dial the selected contact method
|
||||
trilist.SetUShortSigAction(joinMap.SelectContactMethod.JoinNumber, (u) =>
|
||||
{
|
||||
if (u < 1 || u > entryToDial.ContactMethods.Count) return;
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.DirectoryDialSelectedContactMethod.JoinNumber, () => Dial(entryToDial.ContactMethods[u - 1].Number));
|
||||
});
|
||||
|
||||
// Sets DirectoryDialSelectedLine join action to dial first contact method
|
||||
trilist.SetSigFalseAction(joinMap.DirectoryDialSelectedLine.JoinNumber, () => Dial(entryToDial.ContactMethods[0].Number));
|
||||
|
||||
var clearBytes = XSigHelpers.ClearOutputs();
|
||||
|
||||
trilist.SetString(joinMap.ContactMethods.JoinNumber,
|
||||
Encoding.GetEncoding(XSigEncoding).GetString(clearBytes, 0, clearBytes.Length));
|
||||
var contactMethodsXSig = UpdateContactMethodsXSig(entryToDial);
|
||||
|
||||
trilist.SetString(joinMap.ContactMethods.JoinNumber, contactMethodsXSig);
|
||||
}
|
||||
Dial(entryToDial.ContactMethods[0].Number);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates the XSig data representing the available contact methods for the selected DirectoryContact
|
||||
/// </summary>
|
||||
/// <param name="contact"></param>
|
||||
/// <returns></returns>
|
||||
private string UpdateContactMethodsXSig(DirectoryContact contact)
|
||||
{
|
||||
const int maxMethods = 10;
|
||||
const int maxStrings = 3;
|
||||
const int offset = maxStrings;
|
||||
var stringIndex = 0;
|
||||
var arrayIndex = 0;
|
||||
// Create a new token array and set the size to the number of methods times the total number of signals
|
||||
var tokenArray = new XSigToken[maxMethods * offset];
|
||||
|
||||
Debug.Console(2, this, "Creating XSIG token array with size {0}", maxMethods * offset);
|
||||
|
||||
// TODO: Add code to generate XSig data
|
||||
foreach (var method in contact.ContactMethods)
|
||||
{
|
||||
if (arrayIndex >= maxMethods * offset)
|
||||
break;
|
||||
|
||||
//serials
|
||||
tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, method.Number);
|
||||
tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, method.ContactMethodId.ToString());
|
||||
tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, method.Device.ToString());
|
||||
|
||||
arrayIndex += offset;
|
||||
stringIndex += maxStrings;
|
||||
}
|
||||
|
||||
while (arrayIndex < maxMethods)
|
||||
{
|
||||
tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, String.Empty);
|
||||
tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, String.Empty);
|
||||
tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, String.Empty);
|
||||
|
||||
arrayIndex += offset;
|
||||
stringIndex += maxStrings;
|
||||
}
|
||||
|
||||
return GetXSigString(tokenArray);
|
||||
}
|
||||
|
||||
private string UpdateDirectoryXSig(CodecDirectory directory, bool isRoot)
|
||||
{
|
||||
var contactIndex = 1;
|
||||
var tokenArray = new XSigToken[directory.CurrentDirectoryResults.Count];
|
||||
|
||||
Debug.Console(2, this, "Is root {0} Directory Count: {1}", isRoot, directory.CurrentDirectoryResults.Count);
|
||||
|
||||
foreach (var entry in directory.CurrentDirectoryResults)
|
||||
{
|
||||
var arrayIndex = contactIndex - 1;
|
||||
|
||||
Debug.Console(2, this, "Entry Name: {0}, Folder ID: {1}", entry.Name, entry.FolderId);
|
||||
|
||||
if (entry is DirectoryFolder && entry.ParentFolderId == "root")
|
||||
{
|
||||
tokenArray[arrayIndex] = new XSigSerialToken(contactIndex, String.Format("[+] {0}", entry.Name));
|
||||
@@ -1139,6 +963,8 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isRoot && String.IsNullOrEmpty(entry.FolderId)) continue;
|
||||
|
||||
tokenArray[arrayIndex] = new XSigSerialToken(contactIndex, entry.Name);
|
||||
|
||||
contactIndex++;
|
||||
@@ -1152,25 +978,8 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
trilist.SetSigFalseAction(joinMap.ManualDial.JoinNumber,
|
||||
() => Dial(trilist.StringOutput[joinMap.CurrentDialString.JoinNumber].StringValue));
|
||||
|
||||
//End All calls
|
||||
trilist.SetSigFalseAction(joinMap.EndAllCalls.JoinNumber, EndAllCalls);
|
||||
|
||||
//End a specific call, specified by index. Maximum 8 calls supported
|
||||
for (int i = 0; i < joinMap.EndCallStart.JoinSpan; i++)
|
||||
{
|
||||
trilist.SetSigFalseAction((uint)(joinMap.EndCallStart.JoinNumber + i), () =>
|
||||
{
|
||||
var call = ActiveCalls[i];
|
||||
if (call != null)
|
||||
{
|
||||
EndCall(call);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[End Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
}
|
||||
//End All calls for now
|
||||
trilist.SetSigFalseAction(joinMap.EndCall.JoinNumber, EndAllCalls);
|
||||
|
||||
trilist.SetBool(joinMap.HookState.JoinNumber, IsInCall);
|
||||
|
||||
@@ -1189,87 +998,13 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
}
|
||||
|
||||
trilist.SetString(joinMap.CurrentCallData.JoinNumber, UpdateCallStatusXSig());
|
||||
|
||||
trilist.SetUshort(joinMap.ConnectedCallCount.JoinNumber, (ushort)ActiveCalls.Count);
|
||||
};
|
||||
|
||||
var joinCodec = this as IJoinCalls;
|
||||
if (joinCodec != null)
|
||||
{
|
||||
trilist.SetSigFalseAction(joinMap.JoinAllCalls.JoinNumber, () => joinCodec.JoinAllCalls());
|
||||
|
||||
for (int i = 0; i < joinMap.JoinCallStart.JoinSpan; i++)
|
||||
{
|
||||
trilist.SetSigFalseAction((uint)(joinMap.JoinCallStart.JoinNumber + i), () =>
|
||||
{
|
||||
var call = ActiveCalls[i];
|
||||
if (call != null)
|
||||
{
|
||||
joinCodec.JoinCall(call);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[Join Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
var holdCodec = this as IHasCallHold;
|
||||
if (holdCodec != null)
|
||||
{
|
||||
trilist.SetSigFalseAction(joinMap.HoldAllCalls.JoinNumber, () =>
|
||||
{
|
||||
foreach (var call in ActiveCalls)
|
||||
{
|
||||
holdCodec.HoldCall(call);
|
||||
}
|
||||
});
|
||||
|
||||
for (int i = 0; i < joinMap.HoldCallsStart.JoinSpan; i++)
|
||||
{
|
||||
var index = i;
|
||||
|
||||
trilist.SetSigFalseAction((uint)(joinMap.HoldCallsStart.JoinNumber + index), () =>
|
||||
{
|
||||
if (index < 0 || index >= ActiveCalls.Count) return;
|
||||
|
||||
var call = ActiveCalls[index];
|
||||
if (call != null)
|
||||
{
|
||||
holdCodec.HoldCall(call);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[Hold Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
|
||||
trilist.SetSigFalseAction((uint)(joinMap.ResumeCallsStart.JoinNumber + index), () =>
|
||||
{
|
||||
if (index < 0 || index >= ActiveCalls.Count) return;
|
||||
|
||||
var call = ActiveCalls[index];
|
||||
if (call != null)
|
||||
{
|
||||
holdCodec.ResumeCall(call);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "[Resume Call] Unable to find call at index '{0}'", i);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private string UpdateCallStatusXSig()
|
||||
{
|
||||
const int maxCalls = 8;
|
||||
const int maxStrings = 6;
|
||||
const int maxStrings = 5;
|
||||
const int offset = 6;
|
||||
var stringIndex = 0;
|
||||
var digitalIndex = maxStrings * maxCalls;
|
||||
@@ -1283,7 +1018,6 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
break;
|
||||
//digitals
|
||||
tokenArray[arrayIndex] = new XSigDigitalToken(digitalIndex + 1, call.IsActiveCall);
|
||||
tokenArray[arrayIndex + 1] = new XSigDigitalToken(digitalIndex + 2, call.IsOnHold);
|
||||
|
||||
//serials
|
||||
tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, call.Name ?? String.Empty);
|
||||
@@ -1291,12 +1025,6 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, call.Direction.ToString());
|
||||
tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 4, call.Type.ToString());
|
||||
tokenArray[arrayIndex + 5] = new XSigSerialToken(stringIndex + 5, call.Status.ToString());
|
||||
if(call.Duration != null)
|
||||
{
|
||||
// May need to verify correct string format here
|
||||
var dur = string.Format("{0:c}", call.Duration);
|
||||
tokenArray[arrayIndex + 6] = new XSigSerialToken(stringIndex + 6, dur);
|
||||
}
|
||||
|
||||
arrayIndex += offset;
|
||||
stringIndex += maxStrings;
|
||||
@@ -1306,16 +1034,13 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
{
|
||||
//digitals
|
||||
tokenArray[arrayIndex] = new XSigDigitalToken(digitalIndex + 1, false);
|
||||
tokenArray[arrayIndex + 1] = new XSigDigitalToken(digitalIndex + 2, false);
|
||||
|
||||
|
||||
//serials
|
||||
//serials
|
||||
tokenArray[arrayIndex + 1] = new XSigSerialToken(stringIndex + 1, String.Empty);
|
||||
tokenArray[arrayIndex + 2] = new XSigSerialToken(stringIndex + 2, String.Empty);
|
||||
tokenArray[arrayIndex + 3] = new XSigSerialToken(stringIndex + 3, String.Empty);
|
||||
tokenArray[arrayIndex + 4] = new XSigSerialToken(stringIndex + 4, String.Empty);
|
||||
tokenArray[arrayIndex + 5] = new XSigSerialToken(stringIndex + 5, String.Empty);
|
||||
tokenArray[arrayIndex + 6] = new XSigSerialToken(stringIndex + 6, String.Empty);
|
||||
|
||||
arrayIndex += offset;
|
||||
stringIndex += maxStrings;
|
||||
@@ -1327,61 +1052,25 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
|
||||
private void LinkVideoCodecDtmfToApi(BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf0.JoinNumber, () => SendDtmfAction("0", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf1.JoinNumber, () => SendDtmfAction("1", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf2.JoinNumber, () => SendDtmfAction("2", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf3.JoinNumber, () => SendDtmfAction("3", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf4.JoinNumber, () => SendDtmfAction("4", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf5.JoinNumber, () => SendDtmfAction("5", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf6.JoinNumber, () => SendDtmfAction("6", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf7.JoinNumber, () => SendDtmfAction("7", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf8.JoinNumber, () => SendDtmfAction("8", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf9.JoinNumber, () => SendDtmfAction("9", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.DtmfStar.JoinNumber, () => SendDtmfAction("*", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.DtmfPound.JoinNumber, () => SendDtmfAction("#", trilist, joinMap));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf0.JoinNumber, () => SendDtmf("0"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf1.JoinNumber, () => SendDtmf("1"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf2.JoinNumber, () => SendDtmf("2"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf3.JoinNumber, () => SendDtmf("3"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf4.JoinNumber, () => SendDtmf("4"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf5.JoinNumber, () => SendDtmf("5"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf6.JoinNumber, () => SendDtmf("6"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf7.JoinNumber, () => SendDtmf("7"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf8.JoinNumber, () => SendDtmf("8"));
|
||||
trilist.SetSigFalseAction(joinMap.Dtmf9.JoinNumber, () => SendDtmf("9"));
|
||||
trilist.SetSigFalseAction(joinMap.DtmfStar.JoinNumber, () => SendDtmf("*"));
|
||||
trilist.SetSigFalseAction(joinMap.DtmfPound.JoinNumber, () => SendDtmf("#"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends the specified string as a DTMF command.
|
||||
/// Reads the value of the SendDtmfToSpecificCallInstance digital join and SelectCall analog join to determine
|
||||
/// Whther to send to a specific call index or to the last connected call
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <param name="trilist"></param>
|
||||
/// <param name="joinMap"></param>
|
||||
private void SendDtmfAction(string s, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
if (!trilist.GetBool(joinMap.SendDtmfToSpecificCallIndex.JoinNumber))
|
||||
{
|
||||
SendDtmf(s);
|
||||
}
|
||||
else
|
||||
{
|
||||
var callIndex = trilist.GetUshort(joinMap.SelectCall.JoinNumber);
|
||||
if (callIndex > 0 && callIndex <= 8)
|
||||
{
|
||||
var call = ActiveCalls[callIndex - 1];
|
||||
if (call != null && call.IsActiveCall)
|
||||
{
|
||||
SendDtmf(s, call);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Warning: No call found at index {0} or call is not active.", callIndex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Warning: Invalid call index specified. Please use a value of 1-8.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LinkVideoCodecCameraLayoutsToApi(IHasCodecLayouts codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
trilist.SetSigFalseAction(joinMap.CameraLayout.JoinNumber, codec.LocalLayoutToggle);
|
||||
|
||||
codec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.CurrentLayoutStringFb.JoinNumber]);
|
||||
codec.LocalLayoutFeedback.LinkInputSig(trilist.StringInput[joinMap.CameraLayoutStringFb.JoinNumber]);
|
||||
}
|
||||
|
||||
private void LinkVideoCodecCameraModeToApi(IHasCameraAutoMode codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
@@ -1512,81 +1201,18 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
else camera.ZoomStop();
|
||||
});
|
||||
|
||||
|
||||
trilist.SetBoolSigAction(joinMap.CameraFocusNear.JoinNumber, (b) =>
|
||||
{
|
||||
if (codec.SelectedCamera == null) return;
|
||||
var camera = codec.SelectedCamera as IHasCameraFocusControl;
|
||||
|
||||
if (camera == null) return;
|
||||
|
||||
if (b) camera.FocusNear();
|
||||
else camera.FocusStop();
|
||||
});
|
||||
|
||||
trilist.SetBoolSigAction(joinMap.CameraFocusFar.JoinNumber, (b) =>
|
||||
{
|
||||
if (codec.SelectedCamera == null) return;
|
||||
var camera = codec.SelectedCamera as IHasCameraFocusControl;
|
||||
|
||||
if (camera == null) return;
|
||||
|
||||
if (b) camera.FocusFar();
|
||||
else camera.FocusStop();
|
||||
});
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.CameraFocusAuto.JoinNumber, () =>
|
||||
{
|
||||
if (codec.SelectedCamera == null) return;
|
||||
var camera = codec.SelectedCamera as IHasCameraFocusControl;
|
||||
|
||||
if (camera == null) return;
|
||||
|
||||
camera.TriggerAutoFocus();
|
||||
});
|
||||
|
||||
// Camera count
|
||||
trilist.SetUshort(joinMap.CameraCount.JoinNumber, (ushort)codec.Cameras.Count);
|
||||
|
||||
// Camera names
|
||||
for (uint i = 0; i < joinMap.CameraNamesFb.JoinSpan; i++)
|
||||
{
|
||||
//Check the count first
|
||||
if (i < codec.Cameras.Count && codec.Cameras[(int)i] != null)
|
||||
{
|
||||
trilist.SetString(joinMap.CameraNamesFb.JoinNumber + i, codec.Cameras[(int)i].Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
trilist.SetString(joinMap.CameraNamesFb.JoinNumber + i, "");
|
||||
}
|
||||
}
|
||||
|
||||
//Camera Select
|
||||
trilist.SetUShortSigAction(joinMap.CameraNumberSelect.JoinNumber, (i) =>
|
||||
{
|
||||
if (i > 0 && i <= codec.Cameras.Count)
|
||||
{
|
||||
codec.SelectCamera(codec.Cameras[i - 1].Key);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, this, "Unable to select. No camera found at index {0}", i);
|
||||
}
|
||||
});
|
||||
if (codec.SelectedCamera == null) return;
|
||||
|
||||
// Set initial selected camera feedback
|
||||
if (codec.SelectedCamera != null)
|
||||
{
|
||||
trilist.SetUshort(joinMap.CameraNumberSelect.JoinNumber, (ushort)codec.Cameras.FindIndex((c) => c.Key == codec.SelectedCamera.Key));
|
||||
}
|
||||
codec.SelectCamera(codec.Cameras[i].Key);
|
||||
});
|
||||
|
||||
codec.CameraSelected += (sender, args) =>
|
||||
{
|
||||
var i = (ushort)codec.Cameras.FindIndex((c) => c.Key == args.SelectedCamera.Key);
|
||||
|
||||
trilist.SetUshort(joinMap.CameraNumberSelect.JoinNumber, (ushort)(i + 1));
|
||||
|
||||
if (codec is IHasCodecRoomPresets)
|
||||
{
|
||||
return;
|
||||
@@ -1629,16 +1255,10 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
trilist.SetUShortSigAction(joinMap.CameraPresetSelect.JoinNumber, (i) =>
|
||||
{
|
||||
presetCodec.CodecRoomPresetSelect(i);
|
||||
|
||||
trilist.SetUshort(joinMap.CameraPresetSelect.JoinNumber, i);
|
||||
});
|
||||
|
||||
|
||||
// Far End Presets
|
||||
trilist.SetUShortSigAction(joinMap.FarEndPresetSelect.JoinNumber, (i) =>
|
||||
{
|
||||
presetCodec.SelectFarEndPreset(i);
|
||||
});
|
||||
|
||||
|
||||
trilist.SetSigFalseAction(joinMap.CameraPresetSave.JoinNumber,
|
||||
() =>
|
||||
{
|
||||
@@ -1648,96 +1268,7 @@ ScreenIndexIsPinnedTo: {8} (a{17})
|
||||
});
|
||||
}
|
||||
|
||||
// Following fields only used for Bridging
|
||||
private int _selectedRecentCallItemIndex;
|
||||
private CodecCallHistory.CallHistoryEntry _selectedRecentCallItem;
|
||||
private DirectoryItem _selectedDirectoryItem;
|
||||
|
||||
private void LinkVideoCodecCallHistoryToApi(IHasCallHistory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
codec.CallHistory.RecentCallsListHasChanged += (o, a) =>
|
||||
{
|
||||
UpdateCallHistory(codec, trilist, joinMap);
|
||||
};
|
||||
|
||||
// Selected item action and feedback
|
||||
trilist.SetUShortSigAction(joinMap.SelectRecentCallItem.JoinNumber, (u) =>
|
||||
{
|
||||
if (u == 0 || u > codec.CallHistory.RecentCalls.Count)
|
||||
{
|
||||
Debug.Console(2, this, "Recent Call History index out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
_selectedRecentCallItemIndex = (int)(u - 1);
|
||||
trilist.SetUshort(joinMap.SelectRecentCallItem.JoinNumber, u);
|
||||
|
||||
var _selectedRecentCallItem = codec.CallHistory.RecentCalls[_selectedRecentCallItemIndex];
|
||||
|
||||
if (_selectedRecentCallItem != null)
|
||||
{
|
||||
trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, _selectedRecentCallItem.Name);
|
||||
trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, _selectedRecentCallItem.Number);
|
||||
trilist.SetSigFalseAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber, () => codec.RemoveCallHistoryEntry(_selectedRecentCallItem));
|
||||
trilist.SetSigFalseAction(joinMap.DialSelectedRecentCallItem.JoinNumber, () => this.Dial(_selectedRecentCallItem.Number));
|
||||
}
|
||||
else
|
||||
{
|
||||
trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, string.Empty);
|
||||
trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, string.Empty);
|
||||
trilist.ClearBoolSigAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber);
|
||||
trilist.ClearBoolSigAction(joinMap.DialSelectedRecentCallItem.JoinNumber);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void UpdateCallHistory(IHasCallHistory codec, BasicTriList trilist, VideoCodecControllerJoinMap joinMap)
|
||||
{
|
||||
// Clear out selected item
|
||||
_selectedRecentCallItemIndex = 0;
|
||||
_selectedRecentCallItem = null;
|
||||
trilist.SetUshort(joinMap.SelectRecentCallItem.JoinNumber, 0);
|
||||
trilist.SetString(joinMap.SelectedRecentCallName.JoinNumber, string.Empty);
|
||||
trilist.SetString(joinMap.SelectedRecentCallNumber.JoinNumber, string.Empty);
|
||||
trilist.ClearBoolSigAction(joinMap.RemoveSelectedRecentCallItem.JoinNumber);
|
||||
//
|
||||
|
||||
trilist.SetUshort(joinMap.RecentCallCount.JoinNumber, (ushort)codec.CallHistory.RecentCalls.Count);
|
||||
|
||||
// Update the call history joins
|
||||
var maxItems = joinMap.RecentCallNamesStart.JoinSpan;
|
||||
|
||||
// Create history
|
||||
uint index = 0;
|
||||
for (uint i = 0; i < maxItems && i < codec.CallHistory.RecentCalls.Count; i++)
|
||||
{
|
||||
trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + i, codec.CallHistory.RecentCalls[(int)i].Name);
|
||||
trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + i, codec.CallHistory.RecentCalls[(int)i].StartTime.ToShortTimeString());
|
||||
trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + i, (ushort)codec.CallHistory.RecentCalls[(int)i].OccurrenceType);
|
||||
//i++;
|
||||
index = i;
|
||||
}
|
||||
|
||||
//foreach(var item in codec.CallHistory.RecentCalls)
|
||||
//{
|
||||
// trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + i, item.Name);
|
||||
// trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + i, item.StartTime.ToShortTimeString());
|
||||
// trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + i, (ushort)item.OccurrenceType);
|
||||
// i++;
|
||||
//}
|
||||
|
||||
// Clears existing items
|
||||
for (uint j = index; j < maxItems; j++)
|
||||
{
|
||||
trilist.SetString(joinMap.RecentCallNamesStart.JoinNumber + j, string.Empty);
|
||||
trilist.SetString(joinMap.RecentCallTimesStart.JoinNumber + j, string.Empty);
|
||||
trilist.SetUshort(joinMap.RecentCallOccurrenceType.JoinNumber + j, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private string SetCameraPresetNames(IEnumerable<CodecRoomPreset> presets)
|
||||
private string SetCameraPresetNames(IEnumerable<CodecRoomPreset> presets)
|
||||
{
|
||||
return SetCameraPresetNames(presets.Select(p => p.Description).ToList());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user