mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Merge pull request #836 from PepperDash/feature/add-cisco-features
Feature/add cisco features
This commit is contained in:
@@ -57,7 +57,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public DescriptionAttribute(string description)
|
public DescriptionAttribute(string description)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Setting Description: {0}", description);
|
//Debug.Console(2, "Setting Description: {0}", description);
|
||||||
_Description = description;
|
_Description = description;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public ConfigSnippetAttribute(string configSnippet)
|
public ConfigSnippetAttribute(string configSnippet)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Setting Config Snippet {0}", configSnippet);
|
//Debug.Console(2, "Setting Config Snippet {0}", configSnippet);
|
||||||
_ConfigSnippet = configSnippet;
|
_ConfigSnippet = configSnippet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
foreach (var typeName in TypeNames)
|
foreach (var typeName in TypeNames)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Getting Description Attribute from class: '{0}'", typeof(T).FullName);
|
//Debug.Console(2, "Getting Description Attribute from class: '{0}'", typeof(T).FullName);
|
||||||
var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[];
|
var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[];
|
||||||
string description = descriptionAttribute[0].Description;
|
string description = descriptionAttribute[0].Description;
|
||||||
var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[];
|
var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[];
|
||||||
|
|||||||
@@ -69,13 +69,13 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static void AddFactoryForType(string typeName, Func<DeviceConfig, IKeyed> method)
|
public static void AddFactoryForType(string typeName, Func<DeviceConfig, IKeyed> method)
|
||||||
{
|
{
|
||||||
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
//Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
||||||
DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method});
|
DeviceFactory.FactoryMethods.Add(typeName, new DeviceFactoryWrapper() { FactoryMethod = method});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void AddFactoryForType(string typeName, string description, CType cType, Func<DeviceConfig, IKeyed> method)
|
public static void AddFactoryForType(string typeName, string description, CType cType, Func<DeviceConfig, IKeyed> method)
|
||||||
{
|
{
|
||||||
Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
//Debug.Console(1, Debug.ErrorLogLevel.Notice, "Adding factory method for type '{0}'", typeName);
|
||||||
|
|
||||||
if(FactoryMethods.ContainsKey(typeName))
|
if(FactoryMethods.ContainsKey(typeName))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="fileName"></param>
|
/// <param name="fileName"></param>
|
||||||
static LoadedAssembly LoadAssembly(string filePath)
|
static LoadedAssembly LoadAssembly(string filePath)
|
||||||
{
|
{
|
||||||
Debug.Console(2, "Attempting to load {0}", filePath);
|
//Debug.Console(2, "Attempting to load {0}", filePath);
|
||||||
var assembly = Assembly.LoadFrom(filePath);
|
var assembly = Assembly.LoadFrom(filePath);
|
||||||
if (assembly != null)
|
if (assembly != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes a device that has Do Not Disturb mode capability
|
||||||
|
/// </summary>
|
||||||
|
public interface IHasDoNotDisturbMode
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Indictes whether Do Not Disturb mode is on (Activated)
|
||||||
|
/// </summary>
|
||||||
|
BoolFeedback DoNotDisturbModeIsOnFeedback { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Activates Do Not Disturb mode
|
||||||
|
/// </summary>
|
||||||
|
void ActivateDoNotDisturbMode();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deactivates Do Not Disturb mode
|
||||||
|
/// </summary>
|
||||||
|
void DeactivateDoNotDisturbMode();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toggles Do Not Disturb mode
|
||||||
|
/// </summary>
|
||||||
|
void ToggleDoNotDisturbMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IHasDoNotDisturbModeWithTimeout : IHasDoNotDisturbMode
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Activates Do Not Disturb mode with a timeout
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="timeout"></param>
|
||||||
|
void ActivateDoNotDisturbMode(int timeout);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -108,6 +108,7 @@
|
|||||||
<Compile Include="Codec\eCodecCallStatus.cs" />
|
<Compile Include="Codec\eCodecCallStatus.cs" />
|
||||||
<Compile Include="Codec\eMeetingPrivacy.cs" />
|
<Compile Include="Codec\eMeetingPrivacy.cs" />
|
||||||
<Compile Include="Codec\iCodecAudio.cs" />
|
<Compile Include="Codec\iCodecAudio.cs" />
|
||||||
|
<Compile Include="Codec\IHasDoNotDisturb.cs" />
|
||||||
<Compile Include="Codec\IHasExternalSourceSwitching.cs" />
|
<Compile Include="Codec\IHasExternalSourceSwitching.cs" />
|
||||||
<Compile Include="ImageProcessors\TVOneCorio.cs" />
|
<Compile Include="ImageProcessors\TVOneCorio.cs" />
|
||||||
<Compile Include="ImageProcessors\TVOneCorioPropertiesConfig.cs" />
|
<Compile Include="ImageProcessors\TVOneCorioPropertiesConfig.cs" />
|
||||||
@@ -117,6 +118,7 @@
|
|||||||
<Compile Include="ImageProcessors\AnalogWay\AnalogWayLiveCorePropertiesConfig.cs" />
|
<Compile Include="ImageProcessors\AnalogWay\AnalogWayLiveCorePropertiesConfig.cs" />
|
||||||
<Compile Include="SoftCodec\BlueJeansPc.cs" />
|
<Compile Include="SoftCodec\BlueJeansPc.cs" />
|
||||||
<Compile Include="VideoCodec\CiscoCodec\CiscoCamera.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\CiscoCamera.cs" />
|
||||||
|
<Compile Include="VideoCodec\CiscoCodec\CiscoCodecJoinMap.cs" />
|
||||||
<Compile Include="VideoCodec\CiscoCodec\RoomPresets.cs" />
|
<Compile Include="VideoCodec\CiscoCodec\RoomPresets.cs" />
|
||||||
<Compile Include="Cameras\CameraControl.cs" />
|
<Compile Include="Cameras\CameraControl.cs" />
|
||||||
<Compile Include="Display\PanasonicThDisplay.cs" />
|
<Compile Include="Display\PanasonicThDisplay.cs" />
|
||||||
@@ -125,6 +127,7 @@
|
|||||||
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasPresentationOnlyMeeting.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewPosition.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasSelfviewSize.cs" />
|
||||||
|
<Compile Include="VideoCodec\Interfaces\IHasStandbyMode.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\IHasStartMeeting.cs" />
|
<Compile Include="VideoCodec\Interfaces\IHasStartMeeting.cs" />
|
||||||
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
|
<Compile Include="VideoCodec\Interfaces\iVideoCodecInfo.cs" />
|
||||||
<Compile Include="Codec\iHasCallFavorites.cs" />
|
<Compile Include="Codec\iHasCallFavorites.cs" />
|
||||||
|
|||||||
@@ -0,0 +1,120 @@
|
|||||||
|
using System;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.Bridges.JoinMaps;
|
||||||
|
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
|
{
|
||||||
|
public class CiscoCodecJoinMap : VideoCodecControllerJoinMap
|
||||||
|
{
|
||||||
|
#region Digital
|
||||||
|
|
||||||
|
[JoinName("ActivateDoNotDisturbMode")]
|
||||||
|
public JoinDataComplete ActivateDoNotDisturbMode = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 221,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Activates Do Not Disturb Mode. FB High if active.",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("DeactivateDoNotDisturbMode")]
|
||||||
|
public JoinDataComplete DeactivateDoNotDisturbMode = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 222,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Deactivates Do Not Disturb Mode. FB High if deactivated.",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("ToggleDoNotDisturbMode")]
|
||||||
|
public JoinDataComplete ToggleDoNotDisturbMode = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 223,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Toggles Do Not Disturb Mode.",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("ActivateStandby")]
|
||||||
|
public JoinDataComplete ActivateStandby = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 226,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Activates Standby Mode. FB High if active.",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("DeactivateStandby")]
|
||||||
|
public JoinDataComplete DeactivateStandby = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 227,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Deactivates Standby Mode. FB High if deactivated.",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
[JoinName("ActivateHalfWakeMode")]
|
||||||
|
public JoinDataComplete ActivateHalfWakeMode = new JoinDataComplete(
|
||||||
|
new JoinData
|
||||||
|
{
|
||||||
|
JoinNumber = 228,
|
||||||
|
JoinSpan = 1
|
||||||
|
},
|
||||||
|
new JoinMetadata
|
||||||
|
{
|
||||||
|
Description = "Activates Half Wake Mode. FB High if active.",
|
||||||
|
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
|
||||||
|
JoinType = eJoinType.Digital
|
||||||
|
});
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Analog
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Serials
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public CiscoCodecJoinMap(uint joinStart)
|
||||||
|
: base(joinStart, typeof(CiscoCodecJoinMap))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public CiscoCodecJoinMap(uint joinStart, Type type)
|
||||||
|
: base(joinStart, type)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -28,7 +28,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
|
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
|
||||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
||||||
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets, IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute
|
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets,
|
||||||
|
IHasExternalSourceSwitching, IHasBranding, IHasCameraOff, IHasCameraMute, IHasDoNotDisturbMode,
|
||||||
|
IHasHalfWakeMode
|
||||||
{
|
{
|
||||||
private bool _externalSourceChangeRequested;
|
private bool _externalSourceChangeRequested;
|
||||||
|
|
||||||
@@ -316,6 +318,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CameraIsMutedFeedback = CameraIsOffFeedback;
|
CameraIsMutedFeedback = CameraIsOffFeedback;
|
||||||
SupportsCameraOff = true;
|
SupportsCameraOff = true;
|
||||||
|
|
||||||
|
DoNotDisturbModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Conference.DoNotDisturb.BoolValue);
|
||||||
|
HalfWakeModeIsOnFeedback = new BoolFeedback(() => CodecStatus.Status.Standby.State.Value == "Halfwake");
|
||||||
|
|
||||||
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
PresentationViewMaximizedFeedback = new BoolFeedback(() => CurrentPresentationView == "Maximized");
|
||||||
|
|
||||||
Communication = comm;
|
Communication = comm;
|
||||||
@@ -413,7 +418,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CodecStatus.Status.Audio.Volume.ValueChangedAction = VolumeLevelFeedback.FireUpdate;
|
CodecStatus.Status.Audio.Volume.ValueChangedAction = VolumeLevelFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Audio.VolumeMute.ValueChangedAction = MuteFeedback.FireUpdate;
|
CodecStatus.Status.Audio.VolumeMute.ValueChangedAction = MuteFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Audio.Microphones.Mute.ValueChangedAction = PrivacyModeIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Audio.Microphones.Mute.ValueChangedAction = PrivacyModeIsOnFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Standby.State.ValueChangedAction = StandbyIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Standby.State.ValueChangedAction = new Action(() =>
|
||||||
|
{
|
||||||
|
StandbyIsOnFeedback.FireUpdate();
|
||||||
|
HalfWakeModeIsOnFeedback.FireUpdate();
|
||||||
|
});
|
||||||
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeoplePresence.ValueChangedAction = RoomIsOccupiedFeedback.FireUpdate;
|
||||||
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
CodecStatus.Status.RoomAnalytics.PeopleCount.Current.ValueChangedAction = PeopleCountFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Cameras.SpeakerTrack.Status.ValueChangedAction = CameraAutoModeIsOnFeedback.FireUpdate;
|
||||||
@@ -423,6 +432,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
CodecStatus.Status.Video.Layout.LayoutFamily.Local.ValueChangedAction = ComputeLocalLayout;
|
||||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = SharingContentIsOnFeedback.FireUpdate;
|
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = SharingContentIsOnFeedback.FireUpdate;
|
||||||
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
CodecStatus.Status.Conference.Presentation.Mode.ValueChangedAction = FarEndIsSharingContentFeedback.FireUpdate;
|
||||||
|
CodecStatus.Status.Conference.DoNotDisturb.ValueChangedAction = DoNotDisturbModeIsOnFeedback.FireUpdate;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
CodecStatus.Status.Video.Input.MainVideoMute.ValueChangedAction = CameraIsOffFeedback.FireUpdate;
|
||||||
@@ -575,6 +586,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
prefix + "/Status/Audio" + Delimiter +
|
prefix + "/Status/Audio" + Delimiter +
|
||||||
prefix + "/Status/Call" + Delimiter +
|
prefix + "/Status/Call" + Delimiter +
|
||||||
prefix + "/Status/Conference/Presentation" + Delimiter +
|
prefix + "/Status/Conference/Presentation" + Delimiter +
|
||||||
|
prefix + "/Status/Conference/DoNotDisturb" + Delimiter +
|
||||||
prefix + "/Status/Cameras/SpeakerTrack" + Delimiter +
|
prefix + "/Status/Cameras/SpeakerTrack" + Delimiter +
|
||||||
prefix + "/Status/RoomAnalytics" + Delimiter +
|
prefix + "/Status/RoomAnalytics" + Delimiter +
|
||||||
prefix + "/Status/RoomPreset" + Delimiter +
|
prefix + "/Status/RoomPreset" + Delimiter +
|
||||||
@@ -583,10 +595,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
prefix + "/Status/Video/Layout" + Delimiter +
|
prefix + "/Status/Video/Layout" + Delimiter +
|
||||||
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
prefix + "/Status/Video/Input/MainVideoMute" + Delimiter +
|
||||||
prefix + "/Bookings" + Delimiter +
|
prefix + "/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
|
||||||
prefix + "/Event/Bookings" + Delimiter +
|
prefix + "/Event/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
||||||
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter +
|
||||||
|
prefix + "/Event/CallDisconnect" + Delimiter; // Keep CallDisconnect last to detect when feedback registration completes correctly
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -1495,7 +1508,49 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||||
{
|
{
|
||||||
|
var joinMap = new CiscoCodecJoinMap(joinStart);
|
||||||
|
|
||||||
|
var customJoins = JoinMapHelper.TryGetJoinMapAdvancedForDevice(joinMapKey);
|
||||||
|
|
||||||
|
if (customJoins != null)
|
||||||
|
{
|
||||||
|
joinMap.SetCustomJoinData(customJoins);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (bridge != null)
|
||||||
|
{
|
||||||
|
bridge.AddJoinMap(Key, joinMap);
|
||||||
|
}
|
||||||
|
|
||||||
LinkVideoCodecToApi(this, trilist, joinStart, joinMapKey, bridge);
|
LinkVideoCodecToApi(this, trilist, joinStart, joinMapKey, bridge);
|
||||||
|
|
||||||
|
LinkCiscoCodecToApi(trilist, joinMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LinkCiscoCodecToApi(BasicTriList trilist, CiscoCodecJoinMap joinMap)
|
||||||
|
{
|
||||||
|
var dndCodec = this as IHasDoNotDisturbMode;
|
||||||
|
if (dndCodec != null)
|
||||||
|
{
|
||||||
|
dndCodec.DoNotDisturbModeIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.ActivateDoNotDisturbMode.JoinNumber]);
|
||||||
|
dndCodec.DoNotDisturbModeIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.DeactivateDoNotDisturbMode.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.SetSigFalseAction(joinMap.ActivateDoNotDisturbMode.JoinNumber, () => dndCodec.ActivateDoNotDisturbMode());
|
||||||
|
trilist.SetSigFalseAction(joinMap.DeactivateDoNotDisturbMode.JoinNumber, () => dndCodec.DeactivateDoNotDisturbMode());
|
||||||
|
trilist.SetSigFalseAction(joinMap.ToggleDoNotDisturbMode.JoinNumber, () => dndCodec.ToggleDoNotDisturbMode());
|
||||||
|
}
|
||||||
|
|
||||||
|
var halfwakeCodec = this as IHasHalfWakeMode;
|
||||||
|
if (halfwakeCodec != null)
|
||||||
|
{
|
||||||
|
halfwakeCodec.StandbyIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.ActivateStandby.JoinNumber]);
|
||||||
|
halfwakeCodec.StandbyIsOnFeedback.LinkComplementInputSig(trilist.BooleanInput[joinMap.DeactivateStandby.JoinNumber]);
|
||||||
|
halfwakeCodec.HalfWakeModeIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.ActivateHalfWakeMode.JoinNumber]);
|
||||||
|
|
||||||
|
trilist.SetSigFalseAction(joinMap.ActivateStandby.JoinNumber, () => halfwakeCodec.StandbyActivate());
|
||||||
|
trilist.SetSigFalseAction(joinMap.DeactivateStandby.JoinNumber, () => halfwakeCodec.StandbyDeactivate());
|
||||||
|
trilist.SetSigFalseAction(joinMap.ActivateHalfWakeMode.JoinNumber, () => halfwakeCodec.HalfwakeActivate());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -2069,6 +2124,45 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
else
|
else
|
||||||
CameraMuteOn();
|
CameraMuteOn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region IHasDoNotDisturbMode Members
|
||||||
|
|
||||||
|
public BoolFeedback DoNotDisturbModeIsOnFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void ActivateDoNotDisturbMode()
|
||||||
|
{
|
||||||
|
SendText("xCommand Conference DoNotDisturb Activate");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeactivateDoNotDisturbMode()
|
||||||
|
{
|
||||||
|
SendText("xCommand Conference DoNotDisturb Deactivate");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ToggleDoNotDisturbMode()
|
||||||
|
{
|
||||||
|
if (DoNotDisturbModeIsOnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
DeactivateDoNotDisturbMode();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ActivateDoNotDisturbMode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IHasHalfWakeMode Members
|
||||||
|
|
||||||
|
public BoolFeedback HalfWakeModeIsOnFeedback { get; private set; }
|
||||||
|
|
||||||
|
public void HalfwakeActivate()
|
||||||
|
{
|
||||||
|
SendText("xCommand Standby Halfwake");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -440,9 +440,26 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public CallId CallId { get; set; }
|
public CallId CallId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DoNotDisturb
|
public class DoNotDisturb : ValueProperty
|
||||||
{
|
{
|
||||||
public string Value { get; set; }
|
string _Value;
|
||||||
|
|
||||||
|
public bool BoolValue { get; private set; }
|
||||||
|
|
||||||
|
public string Value
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _Value;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_Value = value;
|
||||||
|
// If the incoming value is "On" it sets the BoolValue true, otherwise sets it false
|
||||||
|
BoolValue = value == "On" || value == "Active";
|
||||||
|
OnValueChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Mode
|
public class Mode
|
||||||
@@ -600,6 +617,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public Conference2()
|
public Conference2()
|
||||||
{
|
{
|
||||||
Presentation = new Presentation();
|
Presentation = new Presentation();
|
||||||
|
DoNotDisturb = new DoNotDisturb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1380,12 +1398,16 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
public class State : ValueProperty
|
public class State : ValueProperty
|
||||||
{
|
{
|
||||||
|
string _value;
|
||||||
|
|
||||||
public bool BoolValue { get; private set; }
|
public bool BoolValue { get; private set; }
|
||||||
|
|
||||||
public string Value // Valid values are Standby/EnteringStandby/Halfwake/Off
|
public string Value // Valid values are Standby/EnteringStandby/Halfwake/Off
|
||||||
{
|
{
|
||||||
|
get { return _value; }
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
_value = value;
|
||||||
// If the incoming value is "On" it sets the BoolValue true, otherwise sets it false
|
// If the incoming value is "On" it sets the BoolValue true, otherwise sets it false
|
||||||
BoolValue = value == "On" || value == "Standby";
|
BoolValue = value == "On" || value == "Standby";
|
||||||
OnValueChanged();
|
OnValueChanged();
|
||||||
@@ -2091,6 +2113,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
Conference = new Conference2();
|
Conference = new Conference2();
|
||||||
SystemUnit = new SystemUnit();
|
SystemUnit = new SystemUnit();
|
||||||
Video = new Video();
|
Video = new Video();
|
||||||
|
Conference = new Conference2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes a device that has Standby Mode capability
|
||||||
|
/// </summary>
|
||||||
|
public interface IHasStandbyMode
|
||||||
|
{
|
||||||
|
BoolFeedback StandbyIsOnFeedback { get; }
|
||||||
|
|
||||||
|
void StandbyActivate();
|
||||||
|
|
||||||
|
void StandbyDeactivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Describes a device that has Half Waek Mode capability
|
||||||
|
/// </summary>
|
||||||
|
public interface IHasHalfWakeMode : IHasStandbyMode
|
||||||
|
{
|
||||||
|
BoolFeedback HalfWakeModeIsOnFeedback { get; }
|
||||||
|
|
||||||
|
void HalfwakeActivate();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ using Feedback = PepperDash.Essentials.Core.Feedback;
|
|||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
{
|
{
|
||||||
public abstract class VideoCodecBase : ReconfigurableDevice, IRoutingInputsOutputs,
|
public abstract class VideoCodecBase : ReconfigurableDevice, IRoutingInputsOutputs,
|
||||||
IUsageTracking, IHasDialer, IHasContentSharing, ICodecAudio, iVideoCodecInfo, IBridgeAdvanced
|
IUsageTracking, IHasDialer, IHasContentSharing, ICodecAudio, iVideoCodecInfo, IBridgeAdvanced, IHasStandbyMode
|
||||||
{
|
{
|
||||||
private const int XSigEncoding = 28591;
|
private const int XSigEncoding = 28591;
|
||||||
protected const int MaxParticipants = 50;
|
protected const int MaxParticipants = 50;
|
||||||
|
|||||||
Reference in New Issue
Block a user