Removes essentials-framework as a submodule and brings the files back into the main repo

This commit is contained in:
Neil Dorin
2019-07-09 17:21:53 -06:00
parent 2cd68d40dc
commit 48c6bb78bc
362 changed files with 54624 additions and 5 deletions

View File

@@ -0,0 +1,73 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.DM
{
/// <summary>
/// These methods will get the funcs that return values from various video port types...
/// </summary>
public class VideoStatusHelper
{
public static VideoStatusFuncsWrapper GetHdmiInputStatusFuncs(HdmiInputPort port)
{
return new VideoStatusFuncsWrapper
{
HdcpActiveFeedbackFunc = () => port.VideoAttributes.HdcpActiveFeedback.BoolValue,
HdcpStateFeedbackFunc = () => port.VideoAttributes.HdcpStateFeedback.ToString(),
VideoResolutionFeedbackFunc = () => port.VideoAttributes.GetVideoResolutionString(),
VideoSyncFeedbackFunc = () => port.SyncDetectedFeedback.BoolValue
};
}
public static VideoStatusFuncsWrapper GetHdmiInputStatusFuncs(EndpointHdmiInput port)
{
return new VideoStatusFuncsWrapper
{
VideoResolutionFeedbackFunc = () => port.VideoAttributes.GetVideoResolutionString(),
VideoSyncFeedbackFunc = () => port.SyncDetectedFeedback.BoolValue
};
}
public static VideoStatusFuncsWrapper GetVgaInputStatusFuncs(EndpointVgaInput port)
{
return new VideoStatusFuncsWrapper
{
HdcpActiveFeedbackFunc = () => port.VideoAttributes.HdcpActiveFeedback.BoolValue,
HdcpStateFeedbackFunc = () => port.VideoAttributes.HdcpStateFeedback.ToString(),
VideoResolutionFeedbackFunc = () => port.VideoAttributes.GetVideoResolutionString(),
VideoSyncFeedbackFunc = () => port.SyncDetectedFeedback.BoolValue
};
}
public static VideoStatusFuncsWrapper GetDmInputStatusFuncs(DMInputPort port)
{
return new VideoStatusFuncsWrapper
{
HdcpActiveFeedbackFunc = () => port.VideoAttributes.HdcpActiveFeedback.BoolValue,
HdcpStateFeedbackFunc = () => port.VideoAttributes.HdcpStateFeedback.ToString(),
VideoResolutionFeedbackFunc = () => port.VideoAttributes.GetVideoResolutionString(),
VideoSyncFeedbackFunc = () => port.SyncDetectedFeedback.BoolValue
};
}
public static VideoStatusFuncsWrapper GetDisplayPortInputStatusFuncs(EndpointDisplayPortInput port)
{
return new VideoStatusFuncsWrapper
{
HdcpActiveFeedbackFunc = () => port.VideoAttributes.HdcpActiveFeedback.BoolValue,
HdcpStateFeedbackFunc = () => port.VideoAttributes.HdcpStateFeedback.ToString(),
VideoResolutionFeedbackFunc = () => port.VideoAttributes.GetVideoResolutionString(),
VideoSyncFeedbackFunc = () => port.SyncDetectedFeedback.BoolValue
};
}
}
}