mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-15 21:44:54 +00:00
Compare commits
41 Commits
master
...
1.5.3-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e83acd5bfa | ||
|
|
2f1592bc62 | ||
|
|
1c609764b8 | ||
|
|
c7464a1e34 | ||
|
|
608a9068b9 | ||
|
|
e006a4616a | ||
|
|
677789bec1 | ||
|
|
0dc589f2ea | ||
|
|
aecb36e937 | ||
|
|
be97fe15da | ||
|
|
2a7311ba50 | ||
|
|
b95c341fca | ||
|
|
469d3b0975 | ||
|
|
bece417bf3 | ||
|
|
75774d128d | ||
|
|
430c819813 | ||
|
|
6c2d8c02c1 | ||
|
|
2d0876486d | ||
|
|
22427b1246 | ||
|
|
3c7495aaa1 | ||
|
|
ef4b0441d3 | ||
|
|
190697d855 | ||
|
|
19e78d649f | ||
|
|
0dad34893e | ||
|
|
1fee896a3d | ||
|
|
b6f0ccbf17 | ||
|
|
10bc39ffea | ||
|
|
2a9f6e253b | ||
|
|
0869961622 | ||
|
|
dedcfcbb66 | ||
|
|
5707d12fbe | ||
|
|
8fe586dfec | ||
|
|
696f169ea4 | ||
|
|
efd4f379ee | ||
|
|
aef491855c | ||
|
|
7882210eaf | ||
|
|
138628613c | ||
|
|
912e545678 | ||
|
|
efe8b15763 | ||
|
|
f2cb95af96 | ||
|
|
3bf3ac2cce |
@@ -211,7 +211,7 @@ namespace PepperDash.Essentials
|
||||
var comm = CommFactory.GetControlPropertiesConfig(dc);
|
||||
var props = Newtonsoft.Json.JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(dc.Properties.ToString());
|
||||
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Comm Device");
|
||||
Debug.Console(1, "Factory Attempting to create new EssentialsTouchpanelController");
|
||||
|
||||
var panelController = new EssentialsTouchpanelController(dc.Key, dc.Name, dc.Type, props, comm.IpIdInt);
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
public class HdMdNxM4kEControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("Name")]
|
||||
public JoinDataComplete Name = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||
|
||||
[JoinName("EnableAutoRoute")]
|
||||
public JoinDataComplete EnableAutoRoute = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Enable Automatic Routing on 4x1 Switchers", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("DisableAutoRoute")]
|
||||
public JoinDataComplete DisableAutoRoute = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Disable Automatic Routing on 4x1 Switchers", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("InputName")]
|
||||
public JoinDataComplete InputName = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 8 },
|
||||
new JoinMetadata() { Label = "Device Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||
|
||||
[JoinName("InputSync")]
|
||||
public JoinDataComplete InputSync = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 8 },
|
||||
new JoinMetadata() { Label = "Device Input Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("OutputName")]
|
||||
public JoinDataComplete OutputName = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 2 },
|
||||
new JoinMetadata() { Label = "Device Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||
|
||||
[JoinName("OutputRoute")]
|
||||
public JoinDataComplete OutputRoute = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 2 },
|
||||
new JoinMetadata() { Label = "Device Output Route Set/Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
[JoinName("OutputRoutedName")]
|
||||
public JoinDataComplete OutputRoutedName = new JoinDataComplete(new JoinData() { JoinNumber = 16, JoinSpan = 2 },
|
||||
new JoinMetadata() { Label = "Device Output Route Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
|
||||
|
||||
[JoinName("EnableInputHdcp")]
|
||||
public JoinDataComplete EnableInputHdcp = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 8 },
|
||||
new JoinMetadata() { Label = "Device Enable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("DisableInputHdcp")]
|
||||
public JoinDataComplete DisableInputHdcp = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 8 },
|
||||
new JoinMetadata() { Label = "Device Disnable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("IsOnline")]
|
||||
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData() { JoinNumber = 30, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Device Onlne", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
public HdMdNxM4kEControllerJoinMap(uint joinStart)
|
||||
: base(joinStart, typeof(HdMdNxM4kEControllerJoinMap))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Bridges
|
||||
{
|
||||
public class Hrxxx0WirelessRemoteControllerJoinMap : JoinMapBaseAdvanced
|
||||
{
|
||||
[JoinName("Power")]
|
||||
public JoinDataComplete Power = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Power", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Menu")]
|
||||
public JoinDataComplete Menu = new JoinDataComplete(new JoinData() { JoinNumber = 2, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Menu", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Guide")]
|
||||
public JoinDataComplete Guide = new JoinDataComplete(new JoinData() { JoinNumber = 3, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Guide", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Info")]
|
||||
public JoinDataComplete Info = new JoinDataComplete(new JoinData() { JoinNumber = 4, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Info", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("VolumeUp")]
|
||||
public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData() { JoinNumber = 5, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "VolumeUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("VolumeDown")]
|
||||
public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData() { JoinNumber = 6, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "VolumeDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("DialPadUp")]
|
||||
public JoinDataComplete DialPadUp = new JoinDataComplete(new JoinData() { JoinNumber = 7, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "DialPadUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("DialPadDown")]
|
||||
public JoinDataComplete DialPadDown = new JoinDataComplete(new JoinData() { JoinNumber = 8, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "DialPadDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("DialPadLeft")]
|
||||
public JoinDataComplete DialPadLeft = new JoinDataComplete(new JoinData() { JoinNumber = 9, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "DialPadLeft", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("DialPadRight")]
|
||||
public JoinDataComplete DialPadRight = new JoinDataComplete(new JoinData() { JoinNumber = 10, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "DialPadRight", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("DialPadSelect")]
|
||||
public JoinDataComplete DialPadSelect = new JoinDataComplete(new JoinData() { JoinNumber = 11, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "DialPadSelect", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("ChannelUp")]
|
||||
public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData() { JoinNumber = 12, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "ChannelUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("ChannelDown")]
|
||||
public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData() { JoinNumber = 13, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "ChannelDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Mute")]
|
||||
public JoinDataComplete Mute = new JoinDataComplete(new JoinData() { JoinNumber = 14, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Mute", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Exit")]
|
||||
public JoinDataComplete Exit = new JoinDataComplete(new JoinData() { JoinNumber = 15, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Exit", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Last")]
|
||||
public JoinDataComplete Last = new JoinDataComplete(new JoinData() { JoinNumber = 16, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Last", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Play")]
|
||||
public JoinDataComplete Play = new JoinDataComplete(new JoinData() { JoinNumber = 17, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Play", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Pause")]
|
||||
public JoinDataComplete Pause = new JoinDataComplete(new JoinData() { JoinNumber = 18, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Pause", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Rewind")]
|
||||
public JoinDataComplete Rewind = new JoinDataComplete(new JoinData() { JoinNumber = 19, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Rewind", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("FastForward")]
|
||||
public JoinDataComplete FastForward = new JoinDataComplete(new JoinData() { JoinNumber = 20, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "FastForward", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("PreviousTrack")]
|
||||
public JoinDataComplete PreviousTrack = new JoinDataComplete(new JoinData() { JoinNumber = 21, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "PreviousTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("NextTrack")]
|
||||
public JoinDataComplete NextTrack = new JoinDataComplete(new JoinData() { JoinNumber = 22, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "NextTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Stop")]
|
||||
public JoinDataComplete Stop = new JoinDataComplete(new JoinData() { JoinNumber = 23, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Stop", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Record")]
|
||||
public JoinDataComplete Record = new JoinDataComplete(new JoinData() { JoinNumber = 24, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Record", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Dvr")]
|
||||
public JoinDataComplete Dvr = new JoinDataComplete(new JoinData() { JoinNumber = 25, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Dvr", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad1")]
|
||||
public JoinDataComplete Keypad1 = new JoinDataComplete(new JoinData() { JoinNumber = 26, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad2Abc")]
|
||||
public JoinDataComplete Keypad2 = new JoinDataComplete(new JoinData() { JoinNumber = 27, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad2Abc", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad3Def")]
|
||||
public JoinDataComplete Keypad3Def = new JoinDataComplete(new JoinData() { JoinNumber = 28, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad3Def", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad4Ghi")]
|
||||
public JoinDataComplete Keypad4Ghi = new JoinDataComplete(new JoinData() { JoinNumber = 29, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad4Ghi", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad5Jkl")]
|
||||
public JoinDataComplete Keypad5Jkl = new JoinDataComplete(new JoinData() { JoinNumber = 30, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad5Jkl", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad6Mno")]
|
||||
public JoinDataComplete Keypad6Mno = new JoinDataComplete(new JoinData() { JoinNumber = 31, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad6Mno", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad7Pqrs")]
|
||||
public JoinDataComplete Keypad7Pqrs = new JoinDataComplete(new JoinData() { JoinNumber = 32, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad7Pqrs", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad8Tuv")]
|
||||
public JoinDataComplete Keypad8Tuv = new JoinDataComplete(new JoinData() { JoinNumber = 33, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad8Tuv", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad9Wxyz")]
|
||||
public JoinDataComplete Keypad9Wxyz = new JoinDataComplete(new JoinData() { JoinNumber = 34, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad9Wxyz", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Keypad0")]
|
||||
public JoinDataComplete Keypad0 = new JoinDataComplete(new JoinData() { JoinNumber = 35, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Keypad0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Clear")]
|
||||
public JoinDataComplete Clear = new JoinDataComplete(new JoinData() { JoinNumber = 36, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Clear", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Enter")]
|
||||
public JoinDataComplete Enter = new JoinDataComplete(new JoinData() { JoinNumber = 37, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Enter", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Red")]
|
||||
public JoinDataComplete Red = new JoinDataComplete(new JoinData() { JoinNumber = 38, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Red", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Green")]
|
||||
public JoinDataComplete Green = new JoinDataComplete(new JoinData() { JoinNumber = 39, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Green", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Yellow")]
|
||||
public JoinDataComplete Yellow = new JoinDataComplete(new JoinData() { JoinNumber = 40, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Yellow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Blue")]
|
||||
public JoinDataComplete Blue = new JoinDataComplete(new JoinData() { JoinNumber = 41, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Blue", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom1")]
|
||||
public JoinDataComplete Custom1 = new JoinDataComplete(new JoinData() { JoinNumber = 42, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom2")]
|
||||
public JoinDataComplete Custom2 = new JoinDataComplete(new JoinData() { JoinNumber = 43, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom3")]
|
||||
public JoinDataComplete Custom3 = new JoinDataComplete(new JoinData() { JoinNumber = 44, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom4")]
|
||||
public JoinDataComplete Custom4 = new JoinDataComplete(new JoinData() { JoinNumber = 45, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom5")]
|
||||
public JoinDataComplete Custom5 = new JoinDataComplete(new JoinData() { JoinNumber = 46, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom6")]
|
||||
public JoinDataComplete Custom6 = new JoinDataComplete(new JoinData() { JoinNumber = 47, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom7")]
|
||||
public JoinDataComplete Custom7 = new JoinDataComplete(new JoinData() { JoinNumber = 48, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom8")]
|
||||
public JoinDataComplete Custom8 = new JoinDataComplete(new JoinData() { JoinNumber = 49, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Custom9")]
|
||||
public JoinDataComplete Custom9 = new JoinDataComplete(new JoinData() { JoinNumber = 50, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Custom9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Fav")]
|
||||
public JoinDataComplete Fav = new JoinDataComplete(new JoinData() { JoinNumber = 51, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Fav", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("Home")]
|
||||
public JoinDataComplete Home = new JoinDataComplete(new JoinData() { JoinNumber = 52, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "Home", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("BatteryLow")]
|
||||
public JoinDataComplete BatteryLow = new JoinDataComplete(new JoinData() { JoinNumber = 53, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "BatteryLow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("BatteryCritical")]
|
||||
public JoinDataComplete BatteryCritical = new JoinDataComplete(new JoinData() { JoinNumber = 54, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "BatteryCritical", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
|
||||
|
||||
[JoinName("BatteryVoltage")]
|
||||
public JoinDataComplete BatteryVoltage = new JoinDataComplete(new JoinData() { JoinNumber = 1, JoinSpan = 1 },
|
||||
new JoinMetadata() { Label = "BatteryVoltage", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
|
||||
|
||||
public Hrxxx0WirelessRemoteControllerJoinMap(uint joinStart)
|
||||
: base(joinStart, typeof(Hrxxx0WirelessRemoteControllerJoinMap))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -184,6 +184,26 @@ namespace PepperDash.Essentials.Core
|
||||
throw new FormatException(string.Format("ERROR:Unable to convert Cresnet ID: {0} to hex. Error:\n{1}", CresnetId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string InfinetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Attepmts to provide uiont conversion of string InifinetId
|
||||
/// </summary>
|
||||
public uint InfinetIdInt
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return Convert.ToUInt32(InfinetId, 16);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new FormatException(string.Format("ERROR:Unable to conver Infinet ID: {0} to hex. Error:\n{1}", InfinetId));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,235 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class IRPortHelper
|
||||
{
|
||||
public static string IrDriverPathPrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
return Global.FilePathPrefix + "IR" + Global.DirectorySeparator;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds either the ControlSystem or a device controller that contains IR ports and
|
||||
/// returns a port from the hardware device
|
||||
/// </summary>
|
||||
/// <param name="propsToken"></param>
|
||||
/// <returns>IrPortConfig object. The port and or filename will be empty/null
|
||||
/// if valid values don't exist on config</returns>
|
||||
public static IrOutPortConfig GetIrPort(JToken propsToken)
|
||||
{
|
||||
var control = propsToken["control"];
|
||||
if (control == null)
|
||||
return null;
|
||||
if (control["method"].Value<string>() != "ir")
|
||||
{
|
||||
Debug.Console(0, "IRPortHelper called with non-IR properties");
|
||||
return null;
|
||||
}
|
||||
|
||||
var port = new IrOutPortConfig();
|
||||
|
||||
var portDevKey = control.Value<string>("controlPortDevKey");
|
||||
var portNum = control.Value<uint>("controlPortNumber");
|
||||
if (portDevKey == null || portNum == 0)
|
||||
{
|
||||
Debug.Console(1, "WARNING: Properties is missing port device or port number");
|
||||
return port;
|
||||
}
|
||||
|
||||
IIROutputPorts irDev = null;
|
||||
if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)
|
||||
|| portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase))
|
||||
irDev = Global.ControlSystem;
|
||||
else
|
||||
irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts;
|
||||
|
||||
if (irDev == null)
|
||||
{
|
||||
Debug.Console(1, "[Config] Error, device with IR ports '{0}' not found", portDevKey);
|
||||
return port;
|
||||
}
|
||||
|
||||
if (portNum <= irDev.NumberOfIROutputPorts) // success!
|
||||
{
|
||||
var file = IrDriverPathPrefix + control["irFile"].Value<string>();
|
||||
port.Port = irDev.IROutputPorts[portNum];
|
||||
port.FileName = file;
|
||||
return port; // new IrOutPortConfig { Port = irDev.IROutputPorts[portNum], FileName = file };
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, "[Config] Error, device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return port;
|
||||
}
|
||||
}
|
||||
|
||||
public static IROutputPort GetIrOutputPort(DeviceConfig dc)
|
||||
{
|
||||
var irControllerKey = dc.Key + "-ir";
|
||||
if (dc.Properties == null)
|
||||
{
|
||||
Debug.Console(0, "[{0}] WARNING: Device config does not include properties. IR will not function.", dc.Key);
|
||||
return null;
|
||||
}
|
||||
|
||||
var control = dc.Properties["control"];
|
||||
if (control == null)
|
||||
{
|
||||
Debug.Console(0,
|
||||
"WARNING: Device config does not include control properties. IR will not function for {0}", dc.Key);
|
||||
return null;
|
||||
}
|
||||
|
||||
var portDevKey = control.Value<string>("controlPortDevKey");
|
||||
var portNum = control.Value<uint>("controlPortNumber");
|
||||
IIROutputPorts irDev = null;
|
||||
|
||||
if (portDevKey == null)
|
||||
{
|
||||
Debug.Console(0, "WARNING: control properties is missing ir device for {0}", dc.Key);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (portNum == 0)
|
||||
{
|
||||
Debug.Console(0, "WARNING: control properties is missing ir port number for {0}", dc.Key);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)
|
||||
|| portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase))
|
||||
irDev = Global.ControlSystem;
|
||||
else
|
||||
irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts;
|
||||
|
||||
if (irDev == null)
|
||||
{
|
||||
Debug.Console(0, "WARNING: device with IR ports '{0}' not found", portDevKey);
|
||||
return null;
|
||||
}
|
||||
if (portNum >= irDev.NumberOfIROutputPorts)
|
||||
{
|
||||
Debug.Console(0, "WARNING: device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
var port = irDev.IROutputPorts[portNum];
|
||||
|
||||
port.LoadIRDriver(Global.FilePathPrefix + "IR" + Global.DirectorySeparator + control["irFile"].Value<string>());
|
||||
|
||||
return port;
|
||||
|
||||
}
|
||||
|
||||
public static IrOutputPortController GetIrOutputPortController(DeviceConfig config)
|
||||
{
|
||||
Debug.Console(1, "Attempting to create new Ir Port Controller");
|
||||
|
||||
if (config == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var irDevice = new IrOutputPortController(config.Key, GetIrOutputPort, config);
|
||||
|
||||
return irDevice;
|
||||
}
|
||||
|
||||
/*
|
||||
/// <summary>
|
||||
/// Returns a ready-to-go IrOutputPortController from a DeviceConfig object.
|
||||
/// </summary>
|
||||
public static IrOutputPortController GetIrOutputPortController(DeviceConfig devConf)
|
||||
{
|
||||
var irControllerKey = devConf.Key + "-ir";
|
||||
if (devConf.Properties == null)
|
||||
{
|
||||
Debug.Console(0, "[{0}] WARNING: Device config does not include properties. IR will not function.", devConf.Key);
|
||||
return new IrOutputPortController(irControllerKey, null, "");
|
||||
}
|
||||
|
||||
var control = devConf.Properties["control"];
|
||||
if (control == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: Device config does not include control properties. IR will not function");
|
||||
return c;
|
||||
}
|
||||
|
||||
var portDevKey = control.Value<string>("controlPortDevKey");
|
||||
var portNum = control.Value<uint>("controlPortNumber");
|
||||
IIROutputPorts irDev = null;
|
||||
|
||||
if (portDevKey == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: control properties is missing ir device");
|
||||
return c;
|
||||
}
|
||||
|
||||
if (portNum == 0)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: control properties is missing ir port number");
|
||||
return c;
|
||||
}
|
||||
|
||||
if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)
|
||||
|| portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase))
|
||||
irDev = Global.ControlSystem;
|
||||
else
|
||||
irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts;
|
||||
|
||||
if (irDev == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: device with IR ports '{0}' not found", portDevKey);
|
||||
return c;
|
||||
}
|
||||
|
||||
if (portNum <= irDev.NumberOfIROutputPorts) // success!
|
||||
return new IrOutputPortController(irControllerKey, irDev.IROutputPorts[portNum],
|
||||
IrDriverPathPrefix + control["irFile"].Value<string>());
|
||||
else
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return c;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper to help in IR port creation
|
||||
/// </summary>
|
||||
public class IrOutPortConfig
|
||||
{
|
||||
public IROutputPort Port { get; set; }
|
||||
public string FileName { get; set; }
|
||||
|
||||
public IrOutPortConfig()
|
||||
{
|
||||
FileName = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public class ComPortController : Device, IBasicCommunication
|
||||
{
|
||||
public event EventHandler<GenericCommMethodReceiveBytesArgs> BytesReceived;
|
||||
public event EventHandler<GenericCommMethodReceiveTextArgs> TextReceived;
|
||||
|
||||
ComPort Port;
|
||||
ComPort.ComPortSpec Spec;
|
||||
|
||||
public ComPortController(string key, IComPorts ComDevice, uint comPortNum, ComPort.ComPortSpec spec)
|
||||
: base(key)
|
||||
{
|
||||
Port = ComDevice.ComPorts[comPortNum];
|
||||
Spec = spec;
|
||||
|
||||
Debug.Console(2, "Creating com port '{0}'", key);
|
||||
Debug.Console(2, "Com port spec:\r{0}", JsonConvert.SerializeObject(spec));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a ComPort if the parameters are correct. Returns and logs errors if not
|
||||
/// </summary>
|
||||
public static ComPortController GetComPortController(string key,
|
||||
IComPorts comDevice, uint comPortNum, ComPort.ComPortSpec spec)
|
||||
{
|
||||
Debug.Console(1, "Creating com port '{0}'", key);
|
||||
if (comDevice == null)
|
||||
throw new ArgumentNullException("comDevice");
|
||||
if (string.IsNullOrEmpty(key))
|
||||
throw new ArgumentNullException("key");
|
||||
if (comPortNum > comDevice.NumberOfComPorts)
|
||||
{
|
||||
Debug.Console(0, "[{0}] Com port {1} out of range on {2}",
|
||||
key, comPortNum, comDevice.GetType().Name);
|
||||
return null;
|
||||
}
|
||||
var port = new ComPortController(key, comDevice, comPortNum, spec);
|
||||
return port;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers port and sends ComSpec
|
||||
/// </summary>
|
||||
/// <returns>false if either register or comspec fails</returns>
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
var result = Port.Register();
|
||||
if (result != eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(0, this, "Cannot register Com port: {0}", result);
|
||||
return false;
|
||||
}
|
||||
var specResult = Port.SetComPortSpec(Spec);
|
||||
if (specResult != 0)
|
||||
{
|
||||
Debug.Console(0, this, "Cannot set comspec");
|
||||
return false;
|
||||
}
|
||||
Port.SerialDataReceived += new ComPortDataReceivedEvent(Port_SerialDataReceived);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Port_SerialDataReceived(ComPort ReceivingComPort, ComPortSerialDataEventArgs args)
|
||||
{
|
||||
if (BytesReceived != null)
|
||||
{
|
||||
var bytes = Encoding.GetEncoding(28591).GetBytes(args.SerialData);
|
||||
BytesReceived(this, new GenericCommMethodReceiveBytesArgs(bytes));
|
||||
}
|
||||
if(TextReceived != null)
|
||||
TextReceived(this, new GenericCommMethodReceiveTextArgs(args.SerialData));
|
||||
}
|
||||
|
||||
public override bool Deactivate()
|
||||
{
|
||||
return Port.UnRegister() == eDeviceRegistrationUnRegistrationResponse.Success;
|
||||
}
|
||||
|
||||
#region IBasicCommunication Members
|
||||
|
||||
public void SendText(string text)
|
||||
{
|
||||
Port.Send(text);
|
||||
}
|
||||
|
||||
public void SendBytes(byte[] bytes)
|
||||
{
|
||||
|
||||
var text = Encoding.GetEncoding(28591).GetString(bytes, 0, bytes.Length);
|
||||
Port.Send(text);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,160 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class IRPortHelper
|
||||
{
|
||||
public static string IrDriverPathPrefix
|
||||
{
|
||||
get
|
||||
{
|
||||
return Global.FilePathPrefix + "IR" + Global.DirectorySeparator;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finds either the ControlSystem or a device controller that contains IR ports and
|
||||
/// returns a port from the hardware device
|
||||
/// </summary>
|
||||
/// <param name="propsToken"></param>
|
||||
/// <returns>IrPortConfig object. The port and or filename will be empty/null
|
||||
/// if valid values don't exist on config</returns>
|
||||
public static IrOutPortConfig GetIrPort(JToken propsToken)
|
||||
{
|
||||
var control = propsToken["control"];
|
||||
if (control == null)
|
||||
return null;
|
||||
if (control["method"].Value<string>() != "ir")
|
||||
{
|
||||
Debug.Console(0, "IRPortHelper called with non-IR properties");
|
||||
return null;
|
||||
}
|
||||
|
||||
var port = new IrOutPortConfig();
|
||||
|
||||
var portDevKey = control.Value<string>("controlPortDevKey");
|
||||
var portNum = control.Value<uint>("controlPortNumber");
|
||||
if (portDevKey == null || portNum == 0)
|
||||
{
|
||||
Debug.Console(1, "WARNING: Properties is missing port device or port number");
|
||||
return port;
|
||||
}
|
||||
|
||||
IIROutputPorts irDev = null;
|
||||
if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)
|
||||
|| portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase))
|
||||
irDev = Global.ControlSystem;
|
||||
else
|
||||
irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts;
|
||||
|
||||
if (irDev == null)
|
||||
{
|
||||
Debug.Console(1, "[Config] Error, device with IR ports '{0}' not found", portDevKey);
|
||||
return port;
|
||||
}
|
||||
|
||||
if (portNum <= irDev.NumberOfIROutputPorts) // success!
|
||||
{
|
||||
var file = IrDriverPathPrefix + control["irFile"].Value<string>();
|
||||
port.Port = irDev.IROutputPorts[portNum];
|
||||
port.FileName = file;
|
||||
return port; // new IrOutPortConfig { Port = irDev.IROutputPorts[portNum], FileName = file };
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(1, "[Config] Error, device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return port;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a ready-to-go IrOutputPortController from a DeviceConfig object.
|
||||
/// </summary>
|
||||
public static IrOutputPortController GetIrOutputPortController(DeviceConfig devConf)
|
||||
{
|
||||
var irControllerKey = devConf.Key + "-ir";
|
||||
if (devConf.Properties == null)
|
||||
{
|
||||
Debug.Console(0, "[{0}] WARNING: Device config does not include properties. IR will not function.", devConf.Key);
|
||||
return new IrOutputPortController(irControllerKey, null, "");
|
||||
}
|
||||
|
||||
var control = devConf.Properties["control"];
|
||||
if (control == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: Device config does not include control properties. IR will not function");
|
||||
return c;
|
||||
}
|
||||
|
||||
var portDevKey = control.Value<string>("controlPortDevKey");
|
||||
var portNum = control.Value<uint>("controlPortNumber");
|
||||
IIROutputPorts irDev = null;
|
||||
|
||||
if (portDevKey == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: control properties is missing ir device");
|
||||
return c;
|
||||
}
|
||||
|
||||
if (portNum == 0)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: control properties is missing ir port number");
|
||||
return c;
|
||||
}
|
||||
|
||||
if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)
|
||||
|| portDevKey.Equals("processor", StringComparison.OrdinalIgnoreCase))
|
||||
irDev = Global.ControlSystem;
|
||||
else
|
||||
irDev = DeviceManager.GetDeviceForKey(portDevKey) as IIROutputPorts;
|
||||
|
||||
if (irDev == null)
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: device with IR ports '{0}' not found", portDevKey);
|
||||
return c;
|
||||
}
|
||||
|
||||
if (portNum <= irDev.NumberOfIROutputPorts) // success!
|
||||
return new IrOutputPortController(irControllerKey, irDev.IROutputPorts[portNum],
|
||||
IrDriverPathPrefix + control["irFile"].Value<string>());
|
||||
else
|
||||
{
|
||||
var c = new IrOutputPortController(irControllerKey, null, "");
|
||||
Debug.Console(0, c, "WARNING: device '{0}' IR port {1} out of range",
|
||||
portDevKey, portNum);
|
||||
return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Wrapper to help in IR port creation
|
||||
/// </summary>
|
||||
public class IrOutPortConfig
|
||||
{
|
||||
public IROutputPort Port { get; set; }
|
||||
public string FileName { get; set; }
|
||||
|
||||
public IrOutPortConfig()
|
||||
{
|
||||
FileName = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,8 @@ using PepperDash.Essentials.Core.Config;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
{
|
||||
[Description("Wrapper class for Digital Input")]
|
||||
public class GenericDigitalInputDevice : EssentialsBridgeableDevice, IDigitalInput
|
||||
{
|
||||
public DigitalInput InputPort { get; private set; }
|
||||
@@ -26,23 +27,78 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
return () => InputPort.State;
|
||||
}
|
||||
}
|
||||
|
||||
public GenericDigitalInputDevice(string key, DigitalInput inputPort):
|
||||
base(key)
|
||||
{
|
||||
InputStateFeedback = new BoolFeedback(InputStateFeedbackFunc);
|
||||
|
||||
InputPort = inputPort;
|
||||
|
||||
InputPort.StateChange += InputPort_StateChange;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public GenericDigitalInputDevice(string key, string name, Func<IOPortConfig, DigitalInput> postActivationFunc,
|
||||
IOPortConfig config)
|
||||
: base(key, name)
|
||||
{
|
||||
|
||||
AddPostActivationAction(() =>
|
||||
{
|
||||
InputPort = postActivationFunc(config);
|
||||
|
||||
InputPort.Register();
|
||||
|
||||
InputPort.StateChange += InputPort_StateChange;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
void InputPort_StateChange(DigitalInput digitalInput, DigitalInputEventArgs args)
|
||||
{
|
||||
InputStateFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
InputStateFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PreActivate
|
||||
|
||||
private static DigitalInput GetDigitalInput(IOPortConfig dc)
|
||||
{
|
||||
IDigitalInputPorts ioPortDevice;
|
||||
|
||||
if (dc.PortDeviceKey.Equals("processor"))
|
||||
{
|
||||
if (!Global.ControlSystem.SupportsDigitalInput)
|
||||
{
|
||||
Debug.Console(0, "GetDigitalInput: Processor does not support Digital Inputs");
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = Global.ControlSystem;
|
||||
}
|
||||
else
|
||||
{
|
||||
var ioPortDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IDigitalInputPorts;
|
||||
if (ioPortDev == null)
|
||||
{
|
||||
Debug.Console(0, "GetDigitalInput: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
ioPortDevice = ioPortDev;
|
||||
}
|
||||
if (ioPortDevice == null)
|
||||
{
|
||||
Debug.Console(0, "GetDigitalInput: Device '0' is not a valid IRelayPorts Device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (dc.PortNumber > ioPortDevice.NumberOfDigitalInputPorts)
|
||||
{
|
||||
Debug.Console(0, "GetDigitalInput: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
}
|
||||
|
||||
return ioPortDevice.DigitalInputPorts[dc.PortNumber];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new IDigitalInputJoinMap(joinStart);
|
||||
@@ -65,98 +121,37 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
Debug.Console(1, this, "Unable to link device '{0}'. Input is null", Key);
|
||||
Debug.Console(1, this, "Error: {0}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Factory
|
||||
|
||||
public class GenericDigitalInputDeviceFactory : EssentialsDeviceFactory<GenericDigitalInputDevice>
|
||||
{
|
||||
public GenericDigitalInputDeviceFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "digitalinput" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Relay Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
if (props == null) return null;
|
||||
|
||||
var portDevice = new GenericDigitalInputDevice(dc.Key, dc.Name, GetDigitalInput, props);
|
||||
|
||||
return portDevice;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
public class GenericDigitalInputDeviceFactory : EssentialsDeviceFactory<GenericDigitalInputDevice>
|
||||
{
|
||||
public GenericDigitalInputDeviceFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "digitalinput" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Digtal Input Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
IDigitalInputPorts portDevice;
|
||||
|
||||
if (props.PortDeviceKey == "processor")
|
||||
portDevice = Global.ControlSystem as IDigitalInputPorts;
|
||||
else
|
||||
portDevice = DeviceManager.GetDeviceForKey(props.PortDeviceKey) as IDigitalInputPorts;
|
||||
|
||||
if (portDevice == null)
|
||||
Debug.Console(0, "ERROR: Unable to add digital input device with key '{0}'. Port Device does not support digital inputs", dc.Key);
|
||||
else
|
||||
{
|
||||
var cs = (portDevice as CrestronControlSystem);
|
||||
if (cs == null)
|
||||
{
|
||||
Debug.Console(0, "ERROR: Port device for [{0}] is not control system", props.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (cs.SupportsVersiport)
|
||||
{
|
||||
Debug.Console(1, "Attempting to add Digital Input device to Versiport port '{0}'", props.PortNumber);
|
||||
|
||||
if (props.PortNumber > cs.NumberOfVersiPorts)
|
||||
{
|
||||
Debug.Console(0, "WARNING: Cannot add Vesiport {0} on {1}. Out of range",
|
||||
props.PortNumber, props.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
Versiport vp = cs.VersiPorts[props.PortNumber];
|
||||
|
||||
if (!vp.Registered)
|
||||
{
|
||||
var regSuccess = vp.Register();
|
||||
if (regSuccess == eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(1, "Successfully Created Digital Input Device on Versiport");
|
||||
return new GenericVersiportDigitalInputDevice(dc.Key, vp, props);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Console(0, "WARNING: Attempt to register versiport {0} on device with key '{1}' failed: {2}",
|
||||
props.PortNumber, props.PortDeviceKey, regSuccess);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cs.SupportsDigitalInput)
|
||||
{
|
||||
Debug.Console(1, "Attempting to add Digital Input device to Digital Input port '{0}'", props.PortNumber);
|
||||
|
||||
if (props.PortNumber > cs.NumberOfDigitalInputPorts)
|
||||
{
|
||||
Debug.Console(0, "WARNING: Cannot register DIO port {0} on {1}. Out of range",
|
||||
props.PortNumber, props.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
DigitalInput digitalInput = cs.DigitalInputPorts[props.PortNumber];
|
||||
|
||||
if (!digitalInput.Registered)
|
||||
{
|
||||
if (digitalInput.Register() == eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(1, "Successfully Created Digital Input Device on Digital Input");
|
||||
return new GenericDigitalInputDevice(dc.Key, digitalInput);
|
||||
}
|
||||
else
|
||||
Debug.Console(0, "WARNING: Attempt to register digital input {0} on device with key '{1}' failed.",
|
||||
props.PortNumber, props.PortDeviceKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,46 +14,114 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a generic device controlled by relays
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Description("Wrapper class for a Relay")]
|
||||
public class GenericRelayDevice : EssentialsBridgeableDevice, ISwitchedOutput
|
||||
{
|
||||
public Relay RelayOutput { get; private set; }
|
||||
|
||||
public BoolFeedback OutputIsOnFeedback { get; private set; }
|
||||
|
||||
public GenericRelayDevice(string key, Relay relay):
|
||||
base(key)
|
||||
{
|
||||
OutputIsOnFeedback = new BoolFeedback(new Func<bool>(() => RelayOutput.State));
|
||||
|
||||
RelayOutput = relay;
|
||||
RelayOutput.Register();
|
||||
|
||||
RelayOutput.StateChange += new RelayEventHandler(RelayOutput_StateChange);
|
||||
}
|
||||
|
||||
public BoolFeedback OutputIsOnFeedback { get; private set; }
|
||||
|
||||
//Maintained for compatibility with PepperDash.Essentials.Core.Devices.CrestronProcessor
|
||||
public GenericRelayDevice(string key, Relay relay) :
|
||||
base(key)
|
||||
{
|
||||
OutputIsOnFeedback = new BoolFeedback(new Func<bool>(() => RelayOutput.State));
|
||||
|
||||
RelayOutput = relay;
|
||||
RelayOutput.Register();
|
||||
|
||||
RelayOutput.StateChange += new RelayEventHandler(RelayOutput_StateChange);
|
||||
}
|
||||
|
||||
public GenericRelayDevice(string key, string name, Func<IOPortConfig, Relay> postActivationFunc,
|
||||
IOPortConfig config)
|
||||
: base(key, name)
|
||||
{
|
||||
|
||||
AddPostActivationAction(() =>
|
||||
{
|
||||
RelayOutput = postActivationFunc(config);
|
||||
|
||||
RelayOutput.Register();
|
||||
|
||||
RelayOutput.StateChange += RelayOutput_StateChange;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
#region PreActivate
|
||||
|
||||
private static Relay GetRelay(IOPortConfig dc)
|
||||
{
|
||||
|
||||
IRelayPorts relayDevice;
|
||||
|
||||
if(dc.PortDeviceKey.Equals("processor"))
|
||||
{
|
||||
if (!Global.ControlSystem.SupportsRelay)
|
||||
{
|
||||
Debug.Console(0, "GetRelayDevice: Processor does not support relays");
|
||||
return null;
|
||||
}
|
||||
relayDevice = Global.ControlSystem;
|
||||
}
|
||||
else
|
||||
{
|
||||
var relayDev = DeviceManager.GetDeviceForKey(dc.PortDeviceKey) as IRelayPorts;
|
||||
if (relayDev == null)
|
||||
{
|
||||
Debug.Console(0, "GetRelayDevice: Device {0} is not a valid device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
relayDevice = relayDev;
|
||||
}
|
||||
if (relayDevice == null)
|
||||
{
|
||||
Debug.Console(0, "GetRelayDevice: Device '0' is not a valid IRelayPorts Device", dc.PortDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (dc.PortNumber > relayDevice.NumberOfRelayPorts)
|
||||
{
|
||||
Debug.Console(0, "GetRelayDevice: Device {0} does not contain a port {1}", dc.PortDeviceKey, dc.PortNumber);
|
||||
}
|
||||
|
||||
return relayDevice.RelayPorts[dc.PortNumber];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
void RelayOutput_StateChange(Relay relay, RelayEventArgs args)
|
||||
{
|
||||
OutputIsOnFeedback.FireUpdate();
|
||||
OutputIsOnFeedback.FireUpdate();
|
||||
}
|
||||
|
||||
public void OpenRelay()
|
||||
{
|
||||
RelayOutput.State = false;
|
||||
}
|
||||
|
||||
public void CloseRelay()
|
||||
{
|
||||
RelayOutput.State = true;
|
||||
}
|
||||
|
||||
public void ToggleRelayState()
|
||||
{
|
||||
if (RelayOutput.State == true)
|
||||
OpenRelay();
|
||||
else
|
||||
CloseRelay();
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public void OpenRelay()
|
||||
{
|
||||
RelayOutput.State = false;
|
||||
}
|
||||
|
||||
public void CloseRelay()
|
||||
{
|
||||
RelayOutput.State = true;
|
||||
}
|
||||
|
||||
public void ToggleRelayState()
|
||||
{
|
||||
if (RelayOutput.State == true)
|
||||
OpenRelay();
|
||||
else
|
||||
CloseRelay();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISwitchedOutput Members
|
||||
|
||||
@@ -67,8 +135,10 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
OpenRelay();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new GenericRelayControllerJoinMap(joinStart);
|
||||
@@ -98,77 +168,90 @@ namespace PepperDash.Essentials.Core.CrestronIO
|
||||
|
||||
// feedback for relay state
|
||||
|
||||
OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay.JoinNumber]);
|
||||
}
|
||||
}
|
||||
OutputIsOnFeedback.LinkInputSig(trilist.BooleanInput[joinMap.Relay.JoinNumber]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Factory
|
||||
|
||||
public class GenericRelayDeviceFactory : EssentialsDeviceFactory<GenericRelayDevice>
|
||||
{
|
||||
public GenericRelayDeviceFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "relayoutput" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Relay Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
|
||||
if (props == null) return null;
|
||||
|
||||
var portDevice = new GenericRelayDevice(dc.Key, dc.Name, GetRelay, props);
|
||||
|
||||
return portDevice;
|
||||
|
||||
|
||||
/*
|
||||
if (props.PortDeviceKey == "processor")
|
||||
portDevice = Global.ControlSystem as IRelayPorts;
|
||||
else
|
||||
portDevice = DeviceManager.GetDeviceForKey(props.PortDeviceKey) as IRelayPorts;
|
||||
|
||||
public class GenericRelayDeviceFactory : EssentialsDeviceFactory<GenericRelayDevice>
|
||||
{
|
||||
public GenericRelayDeviceFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "relayoutput" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new Generic Relay Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<IOPortConfig>(dc.Properties.ToString());
|
||||
var key = dc.Key;
|
||||
|
||||
IRelayPorts portDevice;
|
||||
|
||||
if (props.PortDeviceKey == "processor")
|
||||
portDevice = Global.ControlSystem as IRelayPorts;
|
||||
else
|
||||
portDevice = DeviceManager.GetDeviceForKey(props.PortDeviceKey) as IRelayPorts;
|
||||
|
||||
if (portDevice == null)
|
||||
Debug.Console(0, "Unable to add relay device with key '{0}'. Port Device does not support relays", key);
|
||||
else
|
||||
{
|
||||
var cs = (portDevice as CrestronControlSystem);
|
||||
|
||||
if (cs != null)
|
||||
{
|
||||
// The relay is on a control system processor
|
||||
if (!cs.SupportsRelay || props.PortNumber > cs.NumberOfRelayPorts)
|
||||
{
|
||||
Debug.Console(0, "Port Device: {0} does not support relays or does not have enough relays");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (portDevice == null)
|
||||
Debug.Console(0, "Unable to add relay device with key '{0}'. Port Device does not support relays", key);
|
||||
else
|
||||
{
|
||||
// The relay is on another device type
|
||||
var cs = (portDevice as CrestronControlSystem);
|
||||
|
||||
if (props.PortNumber > portDevice.NumberOfRelayPorts)
|
||||
if (cs != null)
|
||||
{
|
||||
Debug.Console(0, "Port Device: {0} does not have enough relays");
|
||||
return null;
|
||||
// The relay is on a control system processor
|
||||
if (!cs.SupportsRelay || props.PortNumber > cs.NumberOfRelayPorts)
|
||||
{
|
||||
Debug.Console(0, "Port Device: {0} does not support relays or does not have enough relays");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Relay relay = portDevice.RelayPorts[props.PortNumber];
|
||||
|
||||
if (!relay.Registered)
|
||||
{
|
||||
if (relay.Register() == eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
return new GenericRelayDevice(key, relay);
|
||||
else
|
||||
Debug.Console(0, "Attempt to register relay {0} on device with key '{1}' failed.", props.PortNumber, props.PortDeviceKey);
|
||||
{
|
||||
// The relay is on another device type
|
||||
|
||||
if (props.PortNumber > portDevice.NumberOfRelayPorts)
|
||||
{
|
||||
Debug.Console(0, "Port Device: {0} does not have enough relays");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Relay relay = portDevice.RelayPorts[props.PortNumber];
|
||||
|
||||
if (!relay.Registered)
|
||||
{
|
||||
if (relay.Register() == eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
return new GenericRelayDevice(key, relay);
|
||||
else
|
||||
Debug.Console(0, "Attempt to register relay {0} on device with key '{1}' failed.", props.PortNumber, props.PortDeviceKey);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new GenericRelayDevice(key, relay);
|
||||
}
|
||||
|
||||
// Future: Check if portDevice is 3-series card or other non control system that supports versiports
|
||||
}
|
||||
else
|
||||
{
|
||||
return new GenericRelayDevice(key, relay);
|
||||
}
|
||||
|
||||
// Future: Check if portDevice is 3-series card or other non control system that supports versiports
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -33,7 +33,7 @@ namespace PepperDash.Essentials.Core
|
||||
triList.SetBoolSigAction(141, dev.Right);
|
||||
triList.SetBoolSigAction(142, dev.Select);
|
||||
triList.SetBoolSigAction(130, dev.Menu);
|
||||
triList.SetBoolSigAction(134, dev.Exit);
|
||||
triList.SetBoolSigAction(134, dev.Exit);
|
||||
}
|
||||
|
||||
public static void UnlinkButtons(this IDPad dev, BasicTriList triList)
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
public ConfigSnippetAttribute(string configSnippet)
|
||||
{
|
||||
Debug.Console(2, "Setting Description {0}", configSnippet);
|
||||
Debug.Console(2, "Setting Config Snippet {0}", configSnippet);
|
||||
_ConfigSnippet = configSnippet;
|
||||
}
|
||||
|
||||
@@ -83,8 +83,9 @@ namespace PepperDash.Essentials.Core
|
||||
foreach (var typeName in TypeNames)
|
||||
{
|
||||
Debug.Console(2, "Getting Description Attribute from class: '{0}'", typeof(T).FullName);
|
||||
var attributes = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[];
|
||||
string description = attributes[0].Description;
|
||||
var descriptionAttribute = typeof(T).GetCustomAttributes(typeof(DescriptionAttribute), true) as DescriptionAttribute[];
|
||||
string description = descriptionAttribute[0].Description;
|
||||
var snippetAttribute = typeof(T).GetCustomAttributes(typeof(ConfigSnippetAttribute), true) as ConfigSnippetAttribute[];
|
||||
DeviceFactory.AddFactoryForType(typeName.ToLower(), description, typeof(T), BuildDevice);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public interface IBasicVideoMute
|
||||
{
|
||||
void VideoMuteToggle();
|
||||
}
|
||||
|
||||
public interface IBasicVideoMuteWithFeedback : IBasicVideoMute
|
||||
{
|
||||
BoolFeedback VideoMuteIsOn { get; }
|
||||
|
||||
void VideoMuteOn();
|
||||
void VideoMuteOff();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,10 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
@@ -37,9 +40,21 @@ namespace PepperDash.Essentials.Core
|
||||
return;
|
||||
}
|
||||
LoadDriver(irDriverFilepath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
}
|
||||
|
||||
public IrOutputPortController(string key, Func<DeviceConfig, IROutputPort> postActivationFunc,
|
||||
DeviceConfig config)
|
||||
: base(key)
|
||||
{
|
||||
AddPostActivationAction(() =>
|
||||
{
|
||||
IrPort = postActivationFunc(config);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Loads the IR driver at path
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
@@ -118,7 +133,6 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
Debug.Console(2, this, "Device {0}: IR Driver {1} does not contain command {2}",
|
||||
Key, IrPort.IRDriverFileNameByIRDriverId(IrPortUid), command);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,8 +13,9 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public class BasicIrDisplay : DisplayBase, IBasicVolumeControls, IBridgeAdvanced
|
||||
{
|
||||
[Description("Wrapper class for a Basic IR Display")]
|
||||
public class BasicIrDisplay : DisplayBase, IBasicVolumeControls, IBridgeAdvanced
|
||||
{
|
||||
public IrOutputPortController IrPort { get; private set; }
|
||||
public ushort IrPulseTime { get; set; }
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.Gateways;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
[Description("Wrapper class for Crestron Infinet-EX Gateways")]
|
||||
public class CenRfgwController : CrestronGenericBaseDevice
|
||||
{
|
||||
private GatewayBase _Gateway;
|
||||
public GatewayBase GateWay { get { return _Gateway; } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the on-board gateway
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
public CenRfgwController(string key, string name, GatewayBase gateway) :
|
||||
base(key, name, gateway)
|
||||
{
|
||||
_Gateway = gateway;
|
||||
}
|
||||
|
||||
public static CenRfgwController GetNewExGatewayController(string key, string name, ushort ipId, ushort cresnetId, string gatewayType)
|
||||
{
|
||||
eExGatewayType type = (eExGatewayType)Enum.Parse(typeof(eExGatewayType), gatewayType, true);
|
||||
try
|
||||
{
|
||||
var cs = Global.ControlSystem;
|
||||
|
||||
GatewayBase gw = null;
|
||||
switch (type)
|
||||
{
|
||||
case eExGatewayType.Ethernet:
|
||||
gw = new CenRfgwEx(ipId, cs);
|
||||
break;
|
||||
case eExGatewayType.EthernetShared:
|
||||
gw = new CenRfgwExEthernetSharable(ipId, cs);
|
||||
break;
|
||||
case eExGatewayType.Cresnet:
|
||||
gw = new CenRfgwExCresnet(cresnetId, cs);
|
||||
break;
|
||||
}
|
||||
return new CenRfgwController(key, name, gw);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Debug.Console(0, "ERROR: Cannot create EX Gateway, id {0}, type {1}", type == eExGatewayType.Cresnet ? cresnetId : ipId, gatewayType);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static CenRfgwController GetNewErGatewayController(string key, string name, ushort ipId, ushort cresnetId, string gatewayType)
|
||||
{
|
||||
eExGatewayType type = (eExGatewayType)Enum.Parse(typeof(eExGatewayType), gatewayType, true);
|
||||
try
|
||||
{
|
||||
var cs = Global.ControlSystem;
|
||||
|
||||
GatewayBase gw = null;
|
||||
switch (type)
|
||||
{
|
||||
case eExGatewayType.Ethernet:
|
||||
gw = new CenErfgwPoe(ipId, cs);
|
||||
break;
|
||||
case eExGatewayType.EthernetShared:
|
||||
gw = new CenErfgwPoeEthernetSharable(ipId, cs);
|
||||
break;
|
||||
case eExGatewayType.Cresnet:
|
||||
gw = new CenErfgwPoeCresnet(cresnetId, cs);
|
||||
break;
|
||||
}
|
||||
return new CenRfgwController(key, name, gw);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Debug.Console(0, "ERROR: Cannot create ER Gateway, id {0}, type {1}", type== eExGatewayType.Cresnet ? cresnetId : ipId, gatewayType);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public enum eExGatewayType
|
||||
{
|
||||
Ethernet, EthernetShared, Cresnet
|
||||
}
|
||||
|
||||
|
||||
#region Factory
|
||||
public class CenRfgwControllerFactory : EssentialsDeviceFactory<CenRfgwController>
|
||||
{
|
||||
public CenRfgwControllerFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "cenrfgwex", "cenerfgwpoe" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
|
||||
Debug.Console(1, "Factory Attempting to create new CEN-GWEXER Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<EssentialsRfGatewayConfig>(dc.Properties.ToString());
|
||||
|
||||
var type = dc.Type.ToLower();
|
||||
var control = props.Control;
|
||||
var ipid = control.IpIdInt;
|
||||
var cresnetId = control.CresnetIdInt;
|
||||
var gatewayType = props.GatewayType;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case ("cenrfgwex"):
|
||||
return CenRfgwController.GetNewExGatewayController(dc.Key, dc.Name,
|
||||
(ushort)ipid, (ushort)cresnetId, gatewayType);
|
||||
case ("cenerfgwpoe"):
|
||||
return CenRfgwController.GetNewErGatewayController(dc.Key, dc.Name,
|
||||
(ushort)ipid, (ushort)cresnetId, gatewayType);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public class EssentialsRfGatewayConfig
|
||||
{
|
||||
[JsonProperty("control")]
|
||||
public EssentialsControlPropertiesConfig Control { get; set; }
|
||||
|
||||
[JsonProperty("gatewayType")]
|
||||
public string GatewayType { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,8 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public static class Global
|
||||
{
|
||||
public static CrestronControlSystem ControlSystem { get; set; }
|
||||
|
||||
public static CrestronControlSystem ControlSystem { get; set; }
|
||||
|
||||
public static LicenseManager LicenseManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
|
||||
using PepperDash.Core;
|
||||
@@ -345,8 +346,10 @@ namespace PepperDash.Essentials.Core
|
||||
/// <summary>
|
||||
/// Metadata describing the join
|
||||
/// </summary>
|
||||
public class JoinMetadata
|
||||
{
|
||||
public class JoinMetadata
|
||||
{
|
||||
private string _description;
|
||||
|
||||
/// <summary>
|
||||
/// Join number (based on join offset value)
|
||||
/// </summary>
|
||||
@@ -361,10 +364,17 @@ namespace PepperDash.Essentials.Core
|
||||
public uint JoinSpan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A label for the join to better describe it's usage
|
||||
/// A label for the join to better describe its usage
|
||||
/// </summary>
|
||||
[JsonProperty("label")]
|
||||
public string Label { get; set; }
|
||||
[Obsolete("Use Description instead")]
|
||||
[JsonProperty("label")]
|
||||
public string Label { get { return _description; } set { _description = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// A description for the join to better describe its usage
|
||||
/// </summary>
|
||||
[JsonProperty("description")]
|
||||
public string Description { get { return _description; } set { _description = value; } }
|
||||
/// <summary>
|
||||
/// Signal type(s)
|
||||
/// </summary>
|
||||
@@ -454,11 +464,13 @@ namespace PepperDash.Essentials.Core
|
||||
name = attribute.Name;
|
||||
Debug.Console(2, "JoinName Attribute value: {0}", name);
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[AttributeUsage(AttributeTargets.All)]
|
||||
public class JoinNameAttribute : Attribute
|
||||
public class JoinNameAttribute : CAttribute
|
||||
{
|
||||
private string _Name;
|
||||
|
||||
@@ -472,5 +484,5 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
get { return _Name; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Fusion.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Crestron.SimplSharpPro.Gateways, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.Gateways.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Crestron.SimplSharpPro.GeneralIO, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1099c178b3b54c3b, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\..\..\..\ProgramData\Crestron\SDK\SSPDevices\Crestron.SimplSharpPro.GeneralIO.dll</HintPath>
|
||||
@@ -129,15 +133,23 @@
|
||||
<Compile Include="Bridges\JoinMaps\GenericLightingJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\GenericRelayControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\HdMdNxM4kEControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\HdMdxxxCEControllerJoinMap.cs" />
|
||||
<Compile Include="Bridges\JoinMaps\Hrxxx0WirelessRemoteControllerJoinMap.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\GenericComm.cs" />
|
||||
<Compile Include="Config\Comm and IR\GenericHttpClient.cs" />
|
||||
<Compile Include="Comm and IR\CecPortController.cs" />
|
||||
<Compile Include="Comm and IR\CommFactory.cs" />
|
||||
<Compile Include="Comm and IR\CommunicationExtras.cs" />
|
||||
<Compile Include="Comm and IR\ComPortController.cs" />
|
||||
<Compile Include="Comm and IR\ComSpecJsonConverter.cs" />
|
||||
<Compile Include="Comm and IR\ConsoleCommMockDevice.cs" />
|
||||
<Compile Include="Comm and IR\GenericComm.cs" />
|
||||
<Compile Include="Comm and IR\GenericHttpClient.cs" />
|
||||
<Compile Include="Comm and IR\IRPortHelper.cs" />
|
||||
<Compile Include="Config\Essentials\ConfigUpdater.cs" />
|
||||
<Compile Include="Config\Essentials\ConfigReader.cs" />
|
||||
<Compile Include="Config\Essentials\ConfigWriter.cs" />
|
||||
@@ -158,6 +170,7 @@
|
||||
<Compile Include="Devices\DeviceFeedbackExtensions.cs" />
|
||||
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
|
||||
<Compile Include="Devices\EssentialsDevice.cs" />
|
||||
<Compile Include="Devices\IProjectorInterfaces.cs" />
|
||||
<Compile Include="Devices\PC\InRoomPc.cs" />
|
||||
<Compile Include="Devices\PC\Laptop.cs" />
|
||||
<Compile Include="Devices\ReconfigurableDevice.cs" />
|
||||
@@ -175,6 +188,8 @@
|
||||
<Compile Include="Fusion\FusionEventHandlers.cs" />
|
||||
<Compile Include="Fusion\FusionProcessorQueries.cs" />
|
||||
<Compile Include="Fusion\FusionRviDataClasses.cs" />
|
||||
<Compile Include="Gateways\CenRfgwController.cs" />
|
||||
<Compile Include="Gateways\EssentialsRfGatewayConfig.cs" />
|
||||
<Compile Include="Global\JobTimer.cs" />
|
||||
<Compile Include="Global\Scheduler.cs" />
|
||||
<Compile Include="JoinMaps\JoinMapBase.cs" />
|
||||
@@ -187,11 +202,6 @@
|
||||
<Compile Include="Presets\PresetBase.cs" />
|
||||
<Compile Include="Plugins\IPluginDeviceFactory.cs" />
|
||||
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
||||
<Compile Include="Config\Comm and IR\CommFactory.cs" />
|
||||
<Compile Include="Config\Comm and IR\CommunicationExtras.cs" />
|
||||
<Compile Include="Config\Comm and IR\ComSpecJsonConverter.cs" />
|
||||
<Compile Include="Config\Comm and IR\ConsoleCommMockDevice.cs" />
|
||||
<Compile Include="Config\Comm and IR\IRPortHelper.cs" />
|
||||
<Compile Include="Config\BasicConfig.cs" />
|
||||
<Compile Include="Config\ConfigPropertiesHelpers.cs" />
|
||||
<Compile Include="Config\InfoConfig.cs" />
|
||||
@@ -220,6 +230,9 @@
|
||||
<Compile Include="Feedbacks\BoolFeedbackOneShot.cs" />
|
||||
<Compile Include="Ramps and Increments\NumericalHelpers.cs" />
|
||||
<Compile Include="Ramps and Increments\UshortSigIncrementer.cs" />
|
||||
<Compile Include="Remotes\ButtonExtensions.cs" />
|
||||
<Compile Include="Remotes\CrestronRemotePropertiesConfig.cs" />
|
||||
<Compile Include="Remotes\Hrxx0WirelessRemoteController.cs" />
|
||||
<Compile Include="Room\Behaviours\RoomOnToDefaultSourceWhenOccupied.cs" />
|
||||
<Compile Include="Room\EssentialsRoomBase.cs" />
|
||||
<Compile Include="Room\Interfaces.cs" />
|
||||
@@ -275,7 +288,6 @@
|
||||
<Compile Include="UI PageManagers\PageManager.cs" />
|
||||
<Compile Include="UI PageManagers\SetTopBoxTwoPanelPageManager.cs" />
|
||||
<Compile Include="VideoStatus\VideoStatusOutputs.cs" />
|
||||
<Compile Include="Config\Comm and IR\ComPortController.cs" />
|
||||
<Compile Include="Crestron\CrestronGenericBaseDevice.cs" />
|
||||
<Compile Include="DeviceControlsParentInterfaces\IPresentationSource.cs" />
|
||||
<Compile Include="Devices\DeviceManager.cs" />
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public static class ButtonExtensions
|
||||
{
|
||||
public static Button SetButtonAction(this Button button, Action<bool> a)
|
||||
{
|
||||
button.UserObject = a;
|
||||
return button;
|
||||
}
|
||||
|
||||
public static Button SetButtonAction(this CrestronCollection<Button> bc, uint sigNum, Action<bool> a)
|
||||
{
|
||||
return bc[sigNum].SetButtonAction(a);
|
||||
}
|
||||
|
||||
public static bool GetBool(this CrestronCollection<Button> bc, uint sigNum)
|
||||
{
|
||||
return bc[sigNum].State == eButtonState.Pressed ? true : false;
|
||||
}
|
||||
|
||||
public static Button SetButtonPressedAction(this CrestronCollection<Button> bc, uint sigNum, Action a)
|
||||
{
|
||||
return bc[sigNum].SetButtonAction(b => { if (b) a(); });
|
||||
}
|
||||
|
||||
public static Button SetButtonReleasedAction(this CrestronCollection<Button> bc, uint sigNum, Action a)
|
||||
{
|
||||
return bc[sigNum].SetButtonAction(b => { if (!b) a(); });
|
||||
}
|
||||
|
||||
public static Button SetButtonFalseAction(this Button button, Action a)
|
||||
{
|
||||
return button.SetButtonAction(b => { if (!b) a(); });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public class CrestronRemotePropertiesConfig
|
||||
{
|
||||
[JsonProperty("control")]
|
||||
public EssentialsControlPropertiesConfig Control { get; set; }
|
||||
|
||||
[JsonProperty("gatewayDeviceKey")]
|
||||
public string GatewayDeviceKey { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.Gateways;
|
||||
using Crestron.SimplSharpPro.Remotes;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
[Description("Wrapper class for all HR-Series remotes")]
|
||||
public class Hrxx0WirelessRemoteController : EssentialsBridgeableDevice, IHasFeedback
|
||||
{
|
||||
private Hr1x0WirelessRemoteBase _remote;
|
||||
|
||||
public FeedbackCollection<Feedback> Feedbacks { get; set; }
|
||||
|
||||
public CrestronCollection<Button> Buttons { get { return _remote.Button; } }
|
||||
|
||||
public Hrxx0WirelessRemoteController(string key, Func<DeviceConfig, Hr1x0WirelessRemoteBase> preActivationFunc,
|
||||
DeviceConfig config)
|
||||
: base(key, config.Name)
|
||||
{
|
||||
Feedbacks = new FeedbackCollection<Feedback>();
|
||||
|
||||
AddPreActivationAction(() =>
|
||||
{
|
||||
_remote = preActivationFunc(config);
|
||||
|
||||
_remote.ButtonStateChange += new ButtonEventHandler(_remote_ButtonStateChange);
|
||||
|
||||
Feedbacks.Add(new BoolFeedback("BatteryCritical", () => _remote.BatteryCriticalFeedback.BoolValue));
|
||||
Feedbacks.Add(new BoolFeedback("BatteryLow", () => _remote.BatteryLowFeedback.BoolValue));
|
||||
Feedbacks.Add(new IntFeedback("BatteryVoltage", () => _remote.BatteryVoltageFeedback.UShortValue));
|
||||
|
||||
_remote.BaseEvent += new BaseEventHandler(_remote_BaseEvent);
|
||||
});
|
||||
}
|
||||
|
||||
void _remote_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
if(args.EventId == Hr1x0EventIds.BatteryCriticalFeedbackEventId)
|
||||
Feedbacks["BatteryCritical"].FireUpdate();
|
||||
if(args.EventId == Hr1x0EventIds.BatteryLowFeedbackEventId)
|
||||
Feedbacks["BatteryLow"].FireUpdate();
|
||||
if(args.EventId == Hr1x0EventIds.BatteryVoltageFeedbackEventId)
|
||||
Feedbacks["BatteryVoltage"].FireUpdate();
|
||||
}
|
||||
|
||||
void _remote_ButtonStateChange(GenericBase device, ButtonEventArgs args)
|
||||
{
|
||||
try
|
||||
{
|
||||
var handler = args.Button.UserObject;
|
||||
|
||||
if (handler == null) return;
|
||||
|
||||
Debug.Console(1, this, "Executing Action: {0}", handler.ToString());
|
||||
|
||||
if (handler is Action<bool>)
|
||||
{
|
||||
(handler as Action<bool>)(args.Button.State == eButtonState.Pressed ? true : false);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(2, this, "Error in ButtonStateChange handler: {0}", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region Preactivation
|
||||
|
||||
private static Hr1x0WirelessRemoteBase GetHr1x0WirelessRemote(DeviceConfig config)
|
||||
{
|
||||
var props = JsonConvert.DeserializeObject<CrestronRemotePropertiesConfig>(config.Properties.ToString());
|
||||
|
||||
var type = config.Type;
|
||||
var rfId = (uint)props.Control.InfinetIdInt;
|
||||
|
||||
GatewayBase gateway;
|
||||
|
||||
if (props.GatewayDeviceKey == "processor")
|
||||
{
|
||||
gateway = Global.ControlSystem.ControllerRFGatewayDevice;
|
||||
}
|
||||
else
|
||||
{
|
||||
var gatewayDev = DeviceManager.GetDeviceForKey(props.GatewayDeviceKey) as CenRfgwController;
|
||||
if (gatewayDev == null)
|
||||
{
|
||||
Debug.Console(0, "GetHr1x0WirelessRemote: Device '{0}' is not a valid device", props.GatewayDeviceKey);
|
||||
return null;
|
||||
}
|
||||
Debug.Console(0, "GetHr1x0WirelessRemote: Device '{0}' is a valid device", props.GatewayDeviceKey);
|
||||
gateway = gatewayDev.GateWay;
|
||||
}
|
||||
|
||||
if (gateway == null)
|
||||
{
|
||||
Debug.Console(0, "GetHr1x0WirelessRemote: Device '{0}' is not a valid gateway", props.GatewayDeviceKey);
|
||||
return null;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case ("hr100"):
|
||||
return new Hr100(rfId, gateway);
|
||||
case ("hr150"):
|
||||
return new Hr150(rfId, gateway);
|
||||
case ("hr310"):
|
||||
return new Hr310(rfId, gateway);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
static void gateway_BaseEvent(GenericBase device, BaseEventArgs args)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Factory
|
||||
public class Hrxx0WirelessRemoteControllerFactory : EssentialsDeviceFactory<Hrxx0WirelessRemoteController>
|
||||
{
|
||||
public Hrxx0WirelessRemoteControllerFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "hr100", "hr150", "hr310" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new HR-x00 Remote Device");
|
||||
|
||||
return new Hrxx0WirelessRemoteController(dc.Key, GetHr1x0WirelessRemote, dc);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new Hrxxx0WirelessRemoteControllerJoinMap(joinStart);
|
||||
|
||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||
|
||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||
joinMap = JsonConvert.DeserializeObject<Hrxxx0WirelessRemoteControllerJoinMap>(joinMapSerialized);
|
||||
|
||||
bridge.AddJoinMap(Key, joinMap);
|
||||
|
||||
//List<string> ExcludedKeys = new List<string>();
|
||||
foreach (var feedback in Feedbacks)
|
||||
{
|
||||
var myFeedback = feedback;
|
||||
|
||||
var joinData =
|
||||
joinMap.Joins.FirstOrDefault(
|
||||
x =>
|
||||
x.Key.Equals(myFeedback.Key, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
if (string.IsNullOrEmpty((joinData.Key))) continue;
|
||||
|
||||
var name = joinData.Key;
|
||||
var join = joinData.Value;
|
||||
|
||||
if (join.Metadata.JoinType == eJoinType.Digital)
|
||||
{
|
||||
Debug.Console(0, this, "Linking Bool Feedback '{0}' to join {1}", name, join.JoinNumber);
|
||||
var someFeedback = myFeedback as BoolFeedback;
|
||||
if(someFeedback == null) continue;
|
||||
someFeedback.LinkInputSig(trilist.BooleanInput[join.JoinNumber]);
|
||||
}
|
||||
if (join.Metadata.JoinType == eJoinType.Analog)
|
||||
{
|
||||
Debug.Console(0, this, "Linking Analog Feedback '{0}' to join {1}", name, join.JoinNumber);
|
||||
var someFeedback = myFeedback as IntFeedback;
|
||||
if (someFeedback == null) continue;
|
||||
someFeedback.LinkInputSig(trilist.UShortInput[join.JoinNumber]);
|
||||
}
|
||||
if (join.Metadata.JoinType == eJoinType.Serial)
|
||||
{
|
||||
Debug.Console(0, this, "Linking Serial Feedback '{0}' to join {1}", name, join.JoinNumber);
|
||||
var someFeedback = myFeedback as StringFeedback;
|
||||
if (someFeedback == null) continue;
|
||||
someFeedback.LinkInputSig(trilist.StringInput[join.JoinNumber]);
|
||||
}
|
||||
}
|
||||
|
||||
//var newJoinKeys = joinMap.Joins.Keys.Except(ExcludedKeys).ToList();
|
||||
|
||||
//var newJoinMap = newJoinKeys.Where(k => joinMap.Joins.ContainsKey(k)).Select(k => joinMap.Joins[k]);
|
||||
|
||||
|
||||
Debug.Console(2, this, "There are {0} remote buttons", _remote.Button.Count);
|
||||
for (uint i = 1; i <= _remote.Button.Count; i++)
|
||||
{
|
||||
Debug.Console(2, this, "Attempting to link join index {0}", i);
|
||||
var index = i;
|
||||
var joinData =
|
||||
joinMap.Joins.FirstOrDefault(
|
||||
o =>
|
||||
o.Key.Equals(_remote.Button[index].Name.ToString(),
|
||||
StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
if (string.IsNullOrEmpty((joinData.Key))) continue;
|
||||
|
||||
var join = joinData.Value;
|
||||
var name = joinData.Key;
|
||||
|
||||
Debug.Console(2, this, "Setting User Object for '{0}'", name);
|
||||
if (join.Metadata.JoinType == eJoinType.Digital)
|
||||
{
|
||||
_remote.Button[i].SetButtonAction((b) => trilist.BooleanInput[join.JoinNumber].BoolValue = b);
|
||||
}
|
||||
}
|
||||
|
||||
trilist.OnlineStatusChange += (d, args) =>
|
||||
{
|
||||
if (!args.DeviceOnLine) return;
|
||||
|
||||
foreach (var feedback in Feedbacks)
|
||||
{
|
||||
feedback.FireUpdate();
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
public void SetTrilistBool(BasicTriList trilist, uint join, bool b)
|
||||
{
|
||||
trilist.BooleanInput[join].BoolValue = b;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,24 +80,26 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public interface IRouting : IRoutingInputsOutputs
|
||||
{
|
||||
//void ClearRoute(object outputSelector);
|
||||
void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType);
|
||||
}
|
||||
|
||||
public interface ITxRouting : IRouting
|
||||
}
|
||||
|
||||
public interface IRoutingNumeric : IRouting
|
||||
{
|
||||
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
|
||||
}
|
||||
|
||||
public interface ITxRouting : IRoutingNumeric
|
||||
{
|
||||
IntFeedback VideoSourceNumericFeedback { get; }
|
||||
IntFeedback AudioSourceNumericFeedback { get; }
|
||||
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines a receiver that has internal routing (DM-RMC-4K-Z-SCALER-C)
|
||||
/// </summary>
|
||||
public interface IRmcRouting : IRouting
|
||||
public interface IRmcRouting : IRoutingNumeric
|
||||
{
|
||||
IntFeedback AudioVideoSourceNumericFeedback { get; }
|
||||
void ExecuteNumericSwitch(ushort input, ushort output, eRoutingSignalType type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,6 +16,7 @@ using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM.AirMedia
|
||||
{
|
||||
[Description("Wrapper class for an AM-200 or AM-300")]
|
||||
public class AirMediaController : CrestronGenericBridgeableBaseDevice, IRoutingInputsOutputs, IIROutputPorts, IComPorts
|
||||
{
|
||||
public AmX00 AirMedia { get; private set; }
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace PepperDash.Essentials.DM {
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingInputsOutputs, IRouting, IHasFeedback {
|
||||
public class DmBladeChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumeric
|
||||
{
|
||||
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
||||
|
||||
public Switch Chassis { get; private set; }
|
||||
@@ -563,14 +564,23 @@ namespace PepperDash.Essentials.DM {
|
||||
var outCard = input == 0 ? null : Chassis.Outputs[output];
|
||||
|
||||
// NOTE THAT BITWISE COMPARISONS - TO CATCH ALL ROUTING TYPES
|
||||
if ((sigType | eRoutingSignalType.Video) == eRoutingSignalType.Video) {
|
||||
Chassis.VideoEnter.BoolValue = true;
|
||||
Chassis.Outputs[output].VideoOut = inCard;
|
||||
}
|
||||
if ((sigType | eRoutingSignalType.Video) != eRoutingSignalType.Video) return;
|
||||
Chassis.VideoEnter.BoolValue = true;
|
||||
Chassis.Outputs[output].VideoOut = inCard;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRoutingNumeric Members
|
||||
|
||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
||||
{
|
||||
ExecuteSwitch(inputSelector, outputSelector, sigType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new DmBladeChassisControllerJoinMap(joinStart);
|
||||
@@ -808,6 +818,7 @@ namespace PepperDash.Essentials.DM {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace PepperDash.Essentials.DM
|
||||
///
|
||||
/// </summary>
|
||||
[Description("Wrapper class for all DM-MD chassis variants from 8x8 to 32x32")]
|
||||
public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingInputsOutputs, IRouting, IHasFeedback
|
||||
public class DmChassisController : CrestronGenericBridgeableBaseDevice, IDmSwitch, IRoutingNumeric
|
||||
{
|
||||
public DMChassisPropertiesConfig PropertiesConfig { get; set; }
|
||||
|
||||
@@ -1094,6 +1094,15 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IRoutingNumeric Members
|
||||
|
||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
||||
{
|
||||
ExecuteSwitch(inputSelector, outputSelector, sigType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new DmChassisControllerJoinMap(joinStart);
|
||||
|
||||
@@ -18,8 +18,8 @@ using PepperDash.Essentials.DM.Config;
|
||||
using Feedback = PepperDash.Essentials.Core.Feedback;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
public class DmpsRoutingController : EssentialsBridgeableDevice, IRouting, IHasFeedback
|
||||
{
|
||||
public class DmpsRoutingController : EssentialsBridgeableDevice, IRoutingNumeric, IHasFeedback
|
||||
{
|
||||
public CrestronControlSystem Dmps { get; set; }
|
||||
public ISystemControl SystemControl { get; private set; }
|
||||
@@ -661,8 +661,6 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
}
|
||||
}
|
||||
///
|
||||
/// </summary>
|
||||
void Dmps_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||
{
|
||||
Debug.Console(2, this, "DMOutputChange Output: {0} EventId: {1}", args.Number, args.EventId.ToString());
|
||||
@@ -724,10 +722,7 @@ namespace PepperDash.Essentials.DM
|
||||
{
|
||||
if (RouteOffTimers.ContainsKey(pnt))
|
||||
return;
|
||||
RouteOffTimers[pnt] = new CTimer(o =>
|
||||
{
|
||||
ExecuteSwitch(0, pnt.Number, pnt.Type);
|
||||
}, RouteOffTime);
|
||||
RouteOffTimers[pnt] = new CTimer(o => ExecuteSwitch(0, pnt.Number, pnt.Type), RouteOffTime);
|
||||
}
|
||||
|
||||
#region IRouting Members
|
||||
@@ -809,6 +804,15 @@ namespace PepperDash.Essentials.DM
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region IRoutingNumeric Members
|
||||
|
||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType sigType)
|
||||
{
|
||||
ExecuteSwitch(inputSelector, outputSelector, sigType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM.Chassis
|
||||
{
|
||||
[Description("Wrapper class for all HdMdNxM4E switchers")]
|
||||
public class HdMdNxM4kEBridgeableController : CrestronGenericBridgeableBaseDevice, IRoutingInputsOutputs, IRoutingNumeric, IHasFeedback
|
||||
{
|
||||
private HdMdNxM _Chassis;
|
||||
private HdMd4x14kE _Chassis4x1;
|
||||
|
||||
public Dictionary<uint, string> InputNames { get; set; }
|
||||
public Dictionary<uint, string> OutputNames { get; set; }
|
||||
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
public FeedbackCollection<BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
|
||||
public FeedbackCollection<IntFeedback> VideoOutputRouteFeedbacks { get; private set; }
|
||||
public FeedbackCollection<StringFeedback> InputNameFeedbacks { get; private set; }
|
||||
public FeedbackCollection<StringFeedback> OutputNameFeedbacks { get; private set; }
|
||||
public FeedbackCollection<StringFeedback> OutputRouteNameFeedbacks { get; private set; }
|
||||
public FeedbackCollection<BoolFeedback> InputHdcpEnableFeedback { get; private set; }
|
||||
public FeedbackCollection<StringFeedback> DeviceNameFeedback { get; private set; }
|
||||
public FeedbackCollection<BoolFeedback> AutoRouteFeedback { get; private set; }
|
||||
|
||||
#region Constructor
|
||||
|
||||
public HdMdNxM4kEBridgeableController(string key, string name, HdMdNxM chassis,
|
||||
HdMdNxM4kEBridgeablePropertiesConfig props)
|
||||
: base(key, name, chassis)
|
||||
{
|
||||
_Chassis = chassis;
|
||||
var _props = props;
|
||||
|
||||
InputNames = props.Inputs;
|
||||
OutputNames = props.Outputs;
|
||||
|
||||
VideoInputSyncFeedbacks = new FeedbackCollection<BoolFeedback>();
|
||||
VideoOutputRouteFeedbacks = new FeedbackCollection<IntFeedback>();
|
||||
InputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||
OutputNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||
OutputRouteNameFeedbacks = new FeedbackCollection<StringFeedback>();
|
||||
InputHdcpEnableFeedback = new FeedbackCollection<BoolFeedback>();
|
||||
DeviceNameFeedback = new FeedbackCollection<StringFeedback>();
|
||||
AutoRouteFeedback = new FeedbackCollection<BoolFeedback>();
|
||||
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||
|
||||
DeviceNameFeedback.Add(new StringFeedback(this.Name, () => this.Name));
|
||||
|
||||
if (_Chassis.NumberOfInputs == 1)
|
||||
{
|
||||
_Chassis4x1 = _Chassis as HdMd4x14kE;
|
||||
AutoRouteFeedback.Add(new BoolFeedback(this.Name + "-" + InputNames[1], () => _Chassis4x1.AutoModeOnFeedback.BoolValue));
|
||||
}
|
||||
|
||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||
{
|
||||
var inputName = InputNames[i];
|
||||
_Chassis.Inputs[i].Name.StringValue = inputName;
|
||||
|
||||
InputPorts.Add(new RoutingInputPort(inputName, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, i, this));
|
||||
VideoInputSyncFeedbacks.Add(new BoolFeedback(inputName, () => _Chassis.Inputs[i].VideoDetectedFeedback.BoolValue));
|
||||
InputNameFeedbacks.Add(new StringFeedback(inputName, () => _Chassis.Inputs[i].Name.StringValue));
|
||||
InputHdcpEnableFeedback.Add(new BoolFeedback(inputName, () => _Chassis.HdmiInputs[i].HdmiInputPort.HdcpSupportOnFeedback.BoolValue));
|
||||
}
|
||||
|
||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||
{
|
||||
var outputName = OutputNames[i];
|
||||
_Chassis.Outputs[i].Name.StringValue = outputName;
|
||||
|
||||
OutputPorts.Add(new RoutingOutputPort(outputName, eRoutingSignalType.AudioVideo,
|
||||
eRoutingPortConnectionType.Hdmi, i, this));
|
||||
VideoOutputRouteFeedbacks.Add(new IntFeedback(outputName, () => (int)_Chassis.Outputs[i].VideoOutFeedback.Number));
|
||||
OutputNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[i].Name.StringValue));
|
||||
OutputRouteNameFeedbacks.Add(new StringFeedback(outputName, () => _Chassis.Outputs[i].VideoOutFeedback.NameFeedback.StringValue));
|
||||
}
|
||||
|
||||
_Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
|
||||
_Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
|
||||
|
||||
AddPostActivationAction(AddFeedbackCollections);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public void EnableHdcp(uint port)
|
||||
{
|
||||
if (port > _Chassis.NumberOfInputs) return;
|
||||
if (port <= 0) return;
|
||||
|
||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOn();
|
||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||
}
|
||||
|
||||
public void DisableHdcp(uint port)
|
||||
{
|
||||
if (port > _Chassis.NumberOfInputs) return;
|
||||
if (port <= 0) return;
|
||||
|
||||
_Chassis.HdmiInputs[port].HdmiInputPort.HdcpSupportOff();
|
||||
InputHdcpEnableFeedback[InputNames[port]].FireUpdate();
|
||||
}
|
||||
|
||||
public void EnableAutoRoute()
|
||||
{
|
||||
if (_Chassis.NumberOfInputs != 1) return;
|
||||
|
||||
if (_Chassis4x1 == null) return;
|
||||
|
||||
_Chassis4x1.AutoModeOn();
|
||||
}
|
||||
|
||||
public void DisableAutoRoute()
|
||||
{
|
||||
if (_Chassis.NumberOfInputs != 1) return;
|
||||
|
||||
if (_Chassis4x1 == null) return;
|
||||
|
||||
_Chassis4x1.AutoModeOff();
|
||||
}
|
||||
|
||||
#region PostActivate
|
||||
|
||||
public void AddFeedbackCollections()
|
||||
{
|
||||
AddCollectionsToList(VideoInputSyncFeedbacks, InputHdcpEnableFeedback);
|
||||
AddCollectionsToList(VideoOutputRouteFeedbacks);
|
||||
AddCollectionsToList(InputNameFeedbacks, OutputNameFeedbacks, OutputRouteNameFeedbacks, DeviceNameFeedback);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region FeedbackCollection Methods
|
||||
|
||||
//Add arrays of collections
|
||||
public void AddCollectionsToList(params FeedbackCollection<BoolFeedback>[] newFbs)
|
||||
{
|
||||
foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs)
|
||||
{
|
||||
foreach (var item in newFbs)
|
||||
{
|
||||
AddCollectionToList(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs)
|
||||
{
|
||||
foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs)
|
||||
{
|
||||
foreach (var item in newFbs)
|
||||
{
|
||||
AddCollectionToList(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs)
|
||||
{
|
||||
foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs)
|
||||
{
|
||||
foreach (var item in newFbs)
|
||||
{
|
||||
AddCollectionToList(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Add Collections
|
||||
public void AddCollectionToList(FeedbackCollection<BoolFeedback> newFbs)
|
||||
{
|
||||
foreach (var f in newFbs)
|
||||
{
|
||||
if (f == null) continue;
|
||||
|
||||
AddFeedbackToList(f);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddCollectionToList(FeedbackCollection<IntFeedback> newFbs)
|
||||
{
|
||||
foreach (var f in newFbs)
|
||||
{
|
||||
if (f == null) continue;
|
||||
|
||||
AddFeedbackToList(f);
|
||||
}
|
||||
}
|
||||
|
||||
public void AddCollectionToList(FeedbackCollection<StringFeedback> newFbs)
|
||||
{
|
||||
foreach (var f in newFbs)
|
||||
{
|
||||
if (f == null) continue;
|
||||
|
||||
AddFeedbackToList(f);
|
||||
}
|
||||
}
|
||||
|
||||
//Add Individual Feedbacks
|
||||
public void AddFeedbackToList(PepperDash.Essentials.Core.Feedback newFb)
|
||||
{
|
||||
if (newFb == null) return;
|
||||
|
||||
if (!Feedbacks.Contains(newFb))
|
||||
{
|
||||
Feedbacks.Add(newFb);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRouting Members
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
||||
var current = _Chassis.HdmiOutputs[(uint)outputSelector].VideoOut;
|
||||
if (current != _Chassis.HdmiInputs[(uint)inputSelector])
|
||||
_Chassis.HdmiOutputs[(uint)outputSelector].VideoOut = _Chassis.HdmiInputs[(uint)inputSelector];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRoutingNumeric Members
|
||||
|
||||
public void ExecuteNumericSwitch(ushort inputSelector, ushort outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
ExecuteSwitch(inputSelector, outputSelector, signalType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bridge Linking
|
||||
|
||||
public override void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge)
|
||||
{
|
||||
var joinMap = new HdMdNxM4kEControllerJoinMap(joinStart);
|
||||
|
||||
var joinMapSerialized = JoinMapHelper.GetSerializedJoinMapForDevice(joinMapKey);
|
||||
|
||||
if (!string.IsNullOrEmpty(joinMapSerialized))
|
||||
joinMap = JsonConvert.DeserializeObject<HdMdNxM4kEControllerJoinMap>(joinMapSerialized);
|
||||
|
||||
bridge.AddJoinMap(Key, joinMap);
|
||||
|
||||
IsOnline.LinkInputSig(trilist.BooleanInput[joinMap.IsOnline.JoinNumber]);
|
||||
DeviceNameFeedback[this.Name].LinkInputSig(trilist.StringInput[joinMap.Name.JoinNumber]);
|
||||
|
||||
if (_Chassis4x1 != null)
|
||||
{
|
||||
AutoRouteFeedback[this.Name + "-" + InputNames[1]].LinkInputSig(trilist.BooleanInput[joinMap.EnableAutoRoute.JoinNumber]);
|
||||
AutoRouteFeedback[this.Name + "-" + InputNames[1]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableAutoRoute.JoinNumber]);
|
||||
}
|
||||
|
||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||
{
|
||||
var joinIndex = i - 1;
|
||||
//Digital
|
||||
VideoInputSyncFeedbacks[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.InputSync.JoinNumber + joinIndex]);
|
||||
InputHdcpEnableFeedback[InputNames[i]].LinkInputSig(trilist.BooleanInput[joinMap.EnableInputHdcp.JoinNumber + joinIndex]);
|
||||
InputHdcpEnableFeedback[InputNames[i]].LinkComplementInputSig(trilist.BooleanInput[joinMap.DisableInputHdcp.JoinNumber + joinIndex]);
|
||||
trilist.SetSigTrueAction(joinMap.EnableInputHdcp.JoinNumber + joinIndex, () => EnableHdcp(i));
|
||||
trilist.SetSigTrueAction(joinMap.DisableInputHdcp.JoinNumber + joinIndex, () => DisableHdcp(i));
|
||||
|
||||
//Serial
|
||||
InputNameFeedbacks[InputNames[i]].LinkInputSig(trilist.StringInput[joinMap.InputName.JoinNumber + joinIndex]);
|
||||
}
|
||||
|
||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||
{
|
||||
var joinIndex = i - 1;
|
||||
//Analog
|
||||
VideoOutputRouteFeedbacks[OutputNames[i]].LinkInputSig(trilist.UShortInput[joinMap.OutputRoute.JoinNumber + joinIndex]);
|
||||
trilist.SetUShortSigAction(joinMap.OutputRoute.JoinNumber + joinIndex, (a) => ExecuteSwitch(a, i, eRoutingSignalType.AudioVideo));
|
||||
|
||||
//Serial
|
||||
OutputNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputName.JoinNumber + joinIndex]);
|
||||
OutputRouteNameFeedbacks[OutputNames[i]].LinkInputSig(trilist.StringInput[joinMap.OutputRoutedName.JoinNumber + joinIndex]);
|
||||
}
|
||||
|
||||
_Chassis.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler(Chassis_OnlineStatusChange);
|
||||
|
||||
trilist.OnlineStatusChange += new Crestron.SimplSharpPro.OnlineStatusChangeEventHandler((d, args) =>
|
||||
{
|
||||
if (args.DeviceOnLine)
|
||||
{
|
||||
foreach (var feedback in Feedbacks)
|
||||
{
|
||||
feedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
|
||||
void Chassis_OnlineStatusChange(Crestron.SimplSharpPro.GenericBase currentDevice, Crestron.SimplSharpPro.OnlineOfflineEventArgs args)
|
||||
{
|
||||
if (args.DeviceOnLine)
|
||||
{
|
||||
for (uint i = 1; i <= _Chassis.NumberOfInputs; i++)
|
||||
{
|
||||
_Chassis.Inputs[i].Name.StringValue = InputNames[i];
|
||||
}
|
||||
for (uint i = 1; i <= _Chassis.NumberOfOutputs; i++)
|
||||
{
|
||||
_Chassis.Outputs[i].Name.StringValue = OutputNames[i];
|
||||
}
|
||||
|
||||
foreach (var feedback in Feedbacks)
|
||||
{
|
||||
feedback.FireUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
|
||||
{
|
||||
if (args.EventId == DMOutputEventIds.VideoOutEventId)
|
||||
{
|
||||
foreach (var item in VideoOutputRouteFeedbacks)
|
||||
{
|
||||
item.FireUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Chassis_DMInputChange(Switch device, DMInputEventArgs args)
|
||||
{
|
||||
if (args.EventId == DMInputEventIds.VideoDetectedEventId)
|
||||
{
|
||||
foreach (var item in VideoInputSyncFeedbacks)
|
||||
{
|
||||
item.FireUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Factory
|
||||
|
||||
public class HdMdNxM4kEControllerFactory : EssentialsDeviceFactory<HdMdNxM4kEBridgeableController>
|
||||
{
|
||||
public HdMdNxM4kEControllerFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "hdmd4x14ke-bridgeable", "hdmd4x24ke", "hdmd6x24ke" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new HD-MD-NxM-4K-E Device");
|
||||
|
||||
var props = JsonConvert.DeserializeObject<HdMdNxM4kEBridgeablePropertiesConfig>(dc.Properties.ToString());
|
||||
|
||||
var type = dc.Type.ToLower();
|
||||
var control = props.Control;
|
||||
var ipid = control.IpIdInt;
|
||||
var address = control.TcpSshProperties.Address;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case ("hdmd4x14ke-bridgeable"):
|
||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x14kE(ipid, address, Global.ControlSystem), props);
|
||||
case ("hdmd4x24ke"):
|
||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd4x24kE(ipid, address, Global.ControlSystem), props);
|
||||
case ("hdmd6x24ke"):
|
||||
return new HdMdNxM4kEBridgeableController(dc.Key, dc.Name, new HdMd6x24kE(ipid, address, Global.ControlSystem), props);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,125 +1,128 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM.Chassis
|
||||
{
|
||||
public class HdMdNxM4kEController : Device, IRoutingInputsOutputs, IRouting
|
||||
{
|
||||
public HdMdNxM Chassis { get; private set; }
|
||||
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="chassis"></param>
|
||||
public HdMdNxM4kEController(string key, string name, HdMdNxM chassis,
|
||||
HdMdNxM4kEPropertiesConfig props)
|
||||
: base(key, name)
|
||||
{
|
||||
Chassis = chassis;
|
||||
|
||||
// logical ports
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
for (uint i = 1; i <= 4; i++)
|
||||
{
|
||||
InputPorts.Add(new RoutingInputPort("hdmiIn" + i, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, i, this));
|
||||
}
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||
OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this));
|
||||
|
||||
// physical settings
|
||||
if (props != null && props.Inputs != null)
|
||||
{
|
||||
foreach (var kvp in props.Inputs)
|
||||
{
|
||||
// strip "hdmiIn"
|
||||
var inputNum = Convert.ToUInt32(kvp.Key.Substring(6));
|
||||
|
||||
var port = chassis.HdmiInputs[inputNum].HdmiInputPort;
|
||||
// set hdcp disables
|
||||
if (kvp.Value.DisableHdcp)
|
||||
{
|
||||
Debug.Console(0, this, "Configuration disables HDCP support on {0}", kvp.Key);
|
||||
port.HdcpSupportOff();
|
||||
}
|
||||
else
|
||||
port.HdcpSupportOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
var result = Chassis.Register();
|
||||
if (result != Crestron.SimplSharpPro.eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(0, this, "Device registration failed: {0}", result);
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region IRouting Members
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
||||
var current = Chassis.HdmiOutputs[1].VideoOut;
|
||||
if(current != Chassis.HdmiInputs[(uint)inputSelector])
|
||||
Chassis.HdmiOutputs[1].VideoOut = Chassis.HdmiInputs[(uint)inputSelector];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="properties"></param>
|
||||
/// <returns></returns>
|
||||
public static HdMdNxM4kEController GetController(string key, string name,
|
||||
string type, HdMdNxM4kEPropertiesConfig properties)
|
||||
{
|
||||
try
|
||||
{
|
||||
var ipid = properties.Control.IpIdInt;
|
||||
var address = properties.Control.TcpSshProperties.Address;
|
||||
|
||||
type = type.ToLower();
|
||||
if (type == "hdmd4x14ke")
|
||||
{
|
||||
var chassis = new HdMd4x14kE(ipid, address, Global.ControlSystem);
|
||||
return new HdMdNxM4kEController(key, name, chassis, properties);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, "ERROR Creating device key {0}: \r{1}", key, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro.DM;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM.Chassis
|
||||
{
|
||||
public class HdMdNxM4kEController : Device, IRoutingInputsOutputs, IRouting
|
||||
{
|
||||
public HdMdNxM Chassis { get; private set; }
|
||||
|
||||
public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
|
||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="chassis"></param>
|
||||
public HdMdNxM4kEController(string key, string name, HdMdNxM chassis,
|
||||
HdMdNxM4kEPropertiesConfig props)
|
||||
: base(key, name)
|
||||
{
|
||||
Chassis = chassis;
|
||||
|
||||
// logical ports
|
||||
InputPorts = new RoutingPortCollection<RoutingInputPort>();
|
||||
for (uint i = 1; i <= 4; i++)
|
||||
{
|
||||
InputPorts.Add(new RoutingInputPort("hdmiIn" + i, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, i, this));
|
||||
}
|
||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
|
||||
OutputPorts.Add(new RoutingOutputPort(DmPortName.HdmiOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||
eRoutingPortConnectionType.Hdmi, null, this));
|
||||
|
||||
// physical settings
|
||||
if (props != null && props.Inputs != null)
|
||||
{
|
||||
foreach (var kvp in props.Inputs)
|
||||
{
|
||||
// strip "hdmiIn"
|
||||
var inputNum = Convert.ToUInt32(kvp.Key.Substring(6));
|
||||
|
||||
var port = chassis.HdmiInputs[inputNum].HdmiInputPort;
|
||||
// set hdcp disables
|
||||
if (kvp.Value.DisableHdcp)
|
||||
{
|
||||
Debug.Console(0, this, "Configuration disables HDCP support on {0}", kvp.Key);
|
||||
port.HdcpSupportOff();
|
||||
}
|
||||
else
|
||||
port.HdcpSupportOn();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
var result = Chassis.Register();
|
||||
if (result != Crestron.SimplSharpPro.eDeviceRegistrationUnRegistrationResponse.Success)
|
||||
{
|
||||
Debug.Console(0, this, "Device registration failed: {0}", result);
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.CustomActivate();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region IRouting Members
|
||||
|
||||
public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType signalType)
|
||||
{
|
||||
// Try to make switch only when necessary. The unit appears to toggle when already selected.
|
||||
var current = Chassis.HdmiOutputs[1].VideoOut;
|
||||
if (current != Chassis.HdmiInputs[(uint)inputSelector])
|
||||
Chassis.HdmiOutputs[1].VideoOut = Chassis.HdmiInputs[(uint)inputSelector];
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="properties"></param>
|
||||
/// <returns></returns>
|
||||
public static HdMdNxM4kEController GetController(string key, string name,
|
||||
string type, HdMdNxM4kEPropertiesConfig properties)
|
||||
{
|
||||
try
|
||||
{
|
||||
var ipid = properties.Control.IpIdInt;
|
||||
var address = properties.Control.TcpSshProperties.Address;
|
||||
|
||||
type = type.ToLower();
|
||||
if (type == "hdmd4x14ke")
|
||||
{
|
||||
Debug.Console(0, @"The 'hdmd4x14ke' device is not an Essentials Bridgeable device.
|
||||
If an essentials Bridgeable Device is required, use the 'hdmd4x14ke-bridgeable' type");
|
||||
|
||||
var chassis = new HdMd4x14kE(ipid, address, Global.ControlSystem);
|
||||
return new HdMdNxM4kEController(key, name, chassis, properties);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Console(0, "ERROR Creating device key {0}: \r{1}", key, e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,16 +8,28 @@ using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.DM.Config
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the properties section of HdMdNxM boxes
|
||||
/// </summary>
|
||||
public class HdMdNxM4kEPropertiesConfig
|
||||
{
|
||||
[JsonProperty("control")]
|
||||
public ControlPropertiesConfig Control { get; set; }
|
||||
|
||||
[JsonProperty("inputs")]
|
||||
public Dictionary<string, InputPropertiesConfig> Inputs { get; set; }
|
||||
}
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the properties section of HdMdNxM boxes
|
||||
/// </summary>
|
||||
public class HdMdNxM4kEPropertiesConfig
|
||||
{
|
||||
[JsonProperty("control")]
|
||||
public ControlPropertiesConfig Control { get; set; }
|
||||
|
||||
[JsonProperty("inputs")]
|
||||
public Dictionary<string, InputPropertiesConfig> Inputs { get; set; }
|
||||
}
|
||||
|
||||
public class HdMdNxM4kEBridgeablePropertiesConfig
|
||||
{
|
||||
[JsonProperty("control")]
|
||||
public ControlPropertiesConfig Control { get; set; }
|
||||
|
||||
[JsonProperty("inputs")]
|
||||
public Dictionary<uint, string> Inputs { get; set; }
|
||||
|
||||
[JsonProperty("outputs")]
|
||||
public Dictionary<uint, string> Outputs { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.DM.Config
|
||||
{
|
||||
public class InputPropertiesConfig
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public bool DisableHdcp { get; set; }
|
||||
}
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
|
||||
namespace PepperDash.Essentials.DM.Config
|
||||
{
|
||||
public class InputPropertiesConfig
|
||||
{
|
||||
public string Name { get; set; }
|
||||
|
||||
public bool DisableHdcp { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,7 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
||||
{
|
||||
/// <summary>
|
||||
/// Wrapper class for DGE-100 and DM-DGE-200-C
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DGE-100")]
|
||||
public class Dge100Controller : CrestronGenericBaseDevice, IComPorts, IIROutputPorts, IHasBasicTriListWithSmartObject, ICec
|
||||
{
|
||||
private readonly Dge100 _dge;
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace PepperDash.Essentials.DM.Endpoints.DGEs
|
||||
/// <summary>
|
||||
/// Wrapper class for DGE-100 and DM-DGE-200-C
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DM-DGE-200-C")]
|
||||
public class DmDge200CController : Dge100Controller, IRoutingInputsOutputs
|
||||
{
|
||||
private readonly DmDge200C _dge;
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-100-S")]
|
||||
public class DmRmc100SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-150-S")]
|
||||
public class DmRmc150SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -12,8 +12,9 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
public class DmRmc200CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-200-C")]
|
||||
public class DmRmc200CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
private readonly DmRmc200C _rmc;
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-200-S2")]
|
||||
public class DmRmc200S2Controller : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -12,8 +12,9 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
public class DmRmc200SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-200-S")]
|
||||
public class DmRmc200SController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
private readonly DmRmc200S _rmc;
|
||||
|
||||
@@ -12,8 +12,9 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C")]
|
||||
public class DmRmc4kScalerCController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||
{
|
||||
private readonly DmRmc4kScalerC _rmc;
|
||||
|
||||
@@ -6,7 +6,9 @@ using PepperDash.Essentials.Core;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
{
|
||||
|
||||
[Description("Wrapper Class for DM-RMC-4K-100-C-1G")]
|
||||
public class DmRmc4k100C1GController : DmHdBaseTControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-4K-SCALER-C-DSP")]
|
||||
public class DmRmc4kScalerCDspController : DmRmcControllerBase, IRoutingInputsOutputs, IBasicVolumeWithFeedback,
|
||||
IIROutputPorts, IComPorts, ICec, IRelayPorts
|
||||
{
|
||||
|
||||
@@ -7,7 +7,8 @@ using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
{
|
||||
[Description("Wrapper Class for DM-RMC-4K-Z-100-C")]
|
||||
public class DmRmc4kZ100CController : DmRmcX100CController
|
||||
{
|
||||
private readonly DmRmc4kz100C _rmc;
|
||||
|
||||
@@ -11,6 +11,7 @@ using PepperDash.Core;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
[Description("Wrapper Class for DM-RMC-4K-Z-SCALER-C")]
|
||||
public class DmRmc4kZScalerCController : DmRmcControllerBase, IRmcRouting,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -12,8 +12,9 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
public class DmRmcScalerCController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-SCALER-C")]
|
||||
public class DmRmcScalerCController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
private readonly DmRmcScalerC _rmc;
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-SCALER-S2")]
|
||||
public class DmRmcScalerS2Controller : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-SCALER-S")]
|
||||
public class DmRmcScalerSController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -11,8 +11,9 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Builds a controller for basic DM-RMCs (both 4K and non-4K) with Com and IR ports and no control functions
|
||||
///
|
||||
/// </summary>
|
||||
public class DmRmcX100CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
/// </summary>
|
||||
[Description("Wrapper Class for DM-RMC-4K-100-C & DM-RMC-100-C")]
|
||||
public class DmRmcX100CController : DmRmcControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
private readonly DmRmc100C _rmc;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DM-TX-200-C Endpoint")]
|
||||
[Description("Wrapper class for DM-TX-200-C")]
|
||||
public class DmTx200Controller : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx200C2G Tx { get; private set; }
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DM-TX-201-C Endpoint")]
|
||||
[Description("Wrapper class for DM-TX-201-C")]
|
||||
public class DmTx201CController : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx201C Tx { get; private set; }
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Controller class for all DM-TX-201S/F transmitters
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DM-TX-201-S/F Endpoint")]
|
||||
[Description("Wrapper class for DM-TX-201-S/F")]
|
||||
public class DmTx201SController : DmTxControllerBase, ITxRouting, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx201S Tx { get; private set; }
|
||||
|
||||
@@ -17,8 +17,9 @@ using PepperDash.Essentials.DM.Config;
|
||||
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = DmTx401C.eSourceSelection;
|
||||
|
||||
using eVst = DmTx401C.eSourceSelection;
|
||||
|
||||
[Description("Wrapper class for DM-TX-401-C")]
|
||||
public class DmTx401CController : DmTxControllerBase, ITxRouting, IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
public DmTx401C Tx { get; private set; }
|
||||
|
||||
@@ -9,8 +9,9 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = eX02VideoSourceType;
|
||||
using eAst = eX02AudioSourceType;
|
||||
|
||||
using eAst = eX02AudioSourceType;
|
||||
|
||||
[Description("Wrapper class for DM-TX-4K-100-C-1G")]
|
||||
public class DmTx4k100Controller : DmTxControllerBase, IRoutingInputsOutputs,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -18,8 +18,9 @@ using PepperDash.Essentials.DM.Config;
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
|
||||
[Description("Wrapper class for DM-TX-4K-202-C")]
|
||||
public class DmTx4k202CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
||||
IIROutputPorts, IComPorts
|
||||
{
|
||||
|
||||
@@ -18,8 +18,9 @@ using PepperDash.Essentials.DM.Config;
|
||||
namespace PepperDash.Essentials.DM
|
||||
{
|
||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
|
||||
[Description("Wrapper class for DM-TX-4K-302-C")]
|
||||
public class DmTx4k302CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
||||
IIROutputPorts, IComPorts, IHasFreeRun, IVgaBrightnessContrastControls
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace PepperDash.Essentials.DM
|
||||
/// <summary>
|
||||
/// Controller class for all DM-TX-201C/S/F transmitters
|
||||
/// </summary>
|
||||
[Description("Wrapper class for DM-TX-4K-Z-100-C")]
|
||||
public class DmTx4kz100Controller : DmTxControllerBase, IRoutingInputsOutputs, IHasFeedback,
|
||||
IIROutputPorts, IComPorts, ICec
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace PepperDash.Essentials.DM
|
||||
using eVst = Crestron.SimplSharpPro.DeviceSupport.eX02VideoSourceType;
|
||||
using eAst = Crestron.SimplSharpPro.DeviceSupport.eX02AudioSourceType;
|
||||
|
||||
[Description("Wrapper class for DM-TX-4K-Z-302-C")]
|
||||
public class DmTx4kz302CController : DmTxControllerBase, ITxRouting, IHasFeedback,
|
||||
IIROutputPorts, IComPorts
|
||||
{
|
||||
|
||||
@@ -28,16 +28,16 @@ namespace PepperDash.Essentials.DM
|
||||
/// <param name="props"></param>
|
||||
/// <returns></returns>
|
||||
public static DmTxControllerBase GetDmTxController(string key, string name, string typeName, DmTxPropertiesConfig props)
|
||||
{
|
||||
// switch on type name... later...
|
||||
{
|
||||
// switch on type name... later...
|
||||
|
||||
typeName = typeName.ToLower();
|
||||
//uint ipid = Convert.ToUInt16(props.Id, 16);
|
||||
var ipid = props.Control.IpIdInt;
|
||||
var pKey = props.ParentDeviceKey.ToLower();
|
||||
typeName = typeName.ToLower();
|
||||
//uint ipid = Convert.ToUInt16(props.Id, 16);
|
||||
var ipid = props.Control.IpIdInt;
|
||||
var pKey = props.ParentDeviceKey.ToLower();
|
||||
|
||||
if (pKey == "processor")
|
||||
{
|
||||
if (pKey == "processor")
|
||||
{
|
||||
// Catch constructor failures, mainly dues to IPID
|
||||
try
|
||||
{
|
||||
|
||||
@@ -99,7 +99,9 @@
|
||||
<Compile Include="Chassis\DmpsAudioOutputController.cs" />
|
||||
<Compile Include="Chassis\DmpsInternalVirtualDmTxController.cs" />
|
||||
<Compile Include="Chassis\DmpsRoutingController.cs" />
|
||||
<Compile Include="Chassis\HdMdNxM4kEBridgeableController.cs" />
|
||||
<Compile Include="Chassis\HdMdNxM4kEController.cs" />
|
||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||
<Compile Include="Endpoints\DGEs\DmDge200CController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4kZ100CController.cs" />
|
||||
<Compile Include="Endpoints\Receivers\DmRmc4kZScalerCController.cs" />
|
||||
@@ -112,7 +114,6 @@
|
||||
<Compile Include="Config\DmTxConfig.cs" />
|
||||
<Compile Include="Config\DMChassisConfig.cs" />
|
||||
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
|
||||
<Compile Include="Config\InputPropertiesConfig.cs" />
|
||||
<Compile Include="DmPortName.cs" />
|
||||
<Compile Include="Endpoints\DGEs\Dge100Controller.cs" />
|
||||
<Compile Include="Endpoints\DGEs\DgePropertiesConfig.cs" />
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.Gateways;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
public class CenRfgwController : CrestronGenericBaseDevice
|
||||
{
|
||||
public GatewayBase Gateway { get { return Hardware as GatewayBase; } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor for the on-board gateway
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <param name="name"></param>
|
||||
public CenRfgwController(string key, string name, GatewayBase gateway) :
|
||||
base(key, name, gateway)
|
||||
{
|
||||
}
|
||||
|
||||
public static CenRfgwController GetNewExGatewayController(string key, string name, string id, string gatewayType)
|
||||
{
|
||||
uint uid;
|
||||
eExGatewayType type;
|
||||
try
|
||||
{
|
||||
uid = Convert.ToUInt32(id, 16);
|
||||
type = (eExGatewayType)Enum.Parse(typeof(eExGatewayType), gatewayType, true);
|
||||
var cs = Global.ControlSystem;
|
||||
|
||||
GatewayBase gw = null;
|
||||
switch (type)
|
||||
{
|
||||
case eExGatewayType.Ethernet:
|
||||
gw = new CenRfgwEx(uid, cs);
|
||||
break;
|
||||
case eExGatewayType.EthernetShared:
|
||||
gw = new CenRfgwExEthernetSharable(uid, cs);
|
||||
break;
|
||||
case eExGatewayType.Cresnet:
|
||||
gw = new CenRfgwExCresnet(uid, cs);
|
||||
break;
|
||||
}
|
||||
return new CenRfgwController(key, name, gw);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Debug.Console(0, "ERROR: Cannot create EX Gateway, id {0}, type {1}", id, gatewayType);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public static CenRfgwController GetNewErGatewayController(string key, string name, string id, string gatewayType)
|
||||
{
|
||||
uint uid;
|
||||
eExGatewayType type;
|
||||
try
|
||||
{
|
||||
uid = Convert.ToUInt32(id, 16);
|
||||
type = (eExGatewayType)Enum.Parse(typeof(eExGatewayType), gatewayType, true);
|
||||
var cs = Global.ControlSystem;
|
||||
|
||||
GatewayBase gw = null;
|
||||
switch (type)
|
||||
{
|
||||
case eExGatewayType.Ethernet:
|
||||
gw = new CenErfgwPoe(uid, cs);
|
||||
break;
|
||||
case eExGatewayType.EthernetShared:
|
||||
gw = new CenErfgwPoeEthernetSharable(uid, cs);
|
||||
break;
|
||||
case eExGatewayType.Cresnet:
|
||||
gw = new CenErfgwPoeCresnet(uid, cs);
|
||||
break;
|
||||
}
|
||||
return new CenRfgwController(key, name, gw);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Debug.Console(0, "ERROR: Cannot create EX Gateway, id {0}, type {1}", id, gatewayType);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the actual Crestron EX gateway for a given key. "processor" or the key of
|
||||
/// a CenRfgwExController in DeviceManager
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns>Either processor GW or Gateway property of CenRfgwExController</returns>
|
||||
public static GatewayBase GetExGatewayBaseForKey(string key)
|
||||
{
|
||||
key = key.ToLower();
|
||||
if (key == "processor" && Global.ControlSystem.SupportsInternalRFGateway)
|
||||
return Global.ControlSystem.ControllerRFGatewayDevice;
|
||||
var gwCont = DeviceManager.GetDeviceForKey(key) as CenRfgwController;
|
||||
if (gwCont != null)
|
||||
return gwCont.Gateway;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public enum eExGatewayType
|
||||
{
|
||||
Ethernet, EthernetShared, Cresnet
|
||||
}
|
||||
|
||||
public class CenRfgwControllerFactory : EssentialsDeviceFactory<CenRfgwController>
|
||||
{
|
||||
public CenRfgwControllerFactory()
|
||||
{
|
||||
TypeNames = new List<string>() { "cenrfgwex", "cenerfgwpoe" };
|
||||
}
|
||||
|
||||
public override EssentialsDevice BuildDevice(DeviceConfig dc)
|
||||
{
|
||||
Debug.Console(1, "Factory Attempting to create new CEN-GWEXER Device");
|
||||
return CenRfgwController.GetNewExGatewayController(dc.Key, dc.Name,
|
||||
dc.Properties.Value<string>("id"), dc.Properties.Value<string>("gatewayType"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,6 +12,6 @@ namespace PepperDash.Essentials.Devices.Displays
|
||||
public interface IInputHdmi4 { void InputHdmi4(); }
|
||||
public interface IInputDisplayPort1 { void InputDisplayPort1(); }
|
||||
public interface IInputDisplayPort2 { void InputDisplayPort2(); }
|
||||
public interface IInputVga1 { void InputVga1(); }
|
||||
|
||||
public interface IInputVga1 { void InputVga1(); }
|
||||
|
||||
}
|
||||
@@ -132,7 +132,6 @@
|
||||
<Compile Include="Codec\iHasDialer.cs" />
|
||||
<Compile Include="Codec\iHasDirectory.cs" />
|
||||
<Compile Include="Codec\iHasScheduleAwareness.cs" />
|
||||
<Compile Include="Crestron\Gateways\CenRfgwController.cs" />
|
||||
<Compile Include="Display\ComTcpDisplayBase.cs" />
|
||||
<Compile Include="Display\AvocorVTFDisplay.cs" />
|
||||
<Compile Include="Display\InputInterfaces.cs" />
|
||||
|
||||
@@ -13,6 +13,7 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Occupancy
|
||||
{
|
||||
[Description("Wrapper class for CEN-ODT-C-POE")]
|
||||
public class CenOdtOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
||||
{
|
||||
public CenOdtCPoe OccSensor { get; private set; }
|
||||
|
||||
@@ -13,6 +13,7 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Occupancy
|
||||
{
|
||||
[Description("Wrapper class for Single Technology GLS Occupancy Sensors")]
|
||||
public class GlsOccupancySensorBaseController : CrestronGenericBridgeableBaseDevice, IOccupancyStatusProvider
|
||||
{
|
||||
public GlsOccupancySensorBase OccSensor { get; private set; }
|
||||
|
||||
@@ -13,6 +13,7 @@ using PepperDash.Essentials.Core.Bridges;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common.Occupancy
|
||||
{
|
||||
[Description("Wrapper class for Dual Technology GLS Occupancy Sensors")]
|
||||
public class GlsOdtOccupancySensorController : GlsOccupancySensorBaseController
|
||||
{
|
||||
public new GlsOdtCCn OccSensor { get; private set; }
|
||||
|
||||
@@ -15,7 +15,8 @@ using PepperDash.Essentials.Core.Routing;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
public class IRSetTopBoxBase : EssentialsBridgeableDevice, ISetTopBoxControls, IRoutingOutputs, IUsageTracking, IPower
|
||||
[Description("Wrapper class for an IR Set Top Box")]
|
||||
public class IRSetTopBoxBase : EssentialsBridgeableDevice, ISetTopBoxControls, IRoutingOutputs, IUsageTracking, IPower
|
||||
{
|
||||
public IrOutputPortController IrPort { get; private set; }
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ using PepperDash.Essentials.Core.Routing;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
[Description("Wrapper class for an IR-Controlled AppleTV")]
|
||||
public class AppleTV : EssentialsBridgeableDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
|
||||
{
|
||||
|
||||
public IrOutputPortController IrPort { get; private set; }
|
||||
public const string StandardDriverName = "Apple AppleTV-v2.ir";
|
||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeAppleTv; } }
|
||||
|
||||
@@ -12,7 +12,8 @@ using PepperDash.Essentials.Core.Config;
|
||||
using PepperDash.Essentials.Core.Routing;
|
||||
|
||||
namespace PepperDash.Essentials.Devices.Common
|
||||
{
|
||||
{
|
||||
[Description("Wrapper class for an IR-Controlled Roku")]
|
||||
public class Roku2 : EssentialsDevice, IDPad, ITransport, IUiDisplayInfo, IRoutingOutputs
|
||||
{
|
||||
[Api]
|
||||
|
||||
Reference in New Issue
Block a user