mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-06 00:05:05 +00:00
docs: complete XML documentation for all projects with inheritdoc tags
Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bridge API using EISC
|
||||
/// Represents a EiscApiAdvanced
|
||||
/// </summary>
|
||||
public class EiscApiAdvanced : BridgeApi, ICommunicationMonitor
|
||||
{
|
||||
@@ -60,12 +60,19 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
AddPostActivationAction(RegisterEisc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CustomActivate method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
CommunicationMonitor.Start();
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deactivate method
|
||||
/// </summary>
|
||||
public override bool Deactivate()
|
||||
{
|
||||
CommunicationMonitor.Stop();
|
||||
@@ -123,6 +130,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "EISC registration successful");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LinkRooms method
|
||||
/// </summary>
|
||||
public void LinkRooms()
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Linking Rooms...");
|
||||
@@ -153,6 +163,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
/// </summary>
|
||||
/// <param name="deviceKey"></param>
|
||||
/// <param name="joinMap"></param>
|
||||
/// <summary>
|
||||
/// AddJoinMap method
|
||||
/// </summary>
|
||||
public void AddJoinMap(string deviceKey, JoinMapBaseAdvanced joinMap)
|
||||
{
|
||||
if (!JoinMaps.ContainsKey(deviceKey))
|
||||
@@ -166,8 +179,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prints all the join maps on this bridge
|
||||
/// PrintJoinMaps method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public virtual void PrintJoinMaps()
|
||||
{
|
||||
CrestronConsole.ConsoleCommandResponse("Join Maps for EISC IPID: {0}\r\n", Eisc.ID.ToString("X"));
|
||||
@@ -179,8 +193,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Generates markdown for all join maps on this bridge
|
||||
/// MarkdownForBridge method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public virtual void MarkdownForBridge(string bridgeKey)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Writing Joinmaps to files for EISC IPID: {0}", Eisc.ID.ToString("X"));
|
||||
@@ -196,6 +211,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
/// Prints the join map for a device by key
|
||||
/// </summary>
|
||||
/// <param name="deviceKey"></param>
|
||||
/// <summary>
|
||||
/// PrintJoinMapForDevice method
|
||||
/// </summary>
|
||||
public void PrintJoinMapForDevice(string deviceKey)
|
||||
{
|
||||
var joinMap = JoinMaps[deviceKey];
|
||||
@@ -213,6 +231,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
/// Prints the join map for a device by key
|
||||
/// </summary>
|
||||
/// <param name="deviceKey"></param>
|
||||
/// <summary>
|
||||
/// MarkdownJoinMapForDevice method
|
||||
/// </summary>
|
||||
public void MarkdownJoinMapForDevice(string deviceKey, string bridgeKey)
|
||||
{
|
||||
var joinMap = JoinMaps[deviceKey];
|
||||
@@ -233,6 +254,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
/// <param name="join"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="state"></param>
|
||||
/// <summary>
|
||||
/// ExecuteJoinAction method
|
||||
/// </summary>
|
||||
public void ExecuteJoinAction(uint join, string type, object state)
|
||||
{
|
||||
try
|
||||
@@ -318,49 +342,91 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
|
||||
#region Implementation of ICommunicationMonitor
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the CommunicationMonitor
|
||||
/// </summary>
|
||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a EiscApiPropertiesConfig
|
||||
/// </summary>
|
||||
public class EiscApiPropertiesConfig
|
||||
{
|
||||
[JsonProperty("control")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Control
|
||||
/// </summary>
|
||||
public EssentialsControlPropertiesConfig Control { get; set; }
|
||||
|
||||
[JsonProperty("devices")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Devices
|
||||
/// </summary>
|
||||
public List<ApiDevicePropertiesConfig> Devices { get; set; }
|
||||
|
||||
[JsonProperty("rooms")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Rooms
|
||||
/// </summary>
|
||||
public List<ApiRoomPropertiesConfig> Rooms { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a ApiDevicePropertiesConfig
|
||||
/// </summary>
|
||||
public class ApiDevicePropertiesConfig
|
||||
{
|
||||
[JsonProperty("deviceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DeviceKey
|
||||
/// </summary>
|
||||
public string DeviceKey { get; set; }
|
||||
|
||||
[JsonProperty("joinStart")]
|
||||
/// <summary>
|
||||
/// Gets or sets the JoinStart
|
||||
/// </summary>
|
||||
public uint JoinStart { get; set; }
|
||||
|
||||
[JsonProperty("joinMapKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the JoinMapKey
|
||||
/// </summary>
|
||||
public string JoinMapKey { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a ApiRoomPropertiesConfig
|
||||
/// </summary>
|
||||
public class ApiRoomPropertiesConfig
|
||||
{
|
||||
[JsonProperty("roomKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the RoomKey
|
||||
/// </summary>
|
||||
public string RoomKey { get; set; }
|
||||
|
||||
[JsonProperty("joinStart")]
|
||||
/// <summary>
|
||||
/// Gets or sets the JoinStart
|
||||
/// </summary>
|
||||
public uint JoinStart { get; set; }
|
||||
|
||||
[JsonProperty("joinMapKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the JoinMapKey
|
||||
/// </summary>
|
||||
public string JoinMapKey { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a EiscApiAdvancedFactory
|
||||
/// </summary>
|
||||
public class EiscApiAdvancedFactory : EssentialsDeviceFactory<EiscApiAdvanced>
|
||||
{
|
||||
public EiscApiAdvancedFactory()
|
||||
@@ -368,6 +434,10 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new EiscApiAdvanced Device");
|
||||
|
||||
@@ -34,6 +34,9 @@ namespace PepperDash.Essentials.Core.Bridges
|
||||
bridge.PrintJoinMaps();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// JoinmapMarkdown method
|
||||
/// </summary>
|
||||
public static void JoinmapMarkdown(string command)
|
||||
{
|
||||
var targets = command.Split(' ');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a device that uses JoinMapBaseAdvanced for its join map
|
||||
/// Defines the contract for IBridgeAdvanced
|
||||
/// </summary>
|
||||
public interface IBridgeAdvanced
|
||||
{
|
||||
|
||||
@@ -2,6 +2,9 @@ using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a AirMediaControllerJoinMap
|
||||
/// </summary>
|
||||
public class AirMediaControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("IsOnline")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a AppleTvJoinMap
|
||||
/// </summary>
|
||||
public class AppleTvJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("UpArrow")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a C2nRthsControllerJoinMap
|
||||
/// </summary>
|
||||
public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("IsOnline")]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Join map for CameraBase devices
|
||||
/// Represents a CameraControllerJoinMap
|
||||
/// </summary>
|
||||
public class CameraControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a CenOdtOccupancySensorBaseJoinMap
|
||||
/// </summary>
|
||||
public class CenOdtOccupancySensorBaseJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
#region Digitals
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DisplayControllerJoinMap
|
||||
/// </summary>
|
||||
public class DisplayControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("Name")]
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges {
|
||||
/// <summary>
|
||||
/// Represents a DmBladeChassisControllerJoinMap
|
||||
/// </summary>
|
||||
public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced {
|
||||
|
||||
[JoinName("IsOnline")]
|
||||
|
||||
@@ -2,6 +2,9 @@ using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DmChassisControllerJoinMap
|
||||
/// </summary>
|
||||
public class DmChassisControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("EnableAudioBreakaway")]
|
||||
|
||||
@@ -2,6 +2,9 @@ using System;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DmRmcControllerJoinMap
|
||||
/// </summary>
|
||||
public class DmRmcControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("IsOnline")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DmTxControllerJoinMap
|
||||
/// </summary>
|
||||
public class DmTxControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("IsOnline")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DmpsAudioOutputControllerJoinMap
|
||||
/// </summary>
|
||||
public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DmpsMicrophoneControllerJoinMap
|
||||
/// </summary>
|
||||
public class DmpsMicrophoneControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("MicGain")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DmpsRoutingControllerJoinMap
|
||||
/// </summary>
|
||||
public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("EnableRouting")]
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a GenericLightingJoinMap
|
||||
/// </summary>
|
||||
public class GenericLightingJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a GenericRelayControllerJoinMap
|
||||
/// </summary>
|
||||
public class GenericRelayControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a GlsOccupancySensorBaseJoinMap
|
||||
/// </summary>
|
||||
public class GlsOccupancySensorBaseJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("IsOnline")]
|
||||
|
||||
@@ -3,6 +3,9 @@ using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a GlsPartitionSensorJoinMap
|
||||
/// </summary>
|
||||
public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a HdMdNxM4kEControllerJoinMap
|
||||
/// </summary>
|
||||
public class HdMdNxM4kEControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("Name")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a HdMdxxxCEControllerJoinMap
|
||||
/// </summary>
|
||||
public class HdMdxxxCEControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -3,6 +3,9 @@ using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a HdPsXxxControllerJoinMap
|
||||
/// </summary>
|
||||
public class HdPsXxxControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a Hrxxx0WirelessRemoteControllerJoinMap
|
||||
/// </summary>
|
||||
public class Hrxxx0WirelessRemoteControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("Power")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a IAnalogInputJoinMap
|
||||
/// </summary>
|
||||
public class IAnalogInputJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a IBasicCommunicationJoinMap
|
||||
/// </summary>
|
||||
public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("TextReceived")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a IDigitalInputJoinMap
|
||||
/// </summary>
|
||||
public class IDigitalInputJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a IDigitalOutputJoinMap
|
||||
/// </summary>
|
||||
public class IDigitalOutputJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a PduJoinMapBase
|
||||
/// </summary>
|
||||
public class PduJoinMapBase : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("Name")]
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SetTopBoxControllerJoinMap
|
||||
/// </summary>
|
||||
public class SetTopBoxControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("PowerOn")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a StatusSignControllerJoinMap
|
||||
/// </summary>
|
||||
public class StatusSignControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("IsOnline")]
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SystemMonitorJoinMap
|
||||
/// </summary>
|
||||
public class SystemMonitorJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("TimeZone")]
|
||||
|
||||
@@ -2,6 +2,9 @@ using System;
|
||||
using PepperDash.Essentials.Core;
|
||||
namespace PepperDash.Essentials.Core.Bridges.JoinMaps
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a VideoCodecControllerJoinMap
|
||||
/// </summary>
|
||||
public class VideoCodecControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
#region Digital
|
||||
|
||||
@@ -12,13 +12,22 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a CecPortController
|
||||
/// </summary>
|
||||
public class CecPortController : Device, IBasicCommunicationWithStreamDebugging
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the StreamDebugging
|
||||
/// </summary>
|
||||
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
||||
|
||||
public event EventHandler<GenericCommMethodReceiveBytesArgs> BytesReceived;
|
||||
public event EventHandler<GenericCommMethodReceiveTextArgs> TextReceived;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IsConnected
|
||||
/// </summary>
|
||||
public bool IsConnected { get { return true; } }
|
||||
|
||||
ICec Port;
|
||||
@@ -74,6 +83,9 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
#region IBasicCommunication Members
|
||||
|
||||
/// <summary>
|
||||
/// SendText method
|
||||
/// </summary>
|
||||
public void SendText(string text)
|
||||
{
|
||||
if (Port == null)
|
||||
@@ -83,6 +95,9 @@ namespace PepperDash.Essentials.Core
|
||||
Port.StreamCec.Send.StringValue = text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SendBytes method
|
||||
/// </summary>
|
||||
public void SendBytes(byte[] bytes)
|
||||
{
|
||||
if (Port == null)
|
||||
@@ -93,10 +108,16 @@ namespace PepperDash.Essentials.Core
|
||||
Port.StreamCec.Send.StringValue = text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connect method
|
||||
/// </summary>
|
||||
public void Connect()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnect method
|
||||
/// </summary>
|
||||
public void Disconnect()
|
||||
{
|
||||
}
|
||||
@@ -107,6 +128,9 @@ namespace PepperDash.Essentials.Core
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <summary>
|
||||
/// SimulateReceive method
|
||||
/// </summary>
|
||||
public void SimulateReceive(string s)
|
||||
{
|
||||
// split out hex chars and build string
|
||||
|
||||
@@ -12,13 +12,22 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a ComPortController
|
||||
/// </summary>
|
||||
public class ComPortController : Device, IBasicCommunicationWithStreamDebugging
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the StreamDebugging
|
||||
/// </summary>
|
||||
public CommunicationStreamDebugging StreamDebugging { get; private set; }
|
||||
|
||||
public event EventHandler<GenericCommMethodReceiveBytesArgs> BytesReceived;
|
||||
public event EventHandler<GenericCommMethodReceiveTextArgs> TextReceived;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IsConnected
|
||||
/// </summary>
|
||||
public bool IsConnected { get { return true; } }
|
||||
|
||||
ComPort Port;
|
||||
@@ -116,6 +125,10 @@ namespace PepperDash.Essentials.Core
|
||||
if(!eventSubscribed) Debug.LogMessage(LogEventLevel.Warning, this, "Received data but no handler is registered");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deactivate method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool Deactivate()
|
||||
{
|
||||
return Port.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success;
|
||||
@@ -123,6 +136,9 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
#region IBasicCommunication Members
|
||||
|
||||
/// <summary>
|
||||
/// SendText method
|
||||
/// </summary>
|
||||
public void SendText(string text)
|
||||
{
|
||||
if (Port == null)
|
||||
@@ -133,6 +149,9 @@ namespace PepperDash.Essentials.Core
|
||||
Port.Send(text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SendBytes method
|
||||
/// </summary>
|
||||
public void SendBytes(byte[] bytes)
|
||||
{
|
||||
if (Port == null)
|
||||
@@ -144,10 +163,16 @@ namespace PepperDash.Essentials.Core
|
||||
Port.Send(text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connect method
|
||||
/// </summary>
|
||||
public void Connect()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnect method
|
||||
/// </summary>
|
||||
public void Disconnect()
|
||||
{
|
||||
}
|
||||
@@ -158,6 +183,9 @@ namespace PepperDash.Essentials.Core
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="s"></param>
|
||||
/// <summary>
|
||||
/// SimulateReceive method
|
||||
/// </summary>
|
||||
public void SimulateReceive(string s)
|
||||
{
|
||||
// split out hex chars and build string
|
||||
|
||||
@@ -34,8 +34,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// CanConvert method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return objectType == typeof(ComPort.ComPortSpec?);
|
||||
@@ -44,10 +45,15 @@ namespace PepperDash.Essentials.Core
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
/// <summary>
|
||||
/// This converter will not be used for writing
|
||||
/// Gets or sets the CanWrite
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CanWrite { get { return false; } }
|
||||
|
||||
/// <summary>
|
||||
/// WriteJson method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -55,12 +61,11 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The gist of this converter: The comspec JSON comes in with normal values that need to be converted
|
||||
/// into enum names. This converter takes the value and applies the appropriate enum's name prefix to the value
|
||||
/// and then returns the enum value using Enum.Parse. NOTE: Does not write
|
||||
/// Represents a ComSpecPropsJsonConverter
|
||||
/// </summary>
|
||||
public class ComSpecPropsJsonConverter : JsonConverter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return objectType == typeof(ComPort.eComBaudRates)
|
||||
@@ -72,8 +77,15 @@ namespace PepperDash.Essentials.Core
|
||||
|| objectType == typeof(ComPort.eComStopBits);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the CanRead
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CanRead { get { return true; } }
|
||||
|
||||
/// <summary>
|
||||
/// ReadJson method
|
||||
/// </summary>
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
//Debug.LogMessage(LogEventLevel.Verbose, "ReadJson type: " + objectType.Name);
|
||||
@@ -94,6 +106,10 @@ namespace PepperDash.Essentials.Core
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WriteJson method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Returns a comm method of either com port, TCP, SSH, and puts this into the DeviceManager
|
||||
/// </summary>
|
||||
/// <param name="deviceConfig">The Device config object</param>
|
||||
/// <summary>
|
||||
/// CreateCommForDevice method
|
||||
/// </summary>
|
||||
public static IBasicCommunication CreateCommForDevice(DeviceConfig deviceConfig)
|
||||
{
|
||||
EssentialsControlPropertiesConfig controlConfig = GetControlPropertiesConfig(deviceConfig);
|
||||
@@ -110,6 +113,9 @@ namespace PepperDash.Essentials.Core
|
||||
return comm;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetComPort method
|
||||
/// </summary>
|
||||
public static ComPort GetComPort(EssentialsControlPropertiesConfig config)
|
||||
{
|
||||
var comPar = config.ComParams;
|
||||
@@ -125,6 +131,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetCecPort method
|
||||
/// </summary>
|
||||
public static ICec GetCecPort(ControlPropertiesConfig config)
|
||||
{
|
||||
try
|
||||
@@ -182,6 +191,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// return the ControlSystem object from the Global class.
|
||||
/// </summary>
|
||||
/// <returns>IComPorts device or null if the device is not found or does not implement IComPorts</returns>
|
||||
/// <summary>
|
||||
/// GetIComPortsDeviceFromManagedDevice method
|
||||
/// </summary>
|
||||
public static IComPorts GetIComPortsDeviceFromManagedDevice(string ComPortDevKey)
|
||||
{
|
||||
if ((ComPortDevKey.Equals("controlSystem", System.StringComparison.OrdinalIgnoreCase)
|
||||
@@ -199,7 +211,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Represents a EssentialsControlPropertiesConfig
|
||||
/// </summary>
|
||||
public class EssentialsControlPropertiesConfig :
|
||||
ControlPropertiesConfig
|
||||
@@ -232,6 +244,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
[JsonProperty("infinetId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the InfinetId
|
||||
/// </summary>
|
||||
public string InfinetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -254,10 +269,22 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a IrControlSpec
|
||||
/// </summary>
|
||||
public class IrControlSpec
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the PortDeviceKey
|
||||
/// </summary>
|
||||
public string PortDeviceKey { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the PortNumber
|
||||
/// </summary>
|
||||
public uint PortNumber { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the File
|
||||
/// </summary>
|
||||
public string File { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -11,20 +11,32 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a ConsoleCommMockDevice
|
||||
/// </summary>
|
||||
public class ConsoleCommMockDevice : EssentialsDevice, ICommunicationMonitor
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Communication
|
||||
/// </summary>
|
||||
public IBasicCommunication Communication { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the PortGather
|
||||
/// </summary>
|
||||
public CommunicationGather PortGather { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the CommunicationMonitor
|
||||
/// </summary>
|
||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Defaults to \x0a
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the LineEnding
|
||||
/// </summary>
|
||||
public string LineEnding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Set to true to show responses in full hex
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the ShowHexResponse
|
||||
/// </summary>
|
||||
public bool ShowHexResponse { get; set; }
|
||||
|
||||
public ConsoleCommMockDevice(string key, string name, ConsoleCommMockDevicePropertiesConfig props, IBasicCommunication comm)
|
||||
@@ -37,6 +49,10 @@ namespace PepperDash.Essentials.Core
|
||||
LineEnding = props.LineEnding;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CustomActivate method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
Communication.Connect();
|
||||
@@ -56,9 +72,18 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a ConsoleCommMockDevicePropertiesConfig
|
||||
/// </summary>
|
||||
public class ConsoleCommMockDevicePropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the LineEnding
|
||||
/// </summary>
|
||||
public string LineEnding { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the CommunicationMonitorProperties
|
||||
/// </summary>
|
||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||
|
||||
public ConsoleCommMockDevicePropertiesConfig()
|
||||
@@ -67,6 +92,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a ConsoleCommMockDeviceFactory
|
||||
/// </summary>
|
||||
public class ConsoleCommMockDeviceFactory : EssentialsDeviceFactory<ConsoleCommMockDevice>
|
||||
{
|
||||
public ConsoleCommMockDeviceFactory()
|
||||
@@ -74,6 +102,10 @@ namespace PepperDash.Essentials.Core
|
||||
TypeNames = new List<string>() { "commmock" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Comm Mock Device");
|
||||
|
||||
@@ -44,12 +44,18 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
public static IKeyed BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device");
|
||||
return new GenericComm(dc);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetPortConfig method
|
||||
/// </summary>
|
||||
public void SetPortConfig(string portConfig)
|
||||
{
|
||||
// TODO: Deserialize new EssentialsControlPropertiesConfig and handle as necessary
|
||||
@@ -71,6 +77,10 @@ namespace PepperDash.Essentials.Core
|
||||
ConfigWriter.UpdateDeviceConfig(config);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new IBasicCommunicationJoinMap(joinStart);
|
||||
@@ -129,6 +139,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a GenericCommFactory
|
||||
/// </summary>
|
||||
public class GenericCommFactory : EssentialsDeviceFactory<GenericComm>
|
||||
{
|
||||
public GenericCommFactory()
|
||||
@@ -136,6 +149,10 @@ namespace PepperDash.Essentials.Core
|
||||
TypeNames = new List<string>() { "genericComm" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Comm Device");
|
||||
|
||||
@@ -5,6 +5,9 @@ using System;
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
[Obsolete("Please use the builtin HttpClient class instead: https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines")]
|
||||
/// <summary>
|
||||
/// Represents a GenericHttpClient
|
||||
/// </summary>
|
||||
public class GenericHttpClient : Device, IBasicCommunication
|
||||
{
|
||||
private readonly HttpClient Client;
|
||||
@@ -25,6 +28,9 @@ namespace PepperDash.Essentials.Core
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <summary>
|
||||
/// SendText method
|
||||
/// </summary>
|
||||
public void SendText(string path)
|
||||
{
|
||||
HttpClientRequest request = new HttpClientRequest();
|
||||
@@ -40,6 +46,9 @@ namespace PepperDash.Essentials.Core
|
||||
HttpClient.DISPATCHASYNC_ERROR error = Client.DispatchAsyncEx(request, Response, request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SendTextNoResponse method
|
||||
/// </summary>
|
||||
public void SendTextNoResponse(string format, params object[] items)
|
||||
{
|
||||
HttpClientRequest request = new HttpClientRequest();
|
||||
@@ -65,6 +74,9 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
#region IBasicCommunication Members
|
||||
|
||||
/// <summary>
|
||||
/// SendBytes method
|
||||
/// </summary>
|
||||
public void SendBytes(byte[] bytes)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -78,11 +90,17 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public event EventHandler<GenericCommMethodReceiveBytesArgs> BytesReceived;
|
||||
|
||||
/// <summary>
|
||||
/// Connect method
|
||||
/// </summary>
|
||||
public void Connect()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnect method
|
||||
/// </summary>
|
||||
public void Disconnect()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -97,10 +115,22 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
#endregion
|
||||
}
|
||||
/// <summary>
|
||||
/// Represents a GenericHttpClientEventArgs
|
||||
/// </summary>
|
||||
public class GenericHttpClientEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the ResponseText
|
||||
/// </summary>
|
||||
public string ResponseText { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the RequestPath
|
||||
/// </summary>
|
||||
public string RequestPath { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the Error
|
||||
/// </summary>
|
||||
public HTTP_CALLBACK_ERROR Error { get; set; }
|
||||
public GenericHttpClientEventArgs(string response, string request, HTTP_CALLBACK_ERROR error)
|
||||
{
|
||||
|
||||
@@ -83,6 +83,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetIrOutputPort method
|
||||
/// </summary>
|
||||
public static IROutputPort GetIrOutputPort(DeviceConfig dc)
|
||||
{
|
||||
var irControllerKey = dc.Key + "-ir";
|
||||
@@ -142,6 +145,9 @@ namespace PepperDash.Essentials.Core
|
||||
return port;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetIrOutputPortController method
|
||||
/// </summary>
|
||||
public static IrOutputPortController GetIrOutputPortController(DeviceConfig config)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Attempting to create new Ir Port Controller");
|
||||
@@ -159,8 +165,8 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// Returns a ready-to-go IrOutputPortController from a DeviceConfig object.
|
||||
/// </summary>
|
||||
/// GetIrOutputPortController method
|
||||
/// </summary>
|
||||
public static IrOutputPortController GetIrOutputPortController(DeviceConfig devConf)
|
||||
{
|
||||
var irControllerKey = devConf.Key + "-ir";
|
||||
@@ -222,12 +228,15 @@ namespace PepperDash.Essentials.Core
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper to help in IR port creation
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a IrOutPortConfig
|
||||
/// </summary>
|
||||
public class IrOutPortConfig
|
||||
{
|
||||
[JsonProperty("port")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Port
|
||||
/// </summary>
|
||||
public IROutputPort Port { get; set; }
|
||||
|
||||
[JsonProperty("fileName")]
|
||||
|
||||
@@ -8,6 +8,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a AudioControlPointListItem
|
||||
/// </summary>
|
||||
public class AudioControlPointListItem
|
||||
{
|
||||
[JsonProperty("levelControls")]
|
||||
|
||||
@@ -33,6 +33,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
public Dictionary<string, Dictionary<string, CameraListItem>> CameraLists { get; set; }
|
||||
|
||||
[JsonProperty("tieLines")]
|
||||
/// <summary>
|
||||
/// Gets or sets the TieLines
|
||||
/// </summary>
|
||||
public List<TieLineConfig> TieLines { get; set; }
|
||||
|
||||
[JsonProperty("joinMaps")]
|
||||
@@ -81,6 +84,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
/// </summary>
|
||||
/// <param name="key">key of the list to retrieve</param>
|
||||
/// <returns>AudioControlPointList if the key exists, null otherwise</returns>
|
||||
/// <summary>
|
||||
/// GetAudioControlPointListForKey method
|
||||
/// </summary>
|
||||
public AudioControlPointListItem GetAudioControlPointListForKey(string key)
|
||||
{
|
||||
if (AudioControlPointLists == null || string.IsNullOrEmpty(key) || !AudioControlPointLists.ContainsKey(key))
|
||||
@@ -105,6 +111,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
/// </summary>
|
||||
/// <param name="key">Key of desired device</param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetDeviceForKey method
|
||||
/// </summary>
|
||||
public DeviceConfig GetDeviceForKey(string key)
|
||||
{
|
||||
if (string.IsNullOrEmpty(key))
|
||||
|
||||
@@ -11,10 +11,13 @@ using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a ConfigPropertiesHelpers
|
||||
/// </summary>
|
||||
public class ConfigPropertiesHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the value of properties.hasAudio, or false if not defined
|
||||
/// GetHasAudio method
|
||||
/// </summary>
|
||||
public static bool GetHasAudio(DeviceConfig deviceConfig)
|
||||
{
|
||||
|
||||
@@ -13,25 +13,46 @@ using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DeviceConfig
|
||||
/// </summary>
|
||||
public class DeviceConfig
|
||||
{
|
||||
[JsonProperty("key")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Key
|
||||
/// </summary>
|
||||
public string Key { get; set; }
|
||||
|
||||
[JsonProperty("uid")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Uid
|
||||
/// </summary>
|
||||
public int Uid { get; set; }
|
||||
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("group")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Group
|
||||
/// </summary>
|
||||
public string Group { get; set; }
|
||||
|
||||
[JsonProperty("type")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Type
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("properties")]
|
||||
[JsonConverter(typeof(DevicePropertiesConverter))]
|
||||
/// <summary>
|
||||
/// Gets or sets the Properties
|
||||
/// </summary>
|
||||
public JToken Properties { get; set; }
|
||||
|
||||
public DeviceConfig(DeviceConfig dc)
|
||||
@@ -51,11 +72,14 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Represents a DevicePropertiesConverter
|
||||
/// </summary>
|
||||
public class DevicePropertiesConverter : JsonConverter
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// CanConvert method
|
||||
/// </summary>
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return objectType == typeof(JToken);
|
||||
@@ -66,6 +90,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
return JToken.ReadFrom(reader);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanWrite
|
||||
{
|
||||
get
|
||||
@@ -74,6 +99,10 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WriteJson method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException("SOD OFF HOSER");
|
||||
|
||||
@@ -26,6 +26,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
public static EssentialsConfig ConfigObject { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// LoadConfig2 method
|
||||
/// </summary>
|
||||
public static bool LoadConfig2()
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, "Loading unmerged system/template portal configuration file.");
|
||||
@@ -157,6 +160,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetConfigFiles method
|
||||
/// </summary>
|
||||
public static FileInfo[] GetConfigFiles(string filePath)
|
||||
{
|
||||
// Get the directory
|
||||
@@ -189,6 +195,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetGroupForDeviceKey method
|
||||
/// </summary>
|
||||
public static string GetGroupForDeviceKey(string key)
|
||||
{
|
||||
var dev = ConfigObject.Devices.FirstOrDefault(d => d.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
public static event EventHandler<ConfigStatusEventArgs> ConfigStatusChanged;
|
||||
|
||||
/// <summary>
|
||||
/// GetConfigFromServer method
|
||||
/// </summary>
|
||||
public static void GetConfigFromServer(string url)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, "Attempting to get new config from '{0}'", url);
|
||||
@@ -202,6 +205,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration of eUpdateStatus values
|
||||
/// </summary>
|
||||
public enum eUpdateStatus
|
||||
{
|
||||
UpdateStarted,
|
||||
@@ -214,8 +220,14 @@ namespace PepperDash.Essentials.Core.Config
|
||||
UpdateFailed
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a ConfigStatusEventArgs
|
||||
/// </summary>
|
||||
public class ConfigStatusEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the UpdateStatus
|
||||
/// </summary>
|
||||
public eUpdateStatus UpdateStatus { get; private set; }
|
||||
|
||||
public ConfigStatusEventArgs(eUpdateStatus status)
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
/// <param name="deviceKey"></param>
|
||||
/// <param name="properties"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// UpdateDeviceProperties method
|
||||
/// </summary>
|
||||
public static bool UpdateDeviceProperties(string deviceKey, JToken properties)
|
||||
{
|
||||
bool success = false;
|
||||
@@ -53,6 +56,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
return success;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UpdateDeviceConfig method
|
||||
/// </summary>
|
||||
public static bool UpdateDeviceConfig(DeviceConfig config)
|
||||
{
|
||||
bool success = false;
|
||||
@@ -73,6 +79,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
return success;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UpdateRoomConfig method
|
||||
/// </summary>
|
||||
public static bool UpdateRoomConfig(DeviceConfig config)
|
||||
{
|
||||
bool success = false;
|
||||
@@ -124,6 +133,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
/// </summary>
|
||||
/// <param name="filepath"></param>
|
||||
/// <param name="o"></param>
|
||||
/// <summary>
|
||||
/// WriteFile method
|
||||
/// </summary>
|
||||
public static void WriteFile(string filePath, string configData)
|
||||
{
|
||||
if (WriteTimer != null)
|
||||
|
||||
@@ -68,6 +68,9 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
|
||||
[JsonProperty("rooms")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Rooms
|
||||
/// </summary>
|
||||
public List<DeviceConfig> Rooms { get; set; }
|
||||
|
||||
|
||||
@@ -78,11 +81,14 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a SystemTemplateConfigs
|
||||
/// </summary>
|
||||
public class SystemTemplateConfigs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the System
|
||||
/// </summary>
|
||||
public EssentialsConfig System { get; set; }
|
||||
|
||||
public EssentialsConfig Template { get; set; }
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for ILoadConfig
|
||||
/// </summary>
|
||||
public interface ILoadConfig
|
||||
{
|
||||
void GoWithLoad();
|
||||
|
||||
@@ -22,18 +22,33 @@ namespace PepperDash.Essentials.Core.Config
|
||||
public string Type { get; set; }
|
||||
|
||||
[JsonProperty("version")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Version
|
||||
/// </summary>
|
||||
public string Version { get; set; }
|
||||
|
||||
[JsonProperty("runtimeInfo")]
|
||||
/// <summary>
|
||||
/// Gets or sets the RuntimeInfo
|
||||
/// </summary>
|
||||
public RuntimeInfo RuntimeInfo { get; set; }
|
||||
|
||||
[JsonProperty("comment")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Comment
|
||||
/// </summary>
|
||||
public string Comment { get; set; }
|
||||
|
||||
[JsonProperty("hostname")]
|
||||
/// <summary>
|
||||
/// Gets or sets the HostName
|
||||
/// </summary>
|
||||
public string HostName { get; set; }
|
||||
|
||||
[JsonProperty("appNumber")]
|
||||
/// <summary>
|
||||
/// Gets or sets the AppNumber
|
||||
/// </summary>
|
||||
public uint AppNumber { get; set; }
|
||||
|
||||
public InfoConfig()
|
||||
@@ -52,7 +67,7 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents runtime information about the program/processor
|
||||
/// Represents a RuntimeInfo
|
||||
/// </summary>
|
||||
public class RuntimeInfo
|
||||
{
|
||||
|
||||
@@ -6,8 +6,14 @@ using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SourceDevicePropertiesConfigBase
|
||||
/// </summary>
|
||||
public class SourceDevicePropertiesConfigBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DisableSharing
|
||||
/// </summary>
|
||||
public bool DisableSharing { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -14,18 +14,26 @@ namespace PepperDash.Essentials.Core
|
||||
protected GenericBase Hardware;
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list containing the Outputs that we want to expose.
|
||||
/// Gets or sets the Feedbacks
|
||||
/// </summary>
|
||||
public FeedbackCollection<Feedback> Feedbacks { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IsOnline
|
||||
/// </summary>
|
||||
public BoolFeedback IsOnline { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the IsRegistered
|
||||
/// </summary>
|
||||
public BoolFeedback IsRegistered { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the IpConnectionsText
|
||||
/// </summary>
|
||||
public StringFeedback IpConnectionsText { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used by implementing classes to prevent registration with Crestron TLDM. For
|
||||
/// devices like RMCs and TXs attached to a chassis.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the PreventRegistration
|
||||
/// </summary>
|
||||
public bool PreventRegistration { get; protected set; }
|
||||
|
||||
protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware)
|
||||
@@ -60,10 +68,10 @@ namespace PepperDash.Essentials.Core
|
||||
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure that overriding classes call this!
|
||||
/// Registers the Crestron device, connects up to the base events, starts communication monitor
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// CustomActivate method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, this, "Activating");
|
||||
@@ -111,6 +119,10 @@ namespace PepperDash.Essentials.Core
|
||||
/// This disconnects events and unregisters the base hardware device.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// Deactivate method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override bool Deactivate()
|
||||
{
|
||||
CommunicationMonitor.Stop();
|
||||
@@ -127,6 +139,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Adds feedback(s) to the list
|
||||
/// </summary>
|
||||
/// <param name="newFbs"></param>
|
||||
/// <summary>
|
||||
/// AddToFeedbackList method
|
||||
/// </summary>
|
||||
public void AddToFeedbackList(params Feedback[] newFbs)
|
||||
{
|
||||
foreach (var f in newFbs)
|
||||
@@ -158,11 +173,17 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
#region IStatusMonitor Members
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the CommunicationMonitor
|
||||
/// </summary>
|
||||
public StatusMonitorBase CommunicationMonitor { get; private set; }
|
||||
#endregion
|
||||
|
||||
#region IUsageTracking Members
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the UsageTracker
|
||||
/// </summary>
|
||||
public UsageTracking UsageTracker { get; set; }
|
||||
|
||||
#endregion
|
||||
@@ -185,6 +206,9 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
|
||||
//***********************************************************************************
|
||||
/// <summary>
|
||||
/// Represents a CrestronGenericBaseDeviceEventIds
|
||||
/// </summary>
|
||||
public class CrestronGenericBaseDeviceEventIds
|
||||
{
|
||||
public const uint IsOnline = 1;
|
||||
@@ -196,6 +220,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public static class GenericBaseExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// RegisterWithLogging method
|
||||
/// </summary>
|
||||
public static eDeviceRegistrationUnRegistrationResponse RegisterWithLogging(this GenericBase device, string key)
|
||||
{
|
||||
var result = device.Register();
|
||||
|
||||
@@ -17,10 +17,19 @@ using Serilog.Events;
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
[Description("Wrapper class for Digital Input")]
|
||||
/// <summary>
|
||||
/// Represents a GenericDigitalInputDevice
|
||||
/// </summary>
|
||||
public class GenericDigitalInputDevice : EssentialsBridgeableDevice, IDigitalInput
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the InputPort
|
||||
/// </summary>
|
||||
public DigitalInput InputPort { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the InputStateFeedback
|
||||
/// </summary>
|
||||
public BoolFeedback InputStateFeedback { get; private set; }
|
||||
|
||||
Func<bool> InputStateFeedbackFunc
|
||||
@@ -103,6 +112,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new IDigitalInputJoinMap(joinStart);
|
||||
@@ -139,6 +152,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Factory
|
||||
|
||||
/// <summary>
|
||||
/// Represents a GenericDigitalInputDeviceFactory
|
||||
/// </summary>
|
||||
public class GenericDigitalInputDeviceFactory : EssentialsDeviceFactory<GenericDigitalInputDevice>
|
||||
{
|
||||
public GenericDigitalInputDeviceFactory()
|
||||
@@ -146,6 +162,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
TypeNames = new List<string>() { "digitalinput" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Digital Input Device");
|
||||
|
||||
@@ -115,16 +115,25 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// OpenRelay method
|
||||
/// </summary>
|
||||
public void OpenRelay()
|
||||
{
|
||||
RelayOutput.State = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CloseRelay method
|
||||
/// </summary>
|
||||
public void CloseRelay()
|
||||
{
|
||||
RelayOutput.State = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ToggleRelayState method
|
||||
/// </summary>
|
||||
public void ToggleRelayState()
|
||||
{
|
||||
if (RelayOutput.State == true)
|
||||
@@ -151,6 +160,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new GenericRelayControllerJoinMap(joinStart);
|
||||
@@ -194,6 +207,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Factory
|
||||
|
||||
/// <summary>
|
||||
/// Represents a GenericRelayDeviceFactory
|
||||
/// </summary>
|
||||
public class GenericRelayDeviceFactory : EssentialsDeviceFactory<GenericRelayDevice>
|
||||
{
|
||||
public GenericRelayDeviceFactory()
|
||||
@@ -201,6 +217,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
TypeNames = new List<string>() { "relayoutput" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Relay Device");
|
||||
|
||||
@@ -70,6 +70,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
/// Set minimum voltage change for device to update voltage changed method
|
||||
/// </summary>
|
||||
/// <param name="value">valid values range from 0 - 65535, representing the full 100% range of the processor voltage source. Check processor documentation for details</param>
|
||||
/// <summary>
|
||||
/// SetMinimumChange method
|
||||
/// </summary>
|
||||
public void SetMinimumChange(ushort value)
|
||||
{
|
||||
InputPort.AnalogMinChange = value;
|
||||
@@ -88,6 +91,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new IAnalogInputJoinMap(joinStart);
|
||||
@@ -139,6 +146,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GetVersiportDigitalInput method
|
||||
/// </summary>
|
||||
public static Versiport GetVersiportDigitalInput(IOPortConfig dc)
|
||||
{
|
||||
|
||||
@@ -188,6 +198,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a GenericVersiportAbalogInputDeviceFactory
|
||||
/// </summary>
|
||||
public class GenericVersiportAbalogInputDeviceFactory : EssentialsDeviceFactory<GenericVersiportAnalogInputDevice>
|
||||
{
|
||||
public GenericVersiportAbalogInputDeviceFactory()
|
||||
@@ -195,6 +208,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
TypeNames = new List<string>() { "versiportanaloginput" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device");
|
||||
|
||||
@@ -35,6 +35,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the PartitionPresentFeedback
|
||||
/// </summary>
|
||||
public BoolFeedback PartitionPresentFeedback { get; }
|
||||
|
||||
public bool PartitionPresent => !InputStateFeedbackFunc();
|
||||
@@ -80,6 +83,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new IDigitalInputJoinMap(joinStart);
|
||||
@@ -115,6 +122,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GetVersiportDigitalInput method
|
||||
/// </summary>
|
||||
public static Versiport GetVersiportDigitalInput(IOPortConfig dc)
|
||||
{
|
||||
|
||||
@@ -157,6 +167,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a GenericVersiportDigitalInputDeviceFactory
|
||||
/// </summary>
|
||||
public class GenericVersiportDigitalInputDeviceFactory : EssentialsDeviceFactory<GenericVersiportDigitalInputDevice>
|
||||
{
|
||||
public GenericVersiportDigitalInputDeviceFactory()
|
||||
@@ -164,6 +177,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
TypeNames = new List<string>() { "versiportinput" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device");
|
||||
|
||||
@@ -74,6 +74,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
/// Set value of the versiport digital output
|
||||
/// </summary>
|
||||
/// <param name="state">value to set the output to</param>
|
||||
/// <summary>
|
||||
/// SetOutput method
|
||||
/// </summary>
|
||||
public void SetOutput(bool state)
|
||||
{
|
||||
if (OutputPort.SupportsDigitalOutput)
|
||||
@@ -92,6 +95,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
/// <summary>
|
||||
/// LinkToApi method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new IDigitalOutputJoinMap(joinStart);
|
||||
@@ -128,6 +135,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GetVersiportDigitalOutput method
|
||||
/// </summary>
|
||||
public static Versiport GetVersiportDigitalOutput(IOPortConfig dc)
|
||||
{
|
||||
|
||||
@@ -169,6 +179,9 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a GenericVersiportDigitalOutputDeviceFactory
|
||||
/// </summary>
|
||||
public class GenericVersiportDigitalOutputDeviceFactory : EssentialsDeviceFactory<GenericVersiportDigitalInputDevice>
|
||||
{
|
||||
public GenericVersiportDigitalOutputDeviceFactory()
|
||||
@@ -176,6 +189,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
TypeNames = new List<string>() { "versiportoutput" };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BuildDevice method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new Generic Versiport Device");
|
||||
|
||||
@@ -7,6 +7,9 @@ using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IAnalogInput
|
||||
/// </summary>
|
||||
public interface IAnalogInput
|
||||
{
|
||||
IntFeedback InputValueFeedback { get; }
|
||||
|
||||
@@ -8,6 +8,9 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IHasCresnetBranches
|
||||
/// </summary>
|
||||
public interface IHasCresnetBranches
|
||||
{
|
||||
CrestronCollection<CresnetBranch> CresnetBranches { get; }
|
||||
|
||||
@@ -9,15 +9,30 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a IOPortConfig
|
||||
/// </summary>
|
||||
public class IOPortConfig
|
||||
{
|
||||
[JsonProperty("portDeviceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the PortDeviceKey
|
||||
/// </summary>
|
||||
public string PortDeviceKey { get; set; }
|
||||
[JsonProperty("portNumber")]
|
||||
/// <summary>
|
||||
/// Gets or sets the PortNumber
|
||||
/// </summary>
|
||||
public uint PortNumber { get; set; }
|
||||
[JsonProperty("disablePullUpResistor")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DisablePullUpResistor
|
||||
/// </summary>
|
||||
public bool DisablePullUpResistor { get; set; }
|
||||
[JsonProperty("minimumChange")]
|
||||
/// <summary>
|
||||
/// Gets or sets the MinimumChange
|
||||
/// </summary>
|
||||
public int MinimumChange { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,29 @@
|
||||
namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DeviceInfo
|
||||
/// </summary>
|
||||
public class DeviceInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the HostName
|
||||
/// </summary>
|
||||
public string HostName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the IpAddress
|
||||
/// </summary>
|
||||
public string IpAddress { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the MacAddress
|
||||
/// </summary>
|
||||
public string MacAddress { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the SerialNumber
|
||||
/// </summary>
|
||||
public string SerialNumber { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the FirmwareVersion
|
||||
/// </summary>
|
||||
public string FirmwareVersion { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,14 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a DeviceInfoEventArgs
|
||||
/// </summary>
|
||||
public class DeviceInfoEventArgs:EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DeviceInfo
|
||||
/// </summary>
|
||||
public DeviceInfo DeviceInfo { get; set; }
|
||||
|
||||
public DeviceInfoEventArgs()
|
||||
|
||||
@@ -3,6 +3,9 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IDeviceInfoProvider
|
||||
/// </summary>
|
||||
public interface IDeviceInfoProvider:IKeyed
|
||||
{
|
||||
DeviceInfo DeviceInfo { get; }
|
||||
@@ -12,5 +15,8 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
void UpdateDeviceInfo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for DeviceInfoChangeHandler
|
||||
/// </summary>
|
||||
public delegate void DeviceInfoChangeHandler(IKeyed device, DeviceInfoEventArgs args);
|
||||
}
|
||||
@@ -27,12 +27,12 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
private static readonly CCriticalSection Lock = new CCriticalSection();
|
||||
|
||||
/// <summary>
|
||||
/// Last resolved ARP table - it is recommended to refresh the arp before using this.
|
||||
/// Gets or sets the ArpTable
|
||||
/// </summary>
|
||||
public static List<ArpEntry> ArpTable { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Force recheck of ARP table
|
||||
/// RefreshArp method
|
||||
/// </summary>
|
||||
public static void RefreshArp()
|
||||
{
|
||||
@@ -98,6 +98,9 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
/// </summary>
|
||||
/// <param name="ipAddressIn">Ip Address to Santitize</param>
|
||||
/// <returns>Sanitized Ip Address</returns>
|
||||
/// <summary>
|
||||
/// SanitizeIpAddress method
|
||||
/// </summary>
|
||||
public static string SanitizeIpAddress(string ipAddressIn)
|
||||
{
|
||||
try
|
||||
@@ -117,6 +120,9 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
/// </summary>
|
||||
/// <param name="ipAddress">IP Address to resolve from</param>
|
||||
/// <returns>Resolved Hostname - on failure to determine hostname, will return IP Address</returns>
|
||||
/// <summary>
|
||||
/// ResolveHostnameFromIp method
|
||||
/// </summary>
|
||||
public static string ResolveHostnameFromIp(string ipAddress)
|
||||
{
|
||||
try
|
||||
@@ -137,6 +143,9 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
/// </summary>
|
||||
/// <param name="hostName">Hostname to resolve from</param>
|
||||
/// <returns>Resolved IP Address - on a failure to determine IP Address, will return hostname</returns>
|
||||
/// <summary>
|
||||
/// ResolveIpFromHostname method
|
||||
/// </summary>
|
||||
public static string ResolveIpFromHostname(string hostName)
|
||||
{
|
||||
try
|
||||
@@ -154,7 +163,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Object to hold data about an arp entry
|
||||
/// Represents a ArpEntry
|
||||
/// </summary>
|
||||
public class ArpEntry
|
||||
{
|
||||
@@ -182,7 +191,7 @@ namespace PepperDash.Essentials.Core.DeviceInfo
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Arguments passed by the ArpTableUpdated event
|
||||
/// Represents a ArpTableEventArgs
|
||||
/// </summary>
|
||||
public class ArpTableEventArgs : EventArgs
|
||||
{
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public static class IChannelExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// LinkButtons method
|
||||
/// </summary>
|
||||
public static void LinkButtons(this IChannel dev, BasicTriList triList)
|
||||
{
|
||||
triList.SetBoolSigAction(123, dev.ChannelUp);
|
||||
@@ -34,6 +37,9 @@ namespace PepperDash.Essentials.Core
|
||||
triList.SetBoolSigAction(134, dev.Exit);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnlinkButtons method
|
||||
/// </summary>
|
||||
public static void UnlinkButtons(this IChannel dev, BasicTriList triList)
|
||||
{
|
||||
triList.ClearBoolSigAction(123);
|
||||
|
||||
@@ -22,6 +22,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public static class IColorExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// LinkButtons method
|
||||
/// </summary>
|
||||
public static void LinkButtons(this IColor dev, BasicTriList TriList)
|
||||
{
|
||||
TriList.SetBoolSigAction(155, dev.Red);
|
||||
@@ -30,6 +33,9 @@ namespace PepperDash.Essentials.Core
|
||||
TriList.SetBoolSigAction(158, dev.Blue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnlinkButtons method
|
||||
/// </summary>
|
||||
public static void UnlinkButtons(this IColor dev, BasicTriList triList)
|
||||
{
|
||||
triList.ClearBoolSigAction(155);
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public static class IDPadExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// LinkButtons method
|
||||
/// </summary>
|
||||
public static void LinkButtons(this IDPad dev, BasicTriList triList)
|
||||
{
|
||||
triList.SetBoolSigAction(138, dev.Up);
|
||||
@@ -36,6 +39,9 @@ namespace PepperDash.Essentials.Core
|
||||
triList.SetBoolSigAction(134, dev.Exit);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnlinkButtons method
|
||||
/// </summary>
|
||||
public static void UnlinkButtons(this IDPad dev, BasicTriList triList)
|
||||
{
|
||||
triList.ClearBoolSigAction(138);
|
||||
|
||||
@@ -6,6 +6,9 @@ using PepperDash.Essentials.Core.SmartObjects;
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Defines the contract for IDiscPlayerControls
|
||||
/// </summary>
|
||||
public interface IDiscPlayerControls : IColor, IDPad, INumericKeypad, IHasPowerControl, ITransport, IUiDisplayInfo
|
||||
{
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Devices.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IDisplayBasic
|
||||
/// </summary>
|
||||
public interface IDisplayBasic
|
||||
{
|
||||
void InputHdmi1();
|
||||
|
||||
@@ -6,6 +6,9 @@ using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IDumbSource
|
||||
/// </summary>
|
||||
public interface IDumbSource
|
||||
{
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public static class IDvrExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// LinkButtons method
|
||||
/// </summary>
|
||||
public static void LinkButtons(this IDvr dev, BasicTriList triList)
|
||||
{
|
||||
triList.SetBoolSigAction(136, dev.DvrList);
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IEmergencyOSD
|
||||
/// </summary>
|
||||
public interface IEmergencyOSD
|
||||
{
|
||||
void ShowEmergencyMessage(string url);
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IHasBranding
|
||||
/// </summary>
|
||||
public interface IHasBranding
|
||||
{
|
||||
bool BrandingEnabled { get; }
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IHasFarEndContentStatus
|
||||
/// </summary>
|
||||
public interface IHasFarEndContentStatus
|
||||
{
|
||||
BoolFeedback ReceivingContent { get; }
|
||||
|
||||
@@ -3,6 +3,9 @@ using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IHasPhoneDialing
|
||||
/// </summary>
|
||||
public interface IHasPhoneDialing
|
||||
{
|
||||
BoolFeedback PhoneOffHookFeedback { get; }
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IHasWebView
|
||||
/// </summary>
|
||||
public interface IHasWebView
|
||||
{
|
||||
bool WebviewIsVisible { get; }
|
||||
@@ -14,8 +17,14 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
event EventHandler<WebViewStatusChangedEventArgs> WebViewStatusChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a WebViewStatusChangedEventArgs
|
||||
/// </summary>
|
||||
public class WebViewStatusChangedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Status
|
||||
/// </summary>
|
||||
public string Status { get; }
|
||||
|
||||
public WebViewStatusChangedEventArgs(string status)
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for IHumiditySensor
|
||||
/// </summary>
|
||||
public interface IHumiditySensor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -3,6 +3,9 @@ using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for ILanguageDefinition
|
||||
/// </summary>
|
||||
public interface ILanguageDefinition
|
||||
{
|
||||
string LocaleName { get; set; }
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Defines the contract for ILanguageProvider
|
||||
/// </summary>
|
||||
public interface ILanguageProvider
|
||||
{
|
||||
ILanguageDefinition CurrentLanguage { get; set; }
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for ILevelControls
|
||||
/// </summary>
|
||||
public interface ILevelControls
|
||||
{
|
||||
Dictionary<string, IBasicVolumeWithFeedback> LevelControlPoints { get; }
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
}*/
|
||||
|
||||
/// <summary>
|
||||
/// Describes a MobileSystemController that accepts IEssentialsRoom
|
||||
/// Defines the contract for IMobileControl
|
||||
/// </summary>
|
||||
public interface IMobileControl : IKeyed
|
||||
{
|
||||
@@ -52,7 +52,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a mobile control messenger
|
||||
/// Defines the contract for IMobileControlMessenger
|
||||
/// </summary>
|
||||
public interface IMobileControlMessenger : IKeyed
|
||||
{
|
||||
@@ -77,7 +77,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a MobileControl Room Bridge
|
||||
/// Defines the contract for IMobileControlRoomMessenger
|
||||
/// </summary>
|
||||
public interface IMobileControlRoomMessenger : IKeyed
|
||||
{
|
||||
@@ -104,6 +104,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
void UpdateAppUrl(string url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the contract for IMobileControlAction
|
||||
/// </summary>
|
||||
public interface IMobileControlAction
|
||||
{
|
||||
IMobileControlMessenger Messenger { get; }
|
||||
@@ -112,7 +115,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a MobileControl Touchpanel Controller
|
||||
/// Defines the contract for IMobileControlTouchpanelController
|
||||
/// </summary>
|
||||
public interface IMobileControlTouchpanelController : IKeyed
|
||||
{
|
||||
|
||||
@@ -5,9 +5,9 @@ using PepperDash.Essentials.Core.SmartObjects;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for INumericKeypad
|
||||
/// </summary>
|
||||
public interface INumericKeypad:IKeyed
|
||||
{
|
||||
void Digit0(bool pressRelease);
|
||||
@@ -65,6 +65,9 @@ namespace PepperDash.Essentials.Core
|
||||
trilist.StringInput[111].StringValue = dev.KeypadAccessoryButton2Label;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnlinkButtons method
|
||||
/// </summary>
|
||||
public static void UnlinkButtons(this INumericKeypad dev, BasicTriList trilist)
|
||||
{
|
||||
trilist.ClearBoolSigAction(110);
|
||||
|
||||
@@ -31,17 +31,17 @@ namespace PepperDash.Essentials.Core
|
||||
public bool LastAttemptWasIncorrect { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the login attempt has failed
|
||||
/// Gets or sets the LoginAttemptFailed
|
||||
/// </summary>
|
||||
public bool LoginAttemptFailed { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates that the process was cancelled and the prompt should be dismissed
|
||||
/// Gets or sets the LoginAttemptCancelled
|
||||
/// </summary>
|
||||
public bool LoginAttemptCancelled { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// A message to be displayed to the user
|
||||
/// Gets or sets the Message
|
||||
/// </summary>
|
||||
public string Message { get; private set; }
|
||||
|
||||
|
||||
@@ -37,6 +37,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public static class IHasPowerControlExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// LinkButtons method
|
||||
/// </summary>
|
||||
public static void LinkButtons(this IHasPowerControl dev, BasicTriList triList)
|
||||
{
|
||||
triList.SetSigFalseAction(101, dev.PowerOn);
|
||||
@@ -50,6 +53,9 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnlinkButtons method
|
||||
/// </summary>
|
||||
public static void UnlinkButtons(this IHasPowerControl dev, BasicTriList triList)
|
||||
{
|
||||
triList.ClearBoolSigAction(101);
|
||||
|
||||
@@ -5,9 +5,9 @@ using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a class that has warm up and cool down
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for IProjectorScreenLiftControl
|
||||
/// </summary>
|
||||
public interface IProjectorScreenLiftControl
|
||||
{
|
||||
void Raise();
|
||||
@@ -19,6 +19,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
eScreenLiftControlType Type { get; } // screen/lift
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration of eScreenLiftControlType values
|
||||
/// </summary>
|
||||
public enum eScreenLiftControlType
|
||||
{
|
||||
lift,
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Describes an item that can be selected
|
||||
/// Defines the contract for ISelectableItem
|
||||
/// </summary>
|
||||
public interface ISelectableItem : IKeyName
|
||||
{
|
||||
|
||||
@@ -4,6 +4,9 @@ using System.Collections.Generic;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for ISelectableItems
|
||||
/// </summary>
|
||||
public interface ISelectableItems<TKey, TValue> where TValue : ISelectableItem
|
||||
{
|
||||
event EventHandler ItemsUpdated;
|
||||
@@ -21,6 +24,9 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
/// Describes a collection of items that can be selected
|
||||
/// </summary>
|
||||
/// <typeparam name="TKey">type for the keys in the collection. Probably a string or enum</typeparam>
|
||||
/// <summary>
|
||||
/// Defines the contract for ISelectableItems
|
||||
/// </summary>
|
||||
public interface ISelectableItems<TKey> : ISelectableItems<TKey, ISelectableItem>
|
||||
{
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ using PepperDash.Essentials.Core.SmartObjects;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for ISetTopBoxControls
|
||||
/// </summary>
|
||||
public interface ISetTopBoxControls : IChannel, IColor, IDPad, ISetTopBoxNumericKeypad,
|
||||
ITransport, IUiDisplayInfo
|
||||
{
|
||||
@@ -40,12 +40,18 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public static class ISetTopBoxControlsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// LinkButtons method
|
||||
/// </summary>
|
||||
public static void LinkButtons(this ISetTopBoxControls dev, BasicTriList triList)
|
||||
{
|
||||
triList.SetBoolSigAction(136, dev.DvrList);
|
||||
triList.SetBoolSigAction(152, dev.Replay);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnlinkButtons method
|
||||
/// </summary>
|
||||
public static void UnlinkButtons(this ISetTopBoxControls dev, BasicTriList triList)
|
||||
{
|
||||
triList.ClearBoolSigAction(136);
|
||||
|
||||
@@ -6,6 +6,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for ITemperatureSensor
|
||||
/// </summary>
|
||||
public interface ITemperatureSensor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for ITransport
|
||||
/// </summary>
|
||||
public interface ITransport
|
||||
{
|
||||
void Play(bool pressRelease);
|
||||
@@ -38,6 +38,9 @@ namespace PepperDash.Essentials.Core
|
||||
triList.SetBoolSigAction(154, dev.Record);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnlinkButtons method
|
||||
/// </summary>
|
||||
public static void UnlinkButtons(this ITransport dev, BasicTriList triList)
|
||||
{
|
||||
triList.ClearBoolSigAction(145);
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for ITvPresetsProvider
|
||||
/// </summary>
|
||||
public interface ITvPresetsProvider
|
||||
{
|
||||
DevicePresetsModel TvPresets { get; }
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes things needed to show on UI
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Defines the contract for IUiDisplayInfo
|
||||
/// </summary>
|
||||
public interface IUiDisplayInfo : IKeyed
|
||||
{
|
||||
uint DisplayUiType { get; }
|
||||
|
||||
@@ -3,11 +3,26 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a LanguageLabel
|
||||
/// </summary>
|
||||
public class LanguageLabel
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Key
|
||||
/// </summary>
|
||||
public string Key { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the Description
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the DisplayText
|
||||
/// </summary>
|
||||
public string DisplayText { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the JoinNumber
|
||||
/// </summary>
|
||||
public uint JoinNumber { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// Key of the parent device in the DeviceManager
|
||||
/// </summary>
|
||||
[JsonProperty("parentDeviceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the ParentDeviceKey
|
||||
/// </summary>
|
||||
public string ParentDeviceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,14 +9,26 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Enumeration of AudioChangeType values
|
||||
/// </summary>
|
||||
public enum AudioChangeType
|
||||
{
|
||||
Mute, Volume
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a AudioChangeEventArgs
|
||||
/// </summary>
|
||||
public class AudioChangeEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the ChangeType
|
||||
/// </summary>
|
||||
public AudioChangeType ChangeType { get; private set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the AudioDevice
|
||||
/// </summary>
|
||||
public IBasicVolumeControls AudioDevice { get; private set; }
|
||||
|
||||
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
|
||||
|
||||
@@ -3,9 +3,15 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a CameraListItem
|
||||
/// </summary>
|
||||
public class CameraListItem
|
||||
{
|
||||
[JsonProperty("deviceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DeviceKey
|
||||
/// </summary>
|
||||
public string DeviceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -46,6 +52,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// A name that will override the source's name on the UI
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds control of codec transmit volume
|
||||
/// Defines the contract for ITransmitVolume
|
||||
/// </summary>
|
||||
public interface ITransmitVolume
|
||||
{
|
||||
@@ -34,7 +34,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds control of codec privacy function (microphone mute)
|
||||
/// Defines the contract for IPrivacy
|
||||
/// </summary>
|
||||
public interface IPrivacy
|
||||
{
|
||||
|
||||
@@ -52,6 +52,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// If set, this name will be used as the PreferredName instead of the device name.
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
/// <summary>
|
||||
/// Gets or sets the Name
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -17,6 +17,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// <param name="device"></param>
|
||||
/// <param name="propertyName"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetFeedbackProperty method
|
||||
/// </summary>
|
||||
public static Feedback GetFeedbackProperty(this Device device, string propertyName)
|
||||
{
|
||||
var feedback = DeviceJsonApi.GetPropertyByName(device.Key, propertyName) as Feedback;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user