mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-14 04:04:58 +00:00
Merge remote-tracking branch 'origin/feature/ecs-407' into feature/cisco-spark
This commit is contained in:
@@ -1,61 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// This DVD class should cover most IR, one-way DVD and Bluray fuctions
|
||||
/// </summary>
|
||||
public class InRoomPc : Device, IHasFeedback, IRoutingOutputs, IAttachVideoStatus, IUiDisplayInfo, IUsageTracking
|
||||
{
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeLaptop; } }
|
||||
public string IconName { get; set; }
|
||||
public BoolFeedback HasPowerOnFeedback { get; private set; }
|
||||
|
||||
public RoutingOutputPort AnyVideoOut { get; private set; }
|
||||
|
||||
#region IRoutingOutputs Members
|
||||
|
||||
/// <summary>
|
||||
/// Options: hdmi
|
||||
/// </summary>
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public InRoomPc(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
IconName = "PC";
|
||||
HasPowerOnFeedback = new BoolFeedback(CommonBoolCue.HasPowerFeedback,
|
||||
() => this.GetVideoStatuses() != VideoStatusOutputs.NoStatus);
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||
OutputPorts.Add(AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.None, 0, this));
|
||||
}
|
||||
|
||||
#region IHasFeedback Members
|
||||
|
||||
/// <summary>
|
||||
/// Passes through the VideoStatuses list
|
||||
/// </summary>
|
||||
public List<Feedback> Feedbacks
|
||||
{
|
||||
get { return this.GetVideoStatuses().ToList(); }
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
/// <summary>
|
||||
/// This DVD class should cover most IR, one-way DVD and Bluray fuctions
|
||||
/// </summary>
|
||||
public class InRoomPc : Device, IHasFeedback, IRoutingOutputs, IAttachVideoStatus, IUiDisplayInfo, IUsageTracking
|
||||
{
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeLaptop; } }
|
||||
public string IconName { get; set; }
|
||||
public BoolFeedback HasPowerOnFeedback { get; private set; }
|
||||
|
||||
public RoutingOutputPort AnyVideoOut { get; private set; }
|
||||
|
||||
#region IRoutingOutputs Members
|
||||
|
||||
/// <summary>
|
||||
/// Options: hdmi
|
||||
/// </summary>
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public InRoomPc(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
IconName = "PC";
|
||||
HasPowerOnFeedback = new BoolFeedback(CommonBoolCue.HasPowerFeedback,
|
||||
() => this.GetVideoStatuses() != VideoStatusOutputs.NoStatus);
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||
OutputPorts.Add(AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.None, 0, this));
|
||||
}
|
||||
|
||||
#region IHasFeedback Members
|
||||
|
||||
/// <summary>
|
||||
/// Passes through the VideoStatuses list
|
||||
/// </summary>
|
||||
public List<Feedback> Feedbacks
|
||||
{
|
||||
get { return this.GetVideoStatuses().ToList(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IUsageTracking Members
|
||||
|
||||
public UsageTracking UsageTracker { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
}
|
||||
}
|
||||
|
||||
protected override Func<bool> MuteFeedbackFunc
|
||||
{
|
||||
get { return () => false; }
|
||||
}
|
||||
|
||||
//private HttpsClient Client;
|
||||
|
||||
//private HttpApiServer Server;
|
||||
@@ -703,6 +708,22 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
SendText("xCommand SystemUnit Boot Action: Restart");
|
||||
}
|
||||
|
||||
public override void MuteOff()
|
||||
{
|
||||
}
|
||||
|
||||
public override void MuteOn()
|
||||
{
|
||||
}
|
||||
|
||||
public override void SetVolume(ushort level)
|
||||
{
|
||||
}
|
||||
|
||||
public override void MuteToggle()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -14,7 +14,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
public MockVC(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
|
||||
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
||||
VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel);
|
||||
InCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "InCall={0}", _InCall);
|
||||
IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall);
|
||||
TransmitLevelFeedback.OutputChange += (o,a)=> Debug.Console(1, this, "TransmitLevel={0}", _tra
|
||||
}
|
||||
|
||||
protected override Func<bool> InCallFeedbackFunc
|
||||
@@ -29,6 +33,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
bool _IncomingCall;
|
||||
|
||||
|
||||
|
||||
protected override Func<bool> TransmitMuteFeedbackFunc
|
||||
{
|
||||
get { return () => _TransmitMute; }
|
||||
@@ -49,8 +55,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
protected override Func<int> VolumeLevelFeedbackFunc
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
get { return () => _VolumeLevel; }
|
||||
}
|
||||
int _VolumeLevel;
|
||||
|
||||
protected override Func<bool> MuteFeedbackFunc
|
||||
{
|
||||
get { return () => _IsMuted; }
|
||||
}
|
||||
bool _IsMuted;
|
||||
|
||||
/// <summary>
|
||||
/// Dials, yo!
|
||||
@@ -118,6 +131,31 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
}
|
||||
|
||||
public override void MuteOff()
|
||||
{
|
||||
_IsMuted = false;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void MuteOn()
|
||||
{
|
||||
_IsMuted = true;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void MuteToggle()
|
||||
{
|
||||
_IsMuted = !_IsMuted;
|
||||
MuteFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public override void SetVolume(ushort level)
|
||||
{
|
||||
_VolumeLevel = level;
|
||||
VolumeLevelFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -241,5 +279,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
Debug.Console(1, this, "TestFarEndHangup");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
abstract protected Func<bool> ReceiveMuteFeedbackFunc { get; }
|
||||
abstract protected Func<bool> PrivacyModeFeedbackFunc { get; }
|
||||
|
||||
#warning WILL ADD TRANSMIT AND REVEICE LEVEL FUNCS AFTER MERGE
|
||||
abstract protected Func<int> VolumeLevelFeedbackFunc { get; }
|
||||
abstract protected Func<bool> MuteFeedbackFunc { get; }
|
||||
|
||||
public VideoCodecBase(string key, string name)
|
||||
: base(key, name)
|
||||
@@ -42,8 +44,10 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
ReceiveMuteIsOnFeedback = new BoolFeedback(ReceiveMuteFeedbackFunc);
|
||||
TransmitMuteIsOnFeedback = new BoolFeedback(TransmitMuteFeedbackFunc);
|
||||
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeFeedbackFunc);
|
||||
#warning ADDING TX/RX FEEDBACKS HERE
|
||||
|
||||
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
||||
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
|
||||
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user