changes PepperDash.Essentials.Bridges to PepperDash.Essentials.Core.Bridges

This commit is contained in:
Andrew Welker
2020-04-13 16:31:34 -06:00
parent 926e3b7bc8
commit 41d123edf3
50 changed files with 354 additions and 307 deletions

View File

@@ -8,7 +8,7 @@ using Crestron.SimplSharpPro.EthernetCommunication;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Bridges; using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.AppServer.Messengers namespace PepperDash.Essentials.AppServer.Messengers

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Bridges; using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.AppServer.Messengers namespace PepperDash.Essentials.AppServer.Messengers
{ {

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.DM.AirMedia;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class AirMediaControllerApiExtensions public static class AirMediaControllerApiExtensions
{ {

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class AppleTvApiExtensions public static class AppleTvApiExtensions
{ {

View File

@@ -9,7 +9,7 @@ using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Routing; using PepperDash.Essentials.Core.Routing;
using PepperDash.Essentials.Bridges; using PepperDash.Essentials.Core.Bridges;
using Crestron.SimplSharpPro; using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.EthernetCommunication; using Crestron.SimplSharpPro.EthernetCommunication;

View File

@@ -4,7 +4,7 @@ using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.CrestronIO; using PepperDash.Essentials.Core.CrestronIO;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class C2nRthsControllerApiExtensions public static class C2nRthsControllerApiExtensions
{ {

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Devices.Common.Cameras;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class CameraControllerApiExtensions public static class CameraControllerApiExtensions
{ {

View File

@@ -10,7 +10,7 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class DigitalLoggerApiExtensions public static class DigitalLoggerApiExtensions
{ {

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class DisplayControllerApiExtensions public static class DisplayControllerApiExtensions
{ {

View File

@@ -14,7 +14,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges { namespace PepperDash.Essentials.Core.Bridges {
public static class DmBladeChassisControllerApiExtentions { public static class DmBladeChassisControllerApiExtentions {
public static void LinkToApi(this DmBladeChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey) { public static void LinkToApi(this DmBladeChassisController dmChassis, BasicTriList trilist, uint joinStart, string joinMapKey) {
DmBladeChassisControllerJoinMap joinMap = new DmBladeChassisControllerJoinMap(); DmBladeChassisControllerJoinMap joinMap = new DmBladeChassisControllerJoinMap();

View File

@@ -15,7 +15,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class DmChassisControllerApiExtentions public static class DmChassisControllerApiExtentions
{ {

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class DmRmcControllerApiExtensions public static class DmRmcControllerApiExtensions
{ {

View File

@@ -14,7 +14,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class DmTxControllerApiExtensions public static class DmTxControllerApiExtensions
{ {

View File

@@ -12,7 +12,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class DmpsAudioOutputControllerApiExtensions public static class DmpsAudioOutputControllerApiExtensions
{ {

View File

@@ -12,7 +12,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class DmpsRoutingControllerApiExtentions public static class DmpsRoutingControllerApiExtentions
{ {

View File

@@ -10,7 +10,7 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class GenericLightingApiExtensions public static class GenericLightingApiExtensions
{ {

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Core.CrestronIO;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class GenericRelayDeviceApiExtensions public static class GenericRelayDeviceApiExtensions
{ {

View File

@@ -12,7 +12,7 @@ using PepperDash.Core;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class GlsOccupancySensorBaseControllerApiExtensions public static class GlsOccupancySensorBaseControllerApiExtensions
{ {

View File

@@ -14,7 +14,7 @@ using PepperDash.Essentials.DM;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class HdMdxxxCEControllerApiExtensions public static class HdMdxxxCEControllerApiExtensions
{ {

View File

@@ -10,7 +10,7 @@ using PepperDash.Essentials.Core;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class IBasicCommunicationApiExtensions public static class IBasicCommunicationApiExtensions
{ {

View File

@@ -11,7 +11,7 @@ using PepperDash.Essentials.Core.CrestronIO;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class IDigitalInputApiExtenstions public static class IDigitalInputApiExtenstions
{ {

View File

@@ -10,7 +10,7 @@ using PepperDash.Essentials.Devices.Common;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class IRSetTopBoxBaseApiExtensions public static class IRSetTopBoxBaseApiExtensions
{ {

View File

@@ -4,7 +4,7 @@ using PepperDash.Core;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.CrestronIO; using PepperDash.Essentials.Core.CrestronIO;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class StatusSignDeviceApiExtensions public static class StatusSignDeviceApiExtensions
{ {

View File

@@ -6,7 +6,7 @@ using PepperDash.Essentials.Core.Monitoring;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public static class SystemMonitorBridge public static class SystemMonitorBridge
{ {

View File

@@ -51,7 +51,7 @@ namespace PepperDash.Essentials
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Bridges.BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator); CrestronConsole.AddNewConsoleCommand(Core.Bridges.BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s => CrestronConsole.AddNewConsoleCommand(s =>
{ {

View File

@@ -1,14 +1,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.EthernetCommunication; using Crestron.SimplSharpPro.EthernetCommunication;
using Newtonsoft.Json; using Newtonsoft.Json;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Lighting;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.CrestronIO;
//using PepperDash.Essentials.Devices.Common.Cameras; //using PepperDash.Essentials.Devices.Common.Cameras;
@@ -90,7 +89,8 @@ namespace PepperDash.Essentials.Core.Bridges
{ {
JoinMaps = new Dictionary<string, JoinMapBaseAdvanced>(); JoinMaps = new Dictionary<string, JoinMapBaseAdvanced>();
PropertiesConfig = JsonConvert.DeserializeObject<EiscApiPropertiesConfig>(dc.Properties.ToString()); PropertiesConfig = dc.Properties.ToObject<EiscApiPropertiesConfig>();
//PropertiesConfig = JsonConvert.DeserializeObject<EiscApiPropertiesConfig>(dc.Properties.ToString());
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(PropertiesConfig.Control.IpIdInt, PropertiesConfig.Control.TcpSshProperties.Address, Global.ControlSystem); Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(PropertiesConfig.Control.IpIdInt, PropertiesConfig.Control.TcpSshProperties.Address, Global.ControlSystem);
@@ -285,7 +285,7 @@ namespace PepperDash.Essentials.Core.Bridges
return; return;
} }
Debug.Console(0, "Join map for device '{0}' on EISC '{1}':", deviceKey, this.Key); Debug.Console(0, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
joinMap.PrintJoinMapInfo(); joinMap.PrintJoinMapInfo();
} }
@@ -294,6 +294,7 @@ namespace PepperDash.Essentials.Core.Bridges
/// </summary> /// </summary>
/// <param name="join"></param> /// <param name="join"></param>
/// <param name="type"></param> /// <param name="type"></param>
/// <param name="state"></param>
public void ExecuteJoinAction(uint join, string type, object state) public void ExecuteJoinAction(uint join, string type, object state)
{ {
try try
@@ -354,23 +355,23 @@ namespace PepperDash.Essentials.Core.Bridges
/// </summary> /// </summary>
/// <param name="currentDevice"></param> /// <param name="currentDevice"></param>
/// <param name="args"></param> /// <param name="args"></param>
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args) void Eisc_SigChange(object currentDevice, SigEventArgs args)
{ {
try try
{ {
if (Debug.Level >= 1) if (Debug.Level >= 1)
Debug.Console(1, this, "EiscApi change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue); Debug.Console(1, this, "EiscApi change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var uo = args.Sig.UserObject; var uo = args.Sig.UserObject;
if (uo != null)
{ if (uo == null) return;
Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
if (uo is Action<bool>) Debug.Console(1, this, "Executing Action: {0}", uo.ToString());
(uo as Action<bool>)(args.Sig.BoolValue); if (uo is Action<bool>)
else if (uo is Action<ushort>) (uo as Action<bool>)(args.Sig.BoolValue);
(uo as Action<ushort>)(args.Sig.UShortValue); else if (uo is Action<ushort>)
else if (uo is Action<string>) (uo as Action<ushort>)(args.Sig.UShortValue);
(uo as Action<string>)(args.Sig.StringValue); else if (uo is Action<string>)
} (uo as Action<string>)(args.Sig.StringValue);
} }
catch (Exception e) catch (Exception e)
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class AirMediaControllerJoinMap : JoinMapBase public class AirMediaControllerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class AppleTvJoinMap : JoinMapBase public class AppleTvJoinMap : JoinMapBase
{ {

View File

@@ -2,7 +2,7 @@
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class C2nRthsControllerJoinMap:JoinMapBase public class C2nRthsControllerJoinMap:JoinMapBase
{ {

View File

@@ -6,7 +6,7 @@ using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
/// <summary> /// <summary>
/// Join map for CameraBase devices /// Join map for CameraBase devices

View File

@@ -6,7 +6,7 @@ using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class DigitalLoggerJoinMap : JoinMapBase public class DigitalLoggerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class DisplayControllerJoinMap : JoinMapBase public class DisplayControllerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges { namespace PepperDash.Essentials.Core.Bridges {
public class DmBladeChassisControllerJoinMap : JoinMapBase { public class DmBladeChassisControllerJoinMap : JoinMapBase {
#region Digital/Analogs #region Digital/Analogs
#endregion #endregion

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class DmChassisControllerJoinMap : JoinMapBase public class DmChassisControllerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class DmRmcControllerJoinMap : JoinMapBase public class DmRmcControllerJoinMap : JoinMapBase
{ {

View File

@@ -1,11 +1,4 @@
using System; namespace PepperDash.Essentials.Core.Bridges
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges
{ {
public class DmTxControllerJoinMap : JoinMapBase public class DmTxControllerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class DmpsAudioOutputControllerJoinMap : JoinMapBase public class DmpsAudioOutputControllerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class DmpsRoutingControllerJoinMap : JoinMapBase public class DmpsRoutingControllerJoinMap : JoinMapBase
{ {

View File

@@ -7,7 +7,7 @@ using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class GenericLightingJoinMap : JoinMapBase public class GenericLightingJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class GenericRelayControllerJoinMap : JoinMapBase public class GenericRelayControllerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class GlsOccupancySensorBaseJoinMap : JoinMapBase public class GlsOccupancySensorBaseJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class HdMdxxxCEControllerJoinMap : JoinMapBase public class HdMdxxxCEControllerJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class IBasicCommunicationJoinMap : JoinMapBase public class IBasicCommunicationJoinMap : JoinMapBase
{ {

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class IDigitalInputJoinMap : JoinMapBase public class IDigitalInputJoinMap : JoinMapBase
{ {

View File

@@ -7,7 +7,7 @@ using PepperDash.Essentials.Core;
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class SetTopBoxControllerJoinMap : JoinMapBase public class SetTopBoxControllerJoinMap : JoinMapBase
{ {

View File

@@ -2,7 +2,7 @@
using Crestron.SimplSharp.Reflection; using Crestron.SimplSharp.Reflection;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class StatusSignControllerJoinMap:JoinMapBase public class StatusSignControllerJoinMap:JoinMapBase
{ {

View File

@@ -1,6 +1,6 @@
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Bridges namespace PepperDash.Essentials.Core.Bridges
{ {
public class SystemMonitorJoinMap : JoinMapBase public class SystemMonitorJoinMap : JoinMapBase
{ {

View File

@@ -1,13 +1,6 @@
using System; using System.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro; using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Bridges;
using PepperDash_Essentials_Core.Devices; using PepperDash_Essentials_Core.Devices;
namespace PepperDash.Essentials.Core namespace PepperDash.Essentials.Core
@@ -15,7 +8,7 @@ namespace PepperDash.Essentials.Core
/// <summary> /// <summary>
/// A bridge class to cover the basic features of GenericBase hardware /// A bridge class to cover the basic features of GenericBase hardware
/// </summary> /// </summary>
public abstract class CrestronGenericBaseDevice : EssentialsBridgeableDevice, IOnline, IHasFeedback, ICommunicationMonitor, IUsageTracking public abstract class CrestronGenericBaseDevice : EssentialsDevice, IOnline, IHasFeedback, ICommunicationMonitor, IUsageTracking
{ {
public virtual GenericBase Hardware { get; protected set; } public virtual GenericBase Hardware { get; protected set; }
@@ -34,7 +27,7 @@ namespace PepperDash.Essentials.Core
/// </summary> /// </summary>
public bool PreventRegistration { get; protected set; } public bool PreventRegistration { get; protected set; }
public CrestronGenericBaseDevice(string key, string name, GenericBase hardware) protected CrestronGenericBaseDevice(string key, string name, GenericBase hardware)
: base(key, name) : base(key, name)
{ {
Feedbacks = new FeedbackCollection<Feedback>(); Feedbacks = new FeedbackCollection<Feedback>();
@@ -42,13 +35,7 @@ namespace PepperDash.Essentials.Core
Hardware = hardware; Hardware = hardware;
IsOnline = new BoolFeedback("IsOnlineFeedback", () => Hardware.IsOnline); IsOnline = new BoolFeedback("IsOnlineFeedback", () => Hardware.IsOnline);
IsRegistered = new BoolFeedback("IsRegistered", () => Hardware.Registered); IsRegistered = new BoolFeedback("IsRegistered", () => Hardware.Registered);
IpConnectionsText = new StringFeedback("IpConnectionsText", () => IpConnectionsText = new StringFeedback("IpConnectionsText", () => Hardware.ConnectedIpList != null ? string.Join(",", Hardware.ConnectedIpList.Select(cip => cip.DeviceIpAddress).ToArray()) : string.Empty);
{
if (Hardware.ConnectedIpList != null)
return string.Join(",", Hardware.ConnectedIpList.Select(cip => cip.DeviceIpAddress).ToArray());
else
return string.Empty;
});
AddToFeedbackList(IsOnline, IpConnectionsText); AddToFeedbackList(IsOnline, IpConnectionsText);
CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000); CommunicationMonitor = new CrestronGenericBaseCommunicationMonitor(this, hardware, 120000, 300000);
@@ -80,7 +67,7 @@ namespace PepperDash.Essentials.Core
f.FireUpdate(); f.FireUpdate();
} }
Hardware.OnlineStatusChange += new OnlineStatusChangeEventHandler(Hardware_OnlineStatusChange); Hardware.OnlineStatusChange += Hardware_OnlineStatusChange;
CommunicationMonitor.Start(); CommunicationMonitor.Start();
return true; return true;
@@ -110,12 +97,11 @@ namespace PepperDash.Essentials.Core
{ {
foreach (var f in newFbs) foreach (var f in newFbs)
{ {
if (f != null) if (f == null) continue;
if (!Feedbacks.Contains(f))
{ {
if (!Feedbacks.Contains(f)) Feedbacks.Add(f);
{
Feedbacks.Add(f);
}
} }
} }
} }

View File

@@ -111,6 +111,29 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Bridges\BridgeBase.cs" />
<Compile Include="Bridges\IBridge.cs" />
<Compile Include="Bridges\JoinMaps\AirMediaControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\AppleTvJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\C2nRthsControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\CameraControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DigitalLoggerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DisplayControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmBladeChassisControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmChassisControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsAudioOutputControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmpsRoutingControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmRmcControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\DmTxControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\IBasicCommunicationJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\IDigitalInputJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\SetTopBoxControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\StatusSignControllerJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
<Compile Include="Config\Comm and IR\CecPortController.cs" /> <Compile Include="Config\Comm and IR\CecPortController.cs" />
<Compile Include="Config\Comm and IR\GenericComm.cs" /> <Compile Include="Config\Comm and IR\GenericComm.cs" />
<Compile Include="Config\Comm and IR\GenericHttpClient.cs" /> <Compile Include="Config\Comm and IR\GenericHttpClient.cs" />
@@ -132,6 +155,7 @@
<Compile Include="Devices\CrestronProcessor.cs" /> <Compile Include="Devices\CrestronProcessor.cs" />
<Compile Include="Devices\DeviceApiBase.cs" /> <Compile Include="Devices\DeviceApiBase.cs" />
<Compile Include="Devices\DeviceFeedbackExtensions.cs" /> <Compile Include="Devices\DeviceFeedbackExtensions.cs" />
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
<Compile Include="Devices\EssentialsDevice.cs" /> <Compile Include="Devices\EssentialsDevice.cs" />
<Compile Include="Devices\PC\InRoomPc.cs" /> <Compile Include="Devices\PC\InRoomPc.cs" />
<Compile Include="Devices\PC\Laptop.cs" /> <Compile Include="Devices\PC\Laptop.cs" />

View File

@@ -1,220 +1,263 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using Crestron.SimplSharpPro; using Crestron.SimplSharpPro;
using Crestron.DeviceSupport.Support; using Crestron.DeviceSupport.Support;
using Crestron.SimplSharpPro.DM; using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM.AirMedia; using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.AirMedia;
using PepperDash.Core; using Newtonsoft.Json;
using PepperDash.Essentials.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges;
namespace PepperDash.Essentials.DM.AirMedia using PepperDash.Essentials.Core.Config;
{
public class AirMediaController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IIROutputPorts, IComPorts namespace PepperDash.Essentials.DM.AirMedia
{ {
public AmX00 AirMedia { get; private set; } public class AirMediaController : CrestronGenericBridgeableBaseDevice, IRoutingInputsOutputs, IIROutputPorts, IComPorts
{
public DeviceConfig DeviceConfig { get; private set; } public AmX00 AirMedia { get; private set; }
AirMediaPropertiesConfig PropertiesConfig; public DeviceConfig DeviceConfig { get; private set; }
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; } AirMediaPropertiesConfig PropertiesConfig;
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; } public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
public BoolFeedback IsInSessionFeedback { get; private set; } public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
public IntFeedback ErrorFeedback { get; private set; }
public IntFeedback NumberOfUsersConnectedFeedback { get; set; } public BoolFeedback IsInSessionFeedback { get; private set; }
public IntFeedback LoginCodeFeedback { get; set; } public IntFeedback ErrorFeedback { get; private set; }
public StringFeedback ConnectionAddressFeedback { get; set; } public IntFeedback NumberOfUsersConnectedFeedback { get; set; }
public StringFeedback HostnameFeedback { get; set; } public IntFeedback LoginCodeFeedback { get; set; }
public IntFeedback VideoOutFeedback { get; private set; } public StringFeedback ConnectionAddressFeedback { get; set; }
public BoolFeedback HdmiVideoSyncDetectedFeedback { get; private set; } public StringFeedback HostnameFeedback { get; set; }
public StringFeedback SerialNumberFeedback { get; private set; } public IntFeedback VideoOutFeedback { get; private set; }
public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; } public BoolFeedback HdmiVideoSyncDetectedFeedback { get; private set; }
public StringFeedback SerialNumberFeedback { get; private set; }
public AirMediaController(string key, string name, AmX00 device, DeviceConfig dc, AirMediaPropertiesConfig props) public BoolFeedback AutomaticInputRoutingEnabledFeedback { get; private set; }
:base(key, name, device)
{ public AirMediaController(string key, string name, AmX00 device, DeviceConfig dc, AirMediaPropertiesConfig props)
AirMedia = device; :base(key, name, device)
{
DeviceConfig = dc; AirMedia = device;
DeviceConfig = dc;
PropertiesConfig = props; PropertiesConfig = props;
InputPorts = new RoutingPortCollection<RoutingInputPort>(); InputPorts = new RoutingPortCollection<RoutingInputPort>();
OutputPorts = new RoutingPortCollection<RoutingOutputPort>(); OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
InputPorts.Add(new RoutingInputPort(DmPortName.Osd, eRoutingSignalType.Audio | eRoutingSignalType.Video, InputPorts.Add(new RoutingInputPort(DmPortName.Osd, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.None, new Action(SelectPinPointUxLandingPage), this)); eRoutingPortConnectionType.None, new Action(SelectPinPointUxLandingPage), this));
InputPorts.Add(new RoutingInputPort(DmPortName.AirMediaIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, InputPorts.Add(new RoutingInputPort(DmPortName.AirMediaIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Streaming, new Action(SelectAirMedia), this)); eRoutingPortConnectionType.Streaming, new Action(SelectAirMedia), this));
InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, InputPorts.Add(new RoutingInputPort(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.Hdmi, new Action(SelectHdmiIn), this)); eRoutingPortConnectionType.Hdmi, new Action(SelectHdmiIn), this));
InputPorts.Add(new RoutingInputPort(DmPortName.AirBoardIn, eRoutingSignalType.Video, InputPorts.Add(new RoutingInputPort(DmPortName.AirBoardIn, eRoutingSignalType.Video,
eRoutingPortConnectionType.None, new Action(SelectAirboardIn), this)); eRoutingPortConnectionType.None, new Action(SelectAirboardIn), this));
if (AirMedia is Am300) if (AirMedia is Am300)
{ {
InputPorts.Add(new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, InputPorts.Add(new RoutingInputPort(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
eRoutingPortConnectionType.DmCat, new Action(SelectDmIn), this)); eRoutingPortConnectionType.DmCat, new Action(SelectDmIn), this));
} }
AirMedia.AirMedia.AirMediaChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(AirMedia_AirMediaChange); AirMedia.AirMedia.AirMediaChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(AirMedia_AirMediaChange);
IsInSessionFeedback = new BoolFeedback( new Func<bool>(() => AirMedia.AirMedia.StatusFeedback.UShortValue == 0 )); IsInSessionFeedback = new BoolFeedback( new Func<bool>(() => AirMedia.AirMedia.StatusFeedback.UShortValue == 0 ));
ErrorFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.ErrorFeedback.UShortValue)); ErrorFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.ErrorFeedback.UShortValue));
NumberOfUsersConnectedFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.NumberOfUsersConnectedFeedback.UShortValue)); NumberOfUsersConnectedFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.NumberOfUsersConnectedFeedback.UShortValue));
LoginCodeFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue)); LoginCodeFeedback = new IntFeedback(new Func<int>(() => AirMedia.AirMedia.LoginCodeFeedback.UShortValue));
ConnectionAddressFeedback = new StringFeedback(new Func<string>(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue)); ConnectionAddressFeedback = new StringFeedback(new Func<string>(() => AirMedia.AirMedia.ConnectionAddressFeedback.StringValue));
HostnameFeedback = new StringFeedback(new Func<string>(() => AirMedia.AirMedia.HostNameFeedback.StringValue)); HostnameFeedback = new StringFeedback(new Func<string>(() => AirMedia.AirMedia.HostNameFeedback.StringValue));
// TODO: Figure out if we can actually get the TSID/Serial // TODO: Figure out if we can actually get the TSID/Serial
SerialNumberFeedback = new StringFeedback(new Func<string>(() => "unknown")); SerialNumberFeedback = new StringFeedback(new Func<string>(() => "unknown"));
AirMedia.DisplayControl.DisplayControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(DisplayControl_DisplayControlChange); AirMedia.DisplayControl.DisplayControlChange += new Crestron.SimplSharpPro.DeviceSupport.GenericEventHandler(DisplayControl_DisplayControlChange);
VideoOutFeedback = new IntFeedback(new Func<int>(() => Convert.ToInt16(AirMedia.DisplayControl.VideoOutFeedback))); VideoOutFeedback = new IntFeedback(new Func<int>(() => Convert.ToInt16(AirMedia.DisplayControl.VideoOutFeedback)));
AutomaticInputRoutingEnabledFeedback = new BoolFeedback(new Func<bool>(() => AirMedia.DisplayControl.EnableAutomaticRoutingFeedback.BoolValue)); AutomaticInputRoutingEnabledFeedback = new BoolFeedback(new Func<bool>(() => AirMedia.DisplayControl.EnableAutomaticRoutingFeedback.BoolValue));
AirMedia.HdmiIn.StreamChange += new Crestron.SimplSharpPro.DeviceSupport.StreamEventHandler(HdmiIn_StreamChange); AirMedia.HdmiIn.StreamChange += new Crestron.SimplSharpPro.DeviceSupport.StreamEventHandler(HdmiIn_StreamChange);
HdmiVideoSyncDetectedFeedback = new BoolFeedback(new Func<bool>(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue)); HdmiVideoSyncDetectedFeedback = new BoolFeedback(new Func<bool>(() => AirMedia.HdmiIn.SyncDetectedFeedback.BoolValue));
} }
public override bool CustomActivate() public override bool CustomActivate()
{ {
if (PropertiesConfig.AutoSwitchingEnabled) if (PropertiesConfig.AutoSwitchingEnabled)
AirMedia.DisplayControl.EnableAutomaticRouting(); AirMedia.DisplayControl.EnableAutomaticRouting();
else else
AirMedia.DisplayControl.DisableAutomaticRouting(); AirMedia.DisplayControl.DisableAutomaticRouting();
return base.CustomActivate(); return base.CustomActivate();
} }
void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApi bridge)
{ {
if (args.EventId == AirMediaInputSlot.AirMediaStatusFeedbackEventId) var joinMap = new AirMediaControllerJoinMap();
IsInSessionFeedback.FireUpdate();
else if (args.EventId == AirMediaInputSlot.AirMediaErrorFeedbackEventId) var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
ErrorFeedback.FireUpdate();
else if (args.EventId == AirMediaInputSlot.AirMediaNumberOfUserConnectedEventId) if (!string.IsNullOrEmpty(joinMapSerialized))
NumberOfUsersConnectedFeedback.FireUpdate(); joinMap = JsonConvert.DeserializeObject<AirMediaControllerJoinMap>(joinMapSerialized);
else if (args.EventId == AirMediaInputSlot.AirMediaLoginCodeEventId)
LoginCodeFeedback.FireUpdate(); joinMap.OffsetJoinNumbers(joinStart);
else if (args.EventId == AirMediaInputSlot.AirMediaConnectionAddressFeedbackEventId)
ConnectionAddressFeedback.FireUpdate(); Debug.Console(1, "Linking to Trilist '{0}'", trilist.ID.ToString("X"));
else if (args.EventId == AirMediaInputSlot.AirMediaHostNameFeedbackEventId) Debug.Console(0, "Linking to Airmedia: {0}", Name);
HostnameFeedback.FireUpdate();
} trilist.StringInput[joinMap.Name].StringValue = Name;
void DisplayControl_DisplayControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args) var commMonitor = this as ICommunicationMonitor;
{
if (args.EventId == AmX00.VideoOutFeedbackEventId) commMonitor.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline]);
VideoOutFeedback.FireUpdate();
else if (args.EventId == AmX00.EnableAutomaticRoutingFeedbackEventId) IsInSessionFeedback.LinkInputSig(trilist.BooleanInput[joinMap.IsInSession]);
AutomaticInputRoutingEnabledFeedback.FireUpdate(); HdmiVideoSyncDetectedFeedback.LinkInputSig(trilist.BooleanInput[joinMap.HdmiVideoSync]);
}
trilist.SetSigTrueAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.EnableAutomaticRouting);
void HdmiIn_StreamChange(Crestron.SimplSharpPro.DeviceSupport.Stream stream, Crestron.SimplSharpPro.DeviceSupport.StreamEventArgs args) trilist.SetSigFalseAction(joinMap.AutomaticInputRoutingEnabled, AirMedia.DisplayControl.DisableAutomaticRouting);
{ AutomaticInputRoutingEnabledFeedback.LinkInputSig(trilist.BooleanInput[joinMap.AutomaticInputRoutingEnabled]);
if (args.EventId == DMInputEventIds.SourceSyncEventId)
HdmiVideoSyncDetectedFeedback.FireUpdate(); trilist.SetUShortSigAction(joinMap.VideoOut, (u) => SelectVideoOut(u));
}
VideoOutFeedback.LinkInputSig(trilist.UShortInput[joinMap.VideoOut]);
/// <summary> ErrorFeedback.LinkInputSig(trilist.UShortInput[joinMap.ErrorFB]);
/// Sets the VideoOut source ( 0 = PinpointUX, 1 = AirMedia, 2 = HDMI, 3 = DM, 4 = Airboard ) NumberOfUsersConnectedFeedback.LinkInputSig(trilist.UShortInput[joinMap.NumberOfUsersConnectedFB]);
/// </summary>
/// <param name="source">source number</param> trilist.SetUShortSigAction(joinMap.LoginCode, (u) => AirMedia.AirMedia.LoginCode.UShortValue = u);
public void SelectVideoOut(uint source) LoginCodeFeedback.LinkInputSig(trilist.UShortInput[joinMap.LoginCode]);
{
AirMedia.DisplayControl.VideoOut = (AmX00DisplayControl.eAirMediaX00VideoSource)source; ConnectionAddressFeedback.LinkInputSig(trilist.StringInput[joinMap.ConnectionAddressFB]);
} HostnameFeedback.LinkInputSig(trilist.StringInput[joinMap.HostnameFB]);
SerialNumberFeedback.LinkInputSig(trilist.StringInput[joinMap.SerialNumberFeedback]);
/// <summary> }
/// Selects the PinPointUXLandingPage input
/// </summary> void AirMedia_AirMediaChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
public void SelectPinPointUxLandingPage() {
{ if (args.EventId == AirMediaInputSlot.AirMediaStatusFeedbackEventId)
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.PinPointUxLandingPage; IsInSessionFeedback.FireUpdate();
} else if (args.EventId == AirMediaInputSlot.AirMediaErrorFeedbackEventId)
ErrorFeedback.FireUpdate();
/// <summary> else if (args.EventId == AirMediaInputSlot.AirMediaNumberOfUserConnectedEventId)
/// Selects the AirMedia input NumberOfUsersConnectedFeedback.FireUpdate();
/// </summary> else if (args.EventId == AirMediaInputSlot.AirMediaLoginCodeEventId)
public void SelectAirMedia() LoginCodeFeedback.FireUpdate();
{ else if (args.EventId == AirMediaInputSlot.AirMediaConnectionAddressFeedbackEventId)
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirMedia; ConnectionAddressFeedback.FireUpdate();
} else if (args.EventId == AirMediaInputSlot.AirMediaHostNameFeedbackEventId)
HostnameFeedback.FireUpdate();
/// <summary> }
/// Selects the DM input
/// </summary> void DisplayControl_DisplayControlChange(object sender, Crestron.SimplSharpPro.DeviceSupport.GenericEventArgs args)
public void SelectDmIn() {
{ if (args.EventId == AmX00.VideoOutFeedbackEventId)
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.HDMI; VideoOutFeedback.FireUpdate();
} else if (args.EventId == AmX00.EnableAutomaticRoutingFeedbackEventId)
AutomaticInputRoutingEnabledFeedback.FireUpdate();
/// <summary> }
/// Selects the HDMI INput
/// </summary> void HdmiIn_StreamChange(Crestron.SimplSharpPro.DeviceSupport.Stream stream, Crestron.SimplSharpPro.DeviceSupport.StreamEventArgs args)
public void SelectHdmiIn() {
{ if (args.EventId == DMInputEventIds.SourceSyncEventId)
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.DM; HdmiVideoSyncDetectedFeedback.FireUpdate();
} }
public void SelectAirboardIn() /// <summary>
{ /// Sets the VideoOut source ( 0 = PinpointUX, 1 = AirMedia, 2 = HDMI, 3 = DM, 4 = Airboard )
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirBoard; /// </summary>
} /// <param name="source">source number</param>
public void SelectVideoOut(uint source)
/// <summary> {
/// Reboots the device AirMedia.DisplayControl.VideoOut = (AmX00DisplayControl.eAirMediaX00VideoSource)source;
/// </summary> }
public void RebootDevice()
{ /// <summary>
AirMedia.AirMedia.DeviceReboot(); /// Selects the PinPointUXLandingPage input
} /// </summary>
public void SelectPinPointUxLandingPage()
#region IIROutputPorts Members {
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.PinPointUxLandingPage;
public CrestronCollection<IROutputPort> IROutputPorts }
{
get { return AirMedia.IROutputPorts; } /// <summary>
} /// Selects the AirMedia input
/// </summary>
public int NumberOfIROutputPorts public void SelectAirMedia()
{ {
get { return AirMedia.NumberOfIROutputPorts; } AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirMedia;
} }
/// <summary>
/// Selects the DM input
#endregion /// </summary>
public void SelectDmIn()
{
AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.HDMI;
#region IComPorts Members }
public CrestronCollection<ComPort> ComPorts /// <summary>
{ /// Selects the HDMI INput
get { return AirMedia.ComPorts; } /// </summary>
} public void SelectHdmiIn()
{
public int NumberOfComPorts AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.DM;
{ }
get { return AirMedia.NumberOfComPorts; }
} public void SelectAirboardIn()
{
#endregion AirMedia.DisplayControl.VideoOut = AmX00DisplayControl.eAirMediaX00VideoSource.AirBoard;
}
} /// <summary>
/// Reboots the device
/// </summary>
public void RebootDevice()
{
AirMedia.AirMedia.DeviceReboot();
}
#region IIROutputPorts Members
public CrestronCollection<IROutputPort> IROutputPorts
{
get { return AirMedia.IROutputPorts; }
}
public int NumberOfIROutputPorts
{
get { return AirMedia.NumberOfIROutputPorts; }
}
#endregion
#region IComPorts Members
public CrestronCollection<ComPort> ComPorts
{
get { return AirMedia.ComPorts; }
}
public int NumberOfComPorts
{
get { return AirMedia.NumberOfComPorts; }
}
#endregion
}
} }