Bringes in stashed changes to camera functions

This commit is contained in:
Neil Dorin
2019-11-26 14:27:17 -07:00
parent 84374a8af0
commit 3e9b67a1ad
10 changed files with 130 additions and 38 deletions

View File

@@ -2,13 +2,16 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices.Common.Codec;
using System.Text.RegularExpressions;
using Crestron.SimplSharp;
using Crestron.SimplSharp.Reflection;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Presets;
using PepperDash.Essentials.Devices.Common.Codec;
using Newtonsoft.Json;
namespace PepperDash.Essentials.Devices.Common.Cameras
{
@@ -21,8 +24,16 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
Focus = 8
}
public abstract class CameraBase : Device
public abstract class CameraBase : Device, IRoutingOutputs
{
public eCameraControlMode ControlMode { get; protected set; }
#region IRoutingOutputs Members
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; protected set; }
#endregion
public bool CanPan
{
get
@@ -59,14 +70,36 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
protected eCameraCapabilities Capabilities { get; set; }
public CameraBase(string key, string name) :
base(key, name) { }
base(key, name)
{
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
ControlMode = eCameraControlMode.Manual;
}
}
public class CameraPreset : PresetBase
{
public CameraPreset(int id, string description, bool def, bool isDef)
: base(id, description, def, isDef)
{
}
}
public class CameraPropertiesConfig
{
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
public ControlPropertiesConfig Control { get; set; }
[JsonProperty("supportsAutoMode")]
public bool SupportsAutoMode { get; set; }
[JsonProperty("supportsOffMode")]
public bool SupportsOffMode { get; set; }
[JsonProperty("presets")]
public List<CameraPreset> Presets { get; set; }
}
}