Compare commits

...

32 Commits

Author SHA1 Message Date
Neil Dorin
4f35a4285b Moves example configs inside PepperDashEssentials folder and makes them embedded resources 2020-02-13 16:17:23 -07:00
Neil Dorin
a799973e52 Adds example config for EssentialsHuddleSpaceRoom type 2020-02-12 23:43:09 -07:00
Neil Dorin
6a9a793bc5 Adds example config file for EssentialsHuddleVtc1Room type 2020-02-12 23:26:59 -07:00
hvolmer
7835ed12bb Merge pull request #10 from PepperDash/hotfix/ndorin-cleanout-unused-classes
Hotfix/ndorin cleanout unused classes
2020-02-12 16:47:32 -07:00
Neil Dorin
9a2c001a93 Cleans out classes moved to plugins (Evertz). Adds example configs, removes old #warning statements. 2020-02-12 10:27:27 -07:00
Neil Dorin
7e406dd987 Merge pull request #4 from PepperDash/hvolmer-docs-images
Added more drawings
2020-02-11 17:26:38 -07:00
hvolmer
1fdad20abd Added more drawings 2020-02-11 17:23:42 -07:00
Neil Dorin
704bcc974b Adds initial example configs and Plugin Load Sequence diagram 2020-02-11 15:49:35 -07:00
Neil Dorin
f3e460677d Merge pull request #3 from PepperDash/hvolmer-docs-images
More images
2020-02-11 12:13:26 -07:00
hvolmer
f52ee9ab5d More images 2020-02-11 12:08:10 -07:00
Neil Dorin
2822952491 Merge pull request #2 from PepperDash/hvolmer-docs-images
Add files via upload
2020-02-11 11:26:12 -07:00
hvolmer
0d47cce442 Add files via upload 2020-02-11 11:25:15 -07:00
Neil Dorin
615dde41c2 Updated Readme.md
Added copywright and license section
2020-02-07 12:08:59 -07:00
Neil Dorin
ee2a619aa5 Update Readme.md
Adds Dependencies section
2020-02-07 11:47:43 -07:00
Neil Dorin
af5699a0b0 Merge pull request #1 from PepperDash/maintenance/add-mit-license
Maintenance/add mit license
2020-02-05 15:50:59 -07:00
Neil Dorin
a0db8532b6 Updates LICENSE.md 2020-02-05 15:32:51 -07:00
Neil Dorin
d1fb97ec7a Adds MIT License 2020-02-05 15:30:03 -07:00
Neil Dorin
d18f79ac48 Removes complete Configuration ORIGINAL folder and all classes (obsolete) 2020-02-05 15:24:00 -07:00
Neil Dorin
2072f0bff8 Updates Submodule URL to GitHub repo 2020-02-05 13:32:15 -07:00
Neil Dorin
f479418492 Update README.md 2020-02-05 10:56:55 -07:00
Neil Dorin
07bc288fd0 Added link to Wiki in Readme 2020-02-05 09:49:48 -07:00
Neil Dorin
62ca5f6f07 Merged in feature/ecs-1251 (pull request #45)
Feature/ecs 1251

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2020-01-31 21:38:31 +00:00
Neil Dorin
f7aaf7a576 Plugin version dependency logic tested and working correctly. 2020-01-31 14:33:14 -07:00
Neil Dorin
59590e5463 Adds updated README. 2020-01-31 14:32:50 -07:00
Neil Dorin
f000097a03 Major repo cleanout. Removes all files marked as REMOVE or MOVED and removes Cues and all assciated referenced. 2020-01-30 14:38:00 -07:00
Neil Dorin
22c769ab98 Updates to plugin dependency check logic 2020-01-29 16:11:01 -07:00
Neil Dorin
6377b1bc78 Adds Global methods to check version dependencies of plugins 2020-01-29 15:58:43 -07:00
Neil Dorin
2b3921ce8a Updates to latest PD.Core 1.0.31 relase 2020-01-29 15:56:14 -07:00
Neil Dorin
00e3e6af35 Merged in bugfix/ecs-1246 (pull request #44)
ECS-1246 - Resolves issue where device factory was pulling CresnetIdInt instead of IpIdInt from config when trying to build CEN-IO-DIGIN-104

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2020-01-23 19:43:19 +00:00
Neil Dorin
61f24321c3 ECS-1246 - Resolves issue where device factory was pulling CresnetIdInt instead of IpIdInt from config when trying to build CEN-IO-DIGIN-104 2020-01-23 12:41:47 -07:00
Neil Dorin
36cd356bc5 Merged in feature/ecs-1242 (pull request #43)
Feature/ecs 1242

Approved-by: Neil Dorin <ndorin@pepperdash.com>
2020-01-23 18:06:48 +00:00
Neil Dorin
b72f55228a Adds some debug statements to help with NoRouteText property on DmChassisController config 2020-01-23 10:53:41 -07:00
111 changed files with 1482 additions and 6508 deletions

2
.gitmodules vendored
View File

@@ -1,3 +1,3 @@
[submodule "essentials-framework/pepperdashcore-builds"]
path = essentials-framework/pepperdashcore-builds
url = https://bitbucket.org/Pepperdash_Products/pepperdashcore-builds.git
url = https://github.com/ndorin/PepperDashCore-Builds.git

7
LICENSE.md Normal file
View File

@@ -0,0 +1,7 @@
Copyright (c) <2020> PepperDash Technology Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,72 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials
{
//public class TPConfig : DeviceConfig
//{
// new public TPConfigProperties Properties { get; set; }
//}
//public class TPConfigProperties
//{
// /*
// "properties": {
// "ipId": "aa",
// "defaultSystemKey": "system1",
// "sgdPath": "\\NVRAM\\Program1\\Sgds\\PepperDash Essentials TSW1050_v0.9.sgd",
// "usesSplashPage": true,
// "showDate": true,
// "showTime": false
// }
// */
// public uint IpId { get; set; }
// public string deafultSystemKey { get; set; }
// public string SgdPath { get; set; }
// public bool UsesSplashPage { get; set; }
// public bool ShowDate { get; set; }
// public bool ShowTime { get; set; }
//}
///// <summary>
///// The gist of this converter: The comspec JSON comes in with normal values that need to be converted
///// into enum names. This converter takes the value and applies the appropriate enum's name prefix to the value
///// and then returns the enum value using Enum.Parse
///// </summary>
//public class TPPropertiesConverter : JsonConverter
//{
// public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
// {
// return JObject.Load(reader);
// }
// /// <summary>
// /// This will be hit with every value in the ComPortConfig class. We only need to
// /// do custom conversion on the comspec items.
// /// </summary>
// public override bool CanConvert(Type objectType)
// {
// return true;
// }
// public override bool CanRead { get { return true; } }
// public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
// {
// throw new NotImplementedException();
// }
//}
}

View File

@@ -1,82 +0,0 @@
using System.Linq;
using Newtonsoft.Json;
using PepperDash.Essentials.Core;
using PepperDash.Core;
namespace PepperDash.Essentials
{
public class ConfigTieLine
{
[JsonProperty(Required=Required.Always)]
public string SourceDeviceKey { get; set; }
[JsonProperty(Required = Required.Always)]
public string SourcePortKey { get; set; }
[JsonProperty(Required = Required.Always)]
public string DestinationDeviceKey { get; set; }
[JsonProperty(Required = Required.Always)]
public string DestinationPortKey { get; set; }
public override string ToString()
{
return string.Format("Tie line: [{0}]{1} --> [{2}]{3}", SourceDeviceKey, SourcePortKey, DestinationDeviceKey, DestinationPortKey);
}
/// <summary>
/// Returns a tie line if one can be constructed between the two devices and ports
/// </summary>
/// <returns>TieLine or null if devices or ports don't exist</returns>
public TieLine GetTieLine()
{
var sourceDevice = (IRoutingOutputs)DeviceManager.GetDeviceForKey(SourceDeviceKey);
var destinationDevice = (IRoutingInputs)DeviceManager.GetDeviceForKey(DestinationDeviceKey);
if (sourceDevice == null)
{
Debug.Console(0, " Cannot create TieLine. Source device '{0}' not found or does not have outputs",
SourceDeviceKey);
return null;
}
else if (destinationDevice == null)
{
Debug.Console(0, " Cannot create TieLine. Destination device '{0}' not found or does not have inputs",
DestinationDeviceKey);
return null;
}
else
{
// Get the ports by key name from the lists
RoutingOutputPort sourcePort = sourceDevice.OutputPorts.FirstOrDefault(
p => p.Key.Equals(SourcePortKey, System.StringComparison.OrdinalIgnoreCase));
//RoutingOutputPort sourcePort = null;
//sourceDevice.OutputPorts.TryGetValue(SourcePortKey, out sourcePort);
if (sourcePort == null)
{
Debug.Console(0, " Cannot create TieLine {0}-->{1}. Source device does not have output port '{2}'",
sourceDevice.Key, destinationDevice.Key, SourcePortKey);
return null;
}
RoutingInputPort destinationPort = destinationDevice.InputPorts.FirstOrDefault(
p => p.Key.Equals(DestinationPortKey, System.StringComparison.OrdinalIgnoreCase));
//RoutingInputPort destinationPort = null;
//destinationDevice.InputPorts.TryGetValue(DestinationPortKey, out destinationPort);
if (destinationPort == null)
{
Debug.Console(0, " Cannot create TieLine {0}-->{1}. Destination device does not have input port '{2}'",
sourceDevice.Key, destinationDevice.Key, DestinationPortKey);
return null;
}
var tl = new TieLine(sourcePort, destinationPort);
Debug.Console(1, " Created {0}", this);
return tl;
}
}
}
}

View File

@@ -1,287 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.CrestronThread;
using Crestron.SimplSharpPro.Diagnostics;
using Crestron.SimplSharpPro.EthernetCommunication;
using Crestron.SimplSharpPro.UI;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices;
//using PepperDash.Essentials.Core.Devices.Dm;
//using PepperDash.Essentials.Fusion;
using PepperDash.Core;
namespace PepperDash.Essentials
{
public static class Configuration
{
public static string LastPath { get; private set; }
public static CrestronControlSystem ControlSystem { get; private set; }
public static void Initialize(CrestronControlSystem cs)
{
CrestronConsole.AddNewConsoleCommand(ReloadFromConsole, "configreload", "Reloads configuration file",
ConsoleAccessLevelEnum.AccessOperator);
ControlSystem = cs;
}
public static bool ReadConfiguration(string filePath)
{
try
{
// Read file
if (File.Exists(filePath))
{
LastPath = filePath;
string json = File.ReadToEnd(filePath, System.Text.Encoding.ASCII);
JObject jo = JObject.Parse(json);
var info = JsonConvert.DeserializeObject<ConfigInfo>(jo["info"].ToString());
Debug.Console(0, "\r[Config] file read:");
Debug.Console(0, " File: {0}", filePath);
Debug.Console(0, " Name: {0}", info.Name);
Debug.Console(0, " Type: {0}", info.SystemTemplateType);
Debug.Console(0, " Date: {0}", info.EditDate);
Debug.Console(0, " ConfigVersion: {0}", info.Version);
Debug.Console(0, " EditedBy: {0}", info.EditedBy);
Debug.Console(0, " Comment: {0}\r", info.Comment);
// Get the main config object
var jConfig = jo["configuration"];
// Devices
var jDevices = (JArray)jConfig["devices"];
CreateDevices(jDevices);
// TieLines
var jRouting = jConfig["routing"];
CreateRouting(jRouting);
/// Parse the available source list(s)
var jSourceLists = (JArray)jConfig["sourceLists"];
var jSourceListJson = jSourceLists.ToString();
List<ConfigSourceList> sourceLists = JsonConvert.DeserializeObject<List<ConfigSourceList>>(jSourceListJson);
// System
var jSystems = (JArray)jConfig["systems"];
CreateSystems(jSystems, sourceLists);
// Activate everything
DeviceManager.ActivateAll();
}
else
{
Debug.Console(0, "[Config] file not found '{0}'", filePath);
return false;
}
}
catch (Exception e)
{
Debug.Console(0, "Configuration read error: \r {0}", e);
return false;
}
return true;
}
static void CreateDevices(JArray jDevices)
{
//Debug.Console(0, " Creating {0} devices", jDevices.Count);
//for (int i = 0; i < jDevices.Count; i++)
//{
// var jDev = jDevices[i];
// //var devConfig = JsonConvert.DeserializeObject<DeviceConfig>(jDev.ToString());
// //Debug.Console(0, "++++++++++++{0}", devConfig);
// var group = jDev["group"].Value<string>();
// Debug.Console(0, " [{0}], creating {1}:{2}", jDev["key"].Value<string>(),
// group, jDev["type"].Value<string>());
// Device dev = null;
// if (group.Equals("Display", StringComparison.OrdinalIgnoreCase))
// dev = DisplayFactory.CreateDisplay(jDev);
// else if (group.Equals("DeviceMonitor", StringComparison.OrdinalIgnoreCase))
// dev = DeviceManagerFactory.Create(jDev);
// //else if (group.Equals("Pc", StringComparison.OrdinalIgnoreCase))
// // dev = PcFactory.Create(jDev);
// //else if (group.Equals("SetTopBox", StringComparison.OrdinalIgnoreCase))
// // dev = SetTopBoxFactory.Create(jDev);
// //else if (group.Equals("DiscPlayer", StringComparison.OrdinalIgnoreCase))
// // dev = DiscPlayerFactory.Create(jDev);
// //else if (group.Equals("Touchpanel", StringComparison.OrdinalIgnoreCase))
// // dev = TouchpanelFactory.Create(jDev);
// else if (group.Equals("dmEndpoint", StringComparison.OrdinalIgnoreCase)) // Add Transmitter and Receiver
// dev = DmFactory.Create(jDev);
// else if (group.Equals("dmChassic", StringComparison.OrdinalIgnoreCase))
// dev = DmFactory.CreateChassis(jDev);
// else if (group.Equals("processor", StringComparison.OrdinalIgnoreCase))
// continue; // ignore it. Has no value right now.
// //else if (group.Equals("remote", StringComparison.OrdinalIgnoreCase))
// // dev = RemoteFactory.Create(jDev);
// else
// {
// Debug.Console(0, " ERROR: Device [{0}] has unknown Group '{1}'. Skipping",
// jDev["key"].Value<string>(), group);
// continue;
// }
// if (dev != null)
// DeviceManager.AddDevice(dev);
// else
// Debug.Console(0, " ERROR: failed to create device {0}",
// jDev["key"].Value<string>());
//}
}
static void CreateSystems(JArray jSystems, List<ConfigSourceList> sourceLists)
{
// // assuming one system
// var jSystem = jSystems[0];
// var name = jSystem.Value<string>("name");
// var key = FactoryHelper.KeyOrConvertName(jSystem.Value<string>("key"), name);
// if (jSystem.Value<string>("type").Equals("EssentialsHuddleSpace", StringComparison.OrdinalIgnoreCase))
// {
// var sys = new HuddleSpaceRoom(key, name);
// var props = jSystem["properties"];
// var displayKey = props["displayKey"].Value<string>();
// if (displayKey != null)
// sys.DefaultDisplay = (DisplayBase)DeviceManager.GetDeviceForKey(displayKey);
// // Add sources from passed in config list
// var myList = sourceLists.FirstOrDefault(
// l => l.Key.Equals(props.Value<string>("sourceListKey"), StringComparison.OrdinalIgnoreCase));
// if (myList != null)
// AddSourcesToSystem(sys, myList);
// DeviceManager.AddDevice(sys);
// //spin up a fusion thing too
//#warning add this fusion connector back in later
// //DeviceManager.AddDevice(new EssentialsHuddleSpaceFusionSystemController(sys, 0xf1));
//}
}
//static void AddSourcesToSystem(Room system, ConfigSourceList configList)
//{
//foreach (var configItem in configList.PresentationSources)
//{
// var src = (IPresentationSource)DeviceManager.GetDeviceForKey(configItem.SourceKey);
// if (src != null)
// system.Sources.Add(configItem.Number, src);
// else
// Debug.Console(0, system, "cannot find source '{0}' from list {1}",
// configItem.SourceKey, configList.Name);
//}
//}
/// <summary>
/// Links up routing, creates tie lines
/// </summary>
/// <param name="jRouting">The "Routing" JArray from configuration</param>
static void CreateRouting(JToken jRouting)
{
var jsonTieLines = jRouting["tieLines"].ToString();
var tieLineConfigs = JsonConvert.DeserializeObject<List<ConfigTieLine>>(jsonTieLines);
foreach (var c in tieLineConfigs)
{
var tl = c.GetTieLine();
if (tl != null)
TieLineCollection.Default.Add(tl);
}
}
/// <summary>
/// Returns the IIROutputPorts device (control system, etc) that contains a given IR port
/// </summary>
/// <param name="propsToken"></param>
static IROutputPort GetIrPort(JToken propsToken)
{
var portDevName = propsToken.Value<string>("IrPortDevice");
var portNum = propsToken.Value<uint>("IrPortNumber");
if (portDevName.Equals("controlSystem", StringComparison.OrdinalIgnoreCase))
{
IIROutputPorts irDev = ControlSystem;
if (portNum <= irDev.NumberOfIROutputPorts)
return ControlSystem.IROutputPorts[portNum];
else
Debug.Console(0, "[Config] ERROR: IR Port {0} out of range. Range 0-{1} on {2}", portNum,
ControlSystem.IROutputPorts.Count, irDev.ToString());
}
return null;
}
static void HandleUnknownType(JToken devToken, string type)
{
Debug.Console(0, "[Config] ERROR: Type '{0}' not found in group '{1}'", type,
devToken.Value<string>("Group"));
}
static void HandleDeviceCreationError(JToken devToken, Exception e)
{
Debug.Console(0, "[Config] ERROR creating device [{0}]: \r{1}",
devToken["Key"].Value<string>(), e);
}
/// <summary>
/// Console helper to reload
/// </summary>
static void ReloadFromConsole(string s)
{
// Gotta tear down everything first!
if (!string.IsNullOrEmpty(LastPath))
{
ReadConfiguration(LastPath);
}
}
}
public class ConfigSourceList
{
[JsonProperty(Required = Required.Always)]
public string Key { get; set; }
[JsonProperty(Required = Required.Always)]
public string Name { get; set; }
[JsonProperty(Required = Required.Always)]
public List<ConfigSourceItem> PresentationSources { get; set; }
}
public class ConfigSourceItem
{
[JsonProperty(Required = Required.Always)]
public uint Number { get; set; }
[JsonProperty(Required = Required.Always)]
public string SourceKey { get; set; }
public string AlternateName { get; set; }
}
public class ConfigInfo
{
public string SystemTemplateType { get; set; }
public string ProcessorType { get; set; }
public string Name { get; set; }
public uint ProgramSlotNumber { get; set; }
public string Version { get; set; }
public string EditedBy { get; set; }
public string EditDate { get; set; }
public string Comment { get; set; }
}
}

View File

@@ -1,20 +0,0 @@
using Newtonsoft.Json;
namespace PepperDash.Essentials
{
public class SourceListConfigProperties
{
[JsonProperty(Required= Required.Always)]
public uint Number { get; set; }
[JsonProperty(Required= Required.Always)]
public string SourceKey { get; set; }
public string AltName { get; set; }
public string AltIcon { get; set; }
public SourceListConfigProperties()
{
AltName = "";
AltIcon = "";
}
}
}

View File

@@ -1,54 +0,0 @@
//using System;
//using Crestron.SimplSharpPro;
//using Newtonsoft.Json;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class CommFactory
// {
// public static IBasicCommunication CreateCommForDevice(JToken devToken)
// {
// var devKey = devToken.Value<string>("key");
// IBasicCommunication comm = null;
// try
// {
// var control = devToken["properties"]["control"];
// var commMethod = control["method"].Value<string>();
// if (commMethod == "com")
// {
// var comConfig = JsonConvert.DeserializeObject<ComPortConfig>(
// control["comParams"].ToString(),
// new JsonSerializerSettings
// {
// // Needs ObjectCreationHandling to make the ComSpec struct populate
// ObjectCreationHandling = ObjectCreationHandling.Replace,
// Converters = new JsonConverter[] { new ComSpecJsonConverter() }
// });
// comm = new ComPortController(devKey + "-com", comConfig.GetComPort(), comConfig.ComSpec);
// }
// else if (commMethod == "tcpIp")
// {
// var tcpConfig = JsonConvert.DeserializeObject<TcpIpConfig>(control["tcpParams"].ToString());
// comm = new GenericTcpIpClient(devKey + "-tcp", tcpConfig.Address, tcpConfig.Port, tcpConfig.BufferSize);
// }
// }
// catch (Exception e)
// {
// Debug.Console(0, "Cannot create communication from JSON:\r{0}\r\rException:\r{1}", devToken.ToString(), e);
// }
// // put it in the device manager if it's the right flavor
// var comDev = comm as Device;
// if (comDev != null)
// DeviceManager.AddDevice(comDev);
// return comm;
// }
// }
//}

View File

@@ -1,38 +0,0 @@
//using System;
//using Crestron.SimplSharpPro;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Core.Devices;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class DeviceManagerFactory
// {
// public static Device Create(JToken devToken)
// {
// Device dev = null;
// try
// {
// var devType = devToken.Value<string>("type");
// var devKey = devToken.Value<string>("key");
// var devName = devToken.Value<string>("name");
// if (devType.Equals("DeviceMonitor", StringComparison.OrdinalIgnoreCase))
// {
// var comm = CommFactory.CreateCommForDevice(devToken);
// if (comm == null) return null;
// dev = new GenericCommunicationMonitoredDevice(devKey, devName, comm, devToken["properties"]["pollString"].Value<string>());
// }
// else
// FactoryHelper.HandleUnknownType(devToken, devType);
// }
// catch (Exception e)
// {
// FactoryHelper.HandleDeviceCreationError(devToken, e);
// }
// return dev;
// }
// }
//}

View File

@@ -1,122 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Newtonsoft.Json;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices;
//using PepperDash.Essentials.Displays;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class DisplayFactory
// {
// public static DisplayBase CreateDisplay(JToken devToken)
// {
// DisplayBase dev = null;
// try
// {
// var devType = devToken.Value<string>("type");
// var devKey = devToken.Value<string>("key");
// var devName = devToken.Value<string>("name");
// var properties = devToken["properties"];
// if (devType.Equals("MockDisplay", StringComparison.OrdinalIgnoreCase))
// dev = new MockDisplay(devKey, devName);
// else if (devType.Equals("NecMPSX", StringComparison.OrdinalIgnoreCase))
// {
// var comm = CommFactory.CreateCommForDevice(devToken);
// if (comm == null) return null;
// dev = new NecPSXMDisplayCom(devKey, devName, comm);
// //var commMethod = properties["control"]["method"].Value<string>();
// //// Helper-ize this?
// //if(commMethod == "com")
// //{
// // // Move some of this up above???
// // var comConfig = JsonConvert.DeserializeObject<ComPortConfig>(
// // properties["control"]["comParams"].ToString(),
// // new JsonSerializerSettings {
// // // Needs ObjectCreationHandling to make the ComSpec struct populate
// // ObjectCreationHandling = ObjectCreationHandling.Replace,
// // Converters = new JsonConverter[] { new ComSpecJsonConverter() }
// // });
// // dev = new NecPSXMDisplayCom(devKey, devName, comConfig.GetComPort(), comConfig.ComSpec);
// //}
// //else if (commMethod == "tcpIp")
// //{
// // var spec = properties["control"]["tcpSpec"];
// // var host = spec["address"].Value<string>();
// // var port = spec["port"].Value<int>();
// // dev = new NecPSXMDisplayCom(devKey, devName, host, port);
// //}
// }
// else if (devType.Equals("NecNpPa550", StringComparison.OrdinalIgnoreCase))
// {
// var proj = new NecPaSeriesProjector(devKey, devName);
// var comm = CreateCommunicationFromPropertiesToken(
// devKey + "-comm", properties, 3000);
// proj.CommunicationMethod = comm;
// dev = proj;
// }
// else
// FactoryHelper.HandleUnknownType(devToken, devType);
// }
// catch (Exception e)
// {
// FactoryHelper.HandleDeviceCreationError(devToken, e);
// }
// return dev;
// }
// public static IBasicCommunication CreateCommunicationFromPropertiesToken(
// string commKey, JToken properties, int bufferSize)
// {
// Debug.Console(2, "Building port from: {0}", properties.ToString());
// var tcpToken = properties["TcpIp"];
// if (tcpToken != null)
// {
// // Convert the Tcp property
// var spec = JsonConvert.DeserializeObject<TcpIpConfig>(tcpToken.ToString());
// var tcp = new GenericTcpIpClient(commKey, spec.Address, spec.Port, bufferSize);
// DeviceManager.AddDevice(tcp);
// return tcp;
// }
// var com = properties["Com"];
// if (com != null)
// {
// // Make the interim config object
// var comConfig = JsonConvert.DeserializeObject<ComPortConfig>(com.ToString(),
// new JsonSerializerSettings { ObjectCreationHandling = ObjectCreationHandling.Replace });
// // Get the IComPorts hardware device from the Device or Control System
// var comDev = comConfig.GetIComPortsDeviceFromManagedDevice();
// if (comDev != null)
// {
// var controller = new ComPortController(commKey, comDev.ComPorts[comConfig.ComPortNumber], comConfig.ComSpec);
// DeviceManager.AddDevice(controller);
// return controller;
// }
// }
// Debug.Console(0, "No Tcp or Com port information for port {0}", commKey);
// return null;
// }
// }
//}

View File

@@ -1,101 +0,0 @@
using System;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
using Newtonsoft.Json.Linq;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices;
//using PepperDash.Essentials.Devices.Dm;
using PepperDash.Core;
namespace PepperDash.Essentials
{
public class DmFactory
{
public static Device Create(JToken devToken)
{
Device dev = null;
try
{
var devType = devToken.Value<string>("type");
var devKey = devToken.Value<string>("key");
var devName = devToken.Value<string>("name");
// Catch all 200 series TX
var devprops = devToken["properties"];
var ipId = Convert.ToUInt32(devprops.Value<string>("ipId"), 16);
var parent = devprops.Value<string>("parent");
if (parent == null)
parent = "controlSystem";
if (devType.StartsWith("DmTx2", StringComparison.OrdinalIgnoreCase))
{
DmTx201C tx;
if (parent.Equals("controlSystem", StringComparison.OrdinalIgnoreCase))
{
tx = new DmTx201C(ipId, Global.ControlSystem);
//dev = new DmTx201SBasicController(devKey, devName, tx);
}
}
else if (devType.StartsWith("DmRmc", StringComparison.OrdinalIgnoreCase))
{
DmRmc100C rmc;
if (parent.Equals("controlSystem", StringComparison.OrdinalIgnoreCase))
{
rmc = new DmRmc100C(ipId, Global.ControlSystem);
//dev = new DmRmcBaseController(devKey, devName, rmc);
}
}
else
FactoryHelper.HandleUnknownType(devToken, devType);
}
catch (Exception e)
{
FactoryHelper.HandleDeviceCreationError(devToken, e);
}
return dev;
}
public static Device CreateChassis(JToken devToken)
{
Device dev = null;
try
{
var devType = devToken.Value<string>("type");
var devKey = devToken.Value<string>("key");
var devName = devToken.Value<string>("name");
// Catch all 200 series TX
var devprops = devToken["properties"];
var ipId = Convert.ToUInt32(devprops.Value<string>("ipId"), 16);
var parent = devprops.Value<string>("parent");
if (parent == null)
parent = "controlSystem";
if (devType.Equals("dmmd8x8", StringComparison.OrdinalIgnoreCase))
{
var dm = new DmMd8x8(ipId, Global.ControlSystem);
//dev = new DmChassisController(devKey, devName, dm);
}
else if (devType.Equals("dmmd16x16", StringComparison.OrdinalIgnoreCase))
{
var dm = new DmMd16x16(ipId, Global.ControlSystem);
//dev = new DmChassisController(devKey, devName, dm);
}
else if (devType.Equals("dmmd32x32", StringComparison.OrdinalIgnoreCase))
{
var dm = new DmMd32x32(ipId, Global.ControlSystem);
//dev = new DmChassisController(devKey, devName, dm);
}
}
catch (Exception e)
{
FactoryHelper.HandleDeviceCreationError(devToken, e);
}
return dev;
}
}
}

View File

@@ -1,124 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Devices;
using PepperDash.Core;
namespace PepperDash.Essentials
{
public static class FactoryHelper
{
public static string IrDriverPathPrefix = Global.FilePathPrefix + "IR" + Global.DirectorySeparator;
public static void HandleUnknownType(JToken devToken, string type)
{
Debug.Console(0, "[Config] ERROR: Type '{0}' not found in group '{1}'", type,
devToken.Value<string>("group"));
}
public static void HandleDeviceCreationError(JToken devToken, Exception e)
{
Debug.Console(0, "[Config] ERROR creating device [{0}]: \r{1}",
devToken["key"].Value<string>(), e);
Debug.Console(0, "Relevant config:\r{0}", devToken.ToString(Newtonsoft.Json.Formatting.Indented));
}
/// <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>Crestron IrPort or null if device doesn't have IR or is not found</returns>
public static IrOutPortConfig GetIrPort(JToken propsToken)
{
var irSpec = propsToken["control"]["irSpec"];
var portDevKey = irSpec.Value<string>("portDeviceKey");
var portNum = irSpec.Value<uint>("portNumber");
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(0, "[Config] Error, device with IR ports '{0}' not found", portDevKey);
return null;
}
if (portNum <= irDev.NumberOfIROutputPorts) // success!
{
var file = IrDriverPathPrefix + irSpec["file"].Value<string>();
return new IrOutPortConfig { Port = irDev.IROutputPorts[portNum], FileName = file };
}
else
{
Debug.Console(0, "[Config] Error, device '{0}' IR port {1} out of range",
portDevKey, portNum);
return null;
}
}
/// <summary>
/// Finds either the ControlSystem or a device controller that contains com ports and
/// returns a port from the hardware device
/// </summary>
/// <param name="propsToken">The Properties token from the device's config</param>
/// <returns>Crestron ComPort or null if device doesn't have IR or is not found</returns>
public static ComPort GetComPort(JToken propsToken)
{
var portDevKey = propsToken.Value<string>("comPortDevice");
var portNum = propsToken.Value<uint>("comPortNumber");
IComPorts comDev = null;
if (portDevKey.Equals("controlSystem", StringComparison.OrdinalIgnoreCase))
comDev = Global.ControlSystem;
else
comDev = DeviceManager.GetDeviceForKey(portDevKey) as IComPorts;
if (comDev == null)
{
Debug.Console(0, "[Config] Error, device with com ports '{0}' not found", portDevKey);
return null;
}
if (portNum <= comDev.NumberOfComPorts) // success!
return comDev.ComPorts[portNum];
else
{
Debug.Console(0, "[Config] Error, device '{0}' com port {1} out of range",
portDevKey, portNum);
return null;
}
}
/// <summary>
/// Returns the key if it exists or converts the name into a key
/// </summary>
public static string KeyOrConvertName(string key, string name)
{
if (string.IsNullOrEmpty(key))
return name.Replace(' ', '-');
return key;
}
}
/// <summary>
/// Wrapper to help in IR port creation
/// </summary>
public class IrOutPortConfig
{
public IROutputPort Port { get; set; }
public string FileName { get; set; }
}
}

View File

@@ -1,52 +0,0 @@
//using System;
//using Crestron.SimplSharpPro;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class SetTopBoxFactory
// {
// public static Device Create(JToken devToken)
// {
// Device dev = null;
// try
// {
// var devType = devToken.Value<string>("type");
// var devKey = devToken.Value<string>("key");
// var devName = devToken.Value<string>("name");
// var props = devToken["properties"];
// var portConfig = FactoryHelper.GetIrPort(props);
// if (portConfig != null)
// {
// if (devType.EndsWith("-generic"))
// {
// var stb = new IrSetTopBoxBase(devKey, devName, portConfig.Port, portConfig.FileName);
// // Do this a better way?
// stb.HasDpad = props["hasDpad"].Value<bool>();
// stb.HasDvr = props["hasDvr"].Value<bool>();
// stb.HasNumbers = props["hasNumbers"].Value<bool>();
// stb.HasPreset = props["hasPresets"].Value<bool>();
// dev = stb;
// }
// else
// FactoryHelper.HandleUnknownType(devToken, devType);
// var preDev = dev as IHasSetTopBoxProperties;
// if(preDev.HasPreset)
// preDev.LoadPresets(props["presetListName"].Value<string>());
// }
// }
// catch (Exception e)
// {
// FactoryHelper.HandleDeviceCreationError(devToken, e);
// }
// return dev;
// }
// }
//}

View File

@@ -1,34 +0,0 @@
//using System;
//using Crestron.SimplSharpPro;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class PcFactory
// {
// public static Device Create(JToken devToken)
// {
// Device dev = null;
// //try
// //{
// // var devType = devToken.Value<string>("type");
// // var devKey = devToken.Value<string>("key");
// // var devName = devToken.Value<string>("name");
// // if (devType.Equals("laptop", StringComparison.OrdinalIgnoreCase))
// // dev = new Laptop(devKey, devName);
// // else
// // FactoryHelper.HandleUnknownType(devToken, devType);
// //}
// //catch (Exception e)
// //{
// // FactoryHelper.HandleDeviceCreationError(devToken, e);
// //}
// return dev;
// }
// }
//}

View File

@@ -1,46 +0,0 @@
//using System;
//using Crestron.SimplSharpPro;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class DiscPlayerFactory
// {
// public static Device Create(JToken devToken)
// {
// Device dev = null;
// try
// {
// var devType = devToken.Value<string>("type");
// var devKey = devToken.Value<string>("key");
// var devName = devToken.Value<string>("name");
// // Filter out special (Pioneer
// //(devType.Equals("genericIr", StringComparison.OrdinalIgnoreCase))
// var props = devToken["properties"];
// var portConfig = FactoryHelper.GetIrPort(props);
// if (portConfig != null)
// {
// if (devType.EndsWith("-generic"))
// dev = new IrDvdBase(devKey, devName, portConfig.Port, portConfig.FileName);
// else
// FactoryHelper.HandleUnknownType(devToken, devType);
// }
// // NO PORT ERROR HERE??
// }
// catch (Exception e)
// {
// FactoryHelper.HandleDeviceCreationError(devToken, e);
// }
// return dev;
// }
// }
//}

View File

@@ -1,127 +0,0 @@
//using System;
//using System.Collections.Generic;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.Remotes;
//using Crestron.SimplSharpPro.UI;
//using Newtonsoft.Json;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices;
////using PepperDash.Essentials.Remotes;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// //public class RemoteFactory
// //{
// // public static Device Create(JToken devToken)
// // {
// // Hr150Controller dev = null;
// // try
// // {
// // var devType = devToken.Value<string>("type");
// // var devKey = devToken.Value<string>("key");
// // var devName = devToken.Value<string>("name");
// // var props = devToken["properties"];
// // if (devType.Equals("hr150", StringComparison.OrdinalIgnoreCase))
// // {
// // uint id = Convert.ToUInt32(props.Value<string>("rfId"), 16);
// // var parent = props.Value<string>("rfGateway");
// // RFExGateway rf = GetGateway(parent);
// // var hw = new Hr150(id, rf);
// // dev = new Hr150Controller(devKey, devName, hw);
// // // Have to add the buttons and default source after all devices are spun up
// // dev.AddPostActivationAction(() =>
// // {
// // var defaultSystemKey = props.Value<string>("defaultSystemKey");
// // dev.SetCurrentRoom((EssentialsRoom)DeviceManager.GetDeviceForKey(defaultSystemKey));
// // // Link custom buttons
// // var buttonProps = JsonConvert.DeserializeObject<Dictionary<uint, string>>(props["buttons"].ToString());
// // foreach (var kvp in buttonProps)
// // {
// // var split = kvp.Value.Split(':');
// // if (split[0].Equals("source"))
// // {
// // var src = DeviceManager.GetDeviceForKey(split[1]) as IPresentationSource;
// // if (src == null)
// // {
// // Debug.Console(0, dev, "Error: Cannot add source key '{0}'", split[1]);
// // continue;
// // }
// // dev.SetCustomButtonAsSource(kvp.Key, src);
// // }
// // else if (split[0] == "room")
// // {
// // if (split[1] == "off")
// // dev.SetCustomButtonAsRoomOff(kvp.Key);
// // }
// // }
// // });
// // }
// // else if (devType.Equals("tsr302", StringComparison.OrdinalIgnoreCase))
// // {
// // uint id = Convert.ToUInt32(props.Value<string>("rfId"), 16);
// // var parent = props.Value<string>("rfGateway");
// // RFExGateway rf = GetGateway(parent);
// // var sgd = props.Value<string>("sgdPath");
// // var hw = new Tsr302(id, rf);
// // //dev = new Hr150Controller(devKey, devName, hw);
// // //// Have to add the buttons and default source after all devices are spun up
// // //dev.AddPostActivationAction(() =>
// // //{
// // // var defaultSystemKey = props.Value<string>("defaultSystemKey");
// // // dev.SetCurrentRoom((EssentialsRoom)DeviceManager.GetDeviceForKey(defaultSystemKey));
// // // // Link custom buttons
// // // var buttonProps = JsonConvert.DeserializeObject<Dictionary<uint, string>>(props["buttons"].ToString());
// // // foreach (var kvp in buttonProps)
// // // {
// // // var split = kvp.Value.Split(':');
// // // if (split[0].Equals("source"))
// // // {
// // // var src = DeviceManager.GetDeviceForKey(split[1]) as IPresentationSource;
// // // if (src == null)
// // // {
// // // Debug.Console(0, dev, "Error: Cannot add source key '{0}'", split[1]);
// // // continue;
// // // }
// // // dev.SetCustomButtonAsSource(kvp.Key, src);
// // // }
// // // else if (split[0] == "room")
// // // {
// // // if (split[1] == "off")
// // // dev.SetCustomButtonAsRoomOff(kvp.Key);
// // // }
// // // }
// // //});
// // }
// // }
// // catch (Exception e)
// // {
// // FactoryHelper.HandleDeviceCreationError(devToken, e);
// // }
// // return dev;
// // }
// // public static RFExGateway GetGateway(string parent)
// // {
// // if (parent == null)
// // parent = "controlSystem";
// // RFExGateway rf = null;
// // if (parent.Equals("controlSystem", StringComparison.OrdinalIgnoreCase)
// // || parent.Equals("processor", StringComparison.OrdinalIgnoreCase))
// // {
// // rf = Global.ControlSystem.ControllerRFGatewayDevice;
// // }
// // return rf;
// // }
// //}
//}

View File

@@ -1,48 +0,0 @@
//using System;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.UI;
//using Newtonsoft.Json.Linq;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Devices;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class TouchpanelFactory
// {
// public static Device Create(JToken devToken)
// {
// SmartGraphicsTouchpanelControllerBase dev = null;
// try
// {
// var devType = devToken.Value<string>("type");
// var devKey = devToken.Value<string>("key");
// var devName = devToken.Value<string>("name");
// var props = devToken["properties"];
// if (devType.Equals("Tsw1052", StringComparison.OrdinalIgnoreCase))
// {
// uint ipId = Convert.ToUInt32(props.Value<string>("ipId"), 16);
// var hw = new Tsw1052(ipId, Global.ControlSystem);
// dev = TouchpanelControllerFactory.Create(devKey, devName, hw, props.Value<string>("sgdPath"));
// dev.UsesSplashPage = props.Value<bool>("usesSplashPage");
// dev.ShowDate = props.Value<bool>("showDate");
// dev.ShowTime = props.Value<bool>("showTime");
// // This plugs the system key into the tp, but it won't be linked up until later
// dev.AddPostActivationAction(() =>
// {
// var defaultSystemKey = props.Value<string>("defaultSystemKey");
// dev.SetCurrentRoom((EssentialsRoom)DeviceManager.GetDeviceForKey(defaultSystemKey));
// });
// }
// }
// catch (Exception e)
// {
// FactoryHelper.HandleDeviceCreationError(devToken, e);
// }
// return dev;
// }
// }
//}

View File

@@ -25,8 +25,6 @@ namespace PepperDash.Essentials
{
HttpLogoServer LogoServer;
List<object> FactoryObjects = new List<object>();
public ControlSystem()
: base()
{
@@ -36,7 +34,7 @@ namespace PepperDash.Essentials
}
/// <summary>
/// Git 'er goin'
/// Entry point for the program
/// </summary>
public override void InitializeSystem()
{
@@ -95,17 +93,17 @@ namespace PepperDash.Essentials
var dirSeparator = Global.DirectorySeparator;
var version = Crestron.SimplSharp.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
var versionString = string.Format("{0}.{1}.{2}", version.Major, version.Minor, version.Build);
string directoryPrefix;
directoryPrefix = Crestron.SimplSharp.CrestronIO.Directory.GetApplicationRootDirectory();
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows OS
var version = Crestron.SimplSharp.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
Global.SetAssemblyVersion(string.Format("{0}.{1}.{2}", version.Major, version.Minor, version.Build));
if (CrestronEnvironment.DevicePlatform != eDevicePlatform.Server) // Handles 3-series running Windows CE OS
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on 3-series Appliance", versionString);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on 3-series Appliance", Global.AssemblyVersion);
// Check if User/ProgramX exists
if (Directory.Exists(directoryPrefix + dirSeparator + "User"
@@ -133,7 +131,7 @@ namespace PepperDash.Essentials
}
else // Handles Linux OS (Virtual Control)
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", versionString);
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials v{0} on Virtual Control Server", Global.AssemblyVersion);
// Set path to User/
filePathPrefix = directoryPrefix + dirSeparator + "User" + dirSeparator;
@@ -148,7 +146,7 @@ namespace PepperDash.Essentials
}
/// <summary>
/// Do it, yo
/// Begins the process of loading resources including plugins and configuration data
/// </summary>
public void GoWithLoad()
{
@@ -175,23 +173,21 @@ namespace PepperDash.Essentials
else
{
Debug.Console(0,
"------------------------------------------------\r" +
"------------------------------------------------\r" +
"------------------------------------------------\r" +
"Essentials file structure setup completed.\r" +
"Please load config, sgd and ir files and\r" +
"restart program.\r" +
"------------------------------------------------\r" +
"------------------------------------------------\r" +
"------------------------------------------------");
@"----------------------------------------------
------------------------------------------------
------------------------------------------------
Essentials file structure setup completed.
Please load config, sgd and ir files and
restart program.
------------------------------------------------
------------------------------------------------
------------------------------------------------");
}
}
catch (Exception e)
{
Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r{0}", e);
}
// Notify the OS that the program intitialization has completed
@@ -200,7 +196,7 @@ namespace PepperDash.Essentials
}
/// <summary>
/// Initial simple implementation. Reads user/programN/plugins folder and
/// Initial simple implementation. Reads user/programXX/plugins folder and
/// use
/// </summary>
void LoadPlugins()
@@ -254,7 +250,42 @@ namespace PepperDash.Essentials
var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin"));
if (loadPlugin != null)
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Adding type {0}", assy.Key, type.FullName);
Debug.Console(2, "LoadPlugin method found in {0}", type.Name);
var fields = type.GetFields(BindingFlags.Public | BindingFlags.Static);
var minimumVersion = fields.FirstOrDefault(p => p.Name.Equals("MinimumEssentialsFrameworkVersion"));
if (minimumVersion != null)
{
Debug.Console(2, "MinimumEssentialsFrameworkVersion found");
var minimumVersionString = minimumVersion.GetValue(null) as string;
if (!string.IsNullOrEmpty(minimumVersionString))
{
var passed = Global.IsRunningMinimumVersionOrHigher(minimumVersionString);
if (!passed)
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Plugin indicates minimum Essentials version {0}. Dependency check failed. Skipping Plugin", minimumVersionString);
continue;
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Passed plugin passed dependency check (required version {0})", minimumVersionString);
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion found but not set. Loading plugin, but your mileage may vary.");
}
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Warning, "MinimumEssentialsFrameworkVersion not found. Loading plugin, but your mileage may vary.");
}
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Adding plugin: {0}", assy.Key);
loadPlugin.Invoke(null, null);
}
}
@@ -303,18 +334,6 @@ namespace PepperDash.Essentials
return configExists;
}
///// <summary>
/////
///// </summary>
///// <param name="s"></param>
//public void EnablePortalSync(string s)
//{
// if (s.ToLower() == "enable")
// {
// CrestronConsole.ConsoleCommandResponse("Portal Sync features enabled");
// }
//}
/// <summary>
///
/// </summary>

View File

@@ -1,42 +0,0 @@
using System;
using System.Linq;
using System.Collections.Generic;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices
{
///// <summary>
///// This DVD class should cover most IR, one-way DVD and Bluray fuctions
///// </summary>
//public class OppoBluray : IrDvdBase, IDvdControls, IExtendedOutputs
//{
// public OppoBluray(string key, string name, IROutputPort port, string irDriverFilepath) : base(key, name, port, irDriverFilepath) { }
// public OutputsToTriListBridge GetExtendedOutputsToTriListBridge()
// {
// return new ExtendedDvdTriListBridge();
// }
//}
//public class ExtendedDvdTriListBridge : OutputsToTriListBridge
//{
// public override void Link()
// {
// throw new NotImplementedException();
// }
// public override void UnLink()
// {
// throw new NotImplementedException();
// }
//}
}

View File

@@ -1,45 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using PepperDash.Essentials.Core;
//namespace PepperDash.Essentials.Devices
//{
// public class AppleTV : Device, IHasCueActionList
// {
// public IrOutputPortController IrPort { get; private set; }
// public AppleTV(string key, string name, IROutputPort port, string irDriverFilepath)
// : base(key, name)
// {
// IrPort = new IrOutputPortController("ir" + key, port, irDriverFilepath);
// }
// #region IFunctionList Members
// public List<CueActionPair> CueActionList
// {
// get
// {
// var numToIr = new Dictionary<Cue, string>
// {
// { CommonBoolCue.Menu, IROutputStandardCommands.IROut_MENU },
// { CommonBoolCue.Up, IROutputStandardCommands.IROut_UP_ARROW },
// { CommonBoolCue.Down, IROutputStandardCommands.IROut_DN_ARROW },
// { CommonBoolCue.Left, IROutputStandardCommands.IROut_LEFT_ARROW },
// { CommonBoolCue.Right, IROutputStandardCommands.IROut_RIGHT_ARROW },
// { CommonBoolCue.Select, IROutputStandardCommands.IROut_ENTER }
// };
// var funcs = new List<CueActionPair>(numToIr.Count);
// foreach (var kvp in numToIr)
// funcs.Add(new BoolCueActionPair(kvp.Key, b => IrPort.PressRelease(kvp.Value, b)));
// return funcs;
// }
// }
// #endregion
// }
//}

View File

@@ -0,0 +1,232 @@
{
"system": {},
"system_url": "",
"template_url": "",
"template": {
"sourceLists": {
"default": {
"source-2": {
"order": 6,
"type": "route",
"altIcon": "Blank",
"icon": "",
"sourceKey": "wePresent-1",
"includeInSourceList": true,
"volumeControlKey": "$defaultAudio",
"routeList": [
{
"sourceKey": "wePresent-1",
"type": "audioVideo",
"destinationKey": "$defaultAll"
}
]
},
"source-1": {
"order": 5,
"type": "route",
"altIcon": "Blank",
"icon": "",
"sourceKey": "inRoomPc-1",
"includeInSourceList": true,
"volumeControlKey": "$defaultAudio",
"routeList": [
{
"sourceKey": "inRoomPc-1",
"type": "audioVideo",
"destinationKey": "$defaultAll"
}
]
},
"roomOff": {
"sourceKey": "$off",
"type": "off",
"routeList": [
{
"sourceKey": "$off",
"type": "audioVideo",
"destinationKey": "$defaultAll"
}
]
}
}
},
"devices": [
{
"name": "RMC3",
"group": "processor",
"properties": {
"numberOfIrPorts": 2,
"numberOfComPorts": 1
},
"supportedSystemTypes": [
"hudType",
"presType",
"vtcType",
"custom"
],
"type": "rmc3",
"supportedConfigModes": [
"compliance",
"essentials"
],
"supportsCompliance": true,
"key": "processor",
"uid": 0
},
{
"name": "Room PC",
"key": "inRoomPc-1",
"type": "inRoomPc",
"group": "pc",
"uid": 8,
"properties": {
"hasAudio": true,
"hasControls": false,
"isDefault": true
}
},
{
"name": "Wireless Video",
"key": "wePresent-1",
"type": "wePresent",
"group": "genericSource",
"uid": 9,
"properties": {
"isDefault": false
}
},
{
"name": "Samsung QM Series Display",
"key": "display-1",
"type": "samsungmdc",
"group": "display",
"uid": 11,
"properties": {
"id": "01",
"control": {
"controlPortDevKey": "processor",
"comParams": {
"parity": "None",
"protocol": "RS232",
"baudRate": 9600,
"softwareHandshake": "None",
"dataBits": 8,
"hardwareHandshake": "None",
"stopBits": 1
},
"controlPortNumber": 1,
"method": "com"
}
}
},
{
"name": "TSW-760",
"key": "tsw760-1",
"type": "tsw760",
"group": "touchpanel",
"uid": 14,
"properties": {
"control": {
"method": "ipid",
"ipid": "03",
"params": {
"deviceReadyResponsePattern": ".*>",
"endOfLineString": "\n"
}
},
"showVolumeGauge": true,
"roomListKey": "",
"showDate": true,
"headerStyle": "Verbose",
"sgdFile": "PepperDash Essentials TSW-760.sgd",
"showTime": true,
"sourcesOverflowCount": 4,
"usesSplashPage": false,
"defaultRoomKey": "room1"
}
},
{
"name": "iPad",
"key": "crestronApp-1",
"type": "crestronApp",
"group": "touchpanel",
"uid": 15,
"properties": {
"control": {
"method": "ipid",
"ipid": "04",
"params": {
"deviceReadyResponsePattern": ".*>",
"endOfLineString": "\n"
}
},
"showVolumeGauge": true,
"roomListKey": "",
"showDate": false,
"headerStyle": "Verbose",
"sgdFile": "PepperDash Essentials iPad.sgd",
"showTime": false,
"sourcesOverflowCount": 5,
"projectName": "PepperDash Essentials iPad",
"defaultRoomKey": "room1",
"usesSplashPage": false
}
}
],
"info": {
"processorType": "rmc3",
"lastUid": 16,
"lastModifiedDate": "2018-02-16T17:54:41.315Z",
"systemType": "huddle",
"comment": "",
"requiredControlSofwareVersion": ""
},
"tieLines": [
{
"sourceKey": "inRoomPc-1",
"sourcePort": "anyVideoOut",
"destinationKey": "display-1",
"destinationPort": "HdmiIn1",
"type": "audioVideo"
},
{
"sourceKey": "wePresent-1",
"sourcePort": "anyOut",
"destinationKey": "display-1",
"destinationPort": "HdmiIn2",
"type": "audioVideo"
}
],
"rooms": [
{
"type": "huddle",
"name": "Essentials Huddle 2 Inputs",
"key": "room1",
"properties": {
"defaultDisplayKey": "display-1",
"logo": {
"type": "system",
"url": ""
},
"description": "Huddle Space with 2 sources. RMC3 processor. iPad + TSW-560",
"defaultSourceItem": "source-1",
"hasDsp": false,
"helpMessage": "",
"sourceListKey": "default",
"volumes": {
"master": {
"level": 40,
"deviceKey": "display-1",
"label": "Volume"
}
},
"defaultAudioKey": "display-1",
"defaultVideoBehavior": "basic",
"tech": {
"password": "1234"
}
}
}
]
}
}

View File

@@ -0,0 +1,387 @@
{
"system": {
"rooms": [
{
"name": "Example Room",
"key": "room1",
"properties": {
"occupancy": {
"timeoutMinutes": "60"
}
}
}
],
"devices": [
{
"key": "hdMd4x14kE-1",
"uid": 4,
"properties": {
"control": {
"tcpSshProperties": {
"address": "0.0.0.0"
}
}
}
},
{
"key": "mockCodec-1",
"uid": 5,
"properties": {
"control": {
"tcpSshProperties": {
"address": "0.0.0.0"
}
}
}
}
],
"info": {
"lastModifiedDate": "2019-02-26T21:08:09.195Z"
}
},
"system_url": "",
"template_url": "",
"template": {
"rooms": [
{
"type": "huddleVtc1",
"name": "Essentials DIN-AP3 - DM4x1",
"key": "room1",
"properties": {
"defaultDisplayKey": "display-1",
"description": "",
"helpMessage": "",
"sourceListKey": "default",
"defaultVideoBehavior": "basic",
"logo": {
"type": "system",
"url": ""
},
"occupancy": {
"timeoutMinutes": "60",
"deviceKey": "glsOdtCCn-1"
},
"defaultSourceItem": "source-1",
"videoCodecKey": "mockCodec-1",
"hasDsp": false,
"volumes": {
"master": {
"level": 40,
"deviceKey": "mockCodec-1",
"label": "Volume"
}
},
"defaultAudioKey": "display-1",
"tech": {
"password": "1234"
}
}
}
],
"devices": [
{
"name": "DIN-AP3",
"key": "processor",
"type": "dinAp3",
"group": "processor",
"uid": 0,
"properties": {
}
},
{
"name": "Room PC",
"key": "inRoomPc-1",
"type": "inRoomPc",
"properties": {
"hasAudio": true,
"hasControls": false,
"isDefault": true
},
"group": "pc",
"uid": 1
},
{
"name": "Laptop",
"key": "laptop-1",
"type": "laptop",
"properties": {
"hasAudio": true,
"hasControls": false
},
"group": "pc",
"uid": 2
},
{
"name": "Wireless Video",
"key": "wePresent-1",
"type": "wePresent",
"properties": {},
"group": "genericSource",
"uid": 3
},
{
"name": "HD-MD4x1-4k-E HDMI Switch 1",
"key": "hdMd4x14kE-1",
"type": "hdMd4x14kE",
"properties": {
"control": {
"params": {
"deviceReadyResponsePattern": ".*>",
"endOfLineString": "\n"
},
"ipid": "10",
"method": "ipidTcp",
"tcpSshProperties": {
"port": 0,
"address": ""
}
},
"parentDeviceKey": "processor",
"inputs": {
"hdmiIn2": {
"disableHdcp": true
},
"hdmiIn3": {
"disableHdcp": true
},
"hdmiIn4": {
"disableHdcp": true
},
"hdmiIn1": {
"disableHdcp": true
}
}
},
"group": "hdMdSwitch",
"uid": 4
},
{
"name": "Mock Video Codec 1",
"key": "mockCodec-1",
"type": "mockVc",
"properties": {
"favorites": [
{
"name": "Corporate WebEx",
"number": "5555555555"
}
]
},
"group": "videoCodec",
"uid": 5
},
{
"name": "Samsung MDC Protocol 1",
"key": "display-1",
"type": "samsungmdc",
"properties": {
"id": "01",
"control": {
"controlPortDevKey": "processor",
"controlPortNumber": 1,
"method": "com",
"comParams": {
"protocol": "RS232",
"baudRate": 9600,
"hardwareHandshake": "None",
"softwareHandshake": "None",
"dataBits": 8,
"parity": "None",
"stopBits": 1
}
}
},
"group": "display",
"uid": 6
},
{
"name": "Crestron GLS-ODT-C-CN 1",
"key": "glsOdtCCn-1",
"type": "glsOdtCCn",
"properties": {
"control": {
"method": "cresnet",
"cresnetId": "97"
}
},
"group": "occupancy",
"uid": 7
},
{
"name": "TSW-760",
"key": "tsw760-1",
"type": "tsw760",
"properties": {
"control": {
"params": {
"deviceReadyResponsePattern": ".*>",
"endOfLineString": "\n"
},
"ipid": "03",
"method": "ipid"
},
"showVolumeGauge": true,
"sourcesOverflowCount": 4,
"showDate": true,
"headerStyle": "Verbose",
"sgdFile": "PepperDash Essentials TSW-760.sgd",
"showTime": true,
"roomListKey": "",
"usesSplashPage": false,
"defaultRoomKey": "room1"
},
"group": "touchpanel",
"uid": 8
},
{
"name": "Crestron XPanel",
"key": "crestronApp-1",
"type": "crestronApp",
"properties": {
"control": {
"params": {
"deviceReadyResponsePattern": ".*>",
"endOfLineString": "\n"
},
"ipid": "04",
"method": "ipid"
},
"showVolumeGauge": true,
"sourcesOverflowCount": 5,
"showDate": true,
"headerStyle": "Verbose",
"sgdFile": "PepperDash Essentials iPad.sgd",
"showTime": true,
"roomListKey": "",
"projectName": "PepperDash Essentials iPad",
"defaultRoomKey": "room1",
"usesSplashPage": false
},
"group": "touchpanel",
"uid": 9
}
],
"info": {
"comment": "",
"lastUid": 10,
"lastModifiedDate": "2018-07-02T17:41:06.550Z",
"systemType": "huddle",
"processorType": "dinAp3",
"requiredControlSofwareVersion": ""
},
"tieLines": [
{
"type": "audioVideo",
"sourceKey": "hdMd4x14kE-1",
"destinationKey": "mockCodec-1",
"destinationPort": "HdmiIn2",
"sourcePort": "hdmiOut"
},
{
"type": "audioVideo",
"sourceKey": "mockCodec-1",
"destinationKey": "display-1",
"destinationPort": "HdmiIn1",
"sourcePort": "HdmiOut1"
},
{
"type": "audioVideo",
"sourceKey": "laptop-1",
"destinationKey": "hdMd4x14kE-1",
"destinationPort": "hdmiIn1",
"sourcePort": "anyOut"
},
{
"type": "audioVideo",
"sourceKey": "inRoomPc-1",
"destinationKey": "mockCodec-1",
"destinationPort": "HdmiIn3",
"sourcePort": "anyVideoOut"
},
{
"type": "audioVideo",
"sourceKey": "wePresent-1",
"destinationKey": "hdMd4x14kE-1",
"destinationPort": "hdmiIn2",
"sourcePort": "anyOut"
}
],
"sourceLists": {
"default": {
"source-2": {
"order": 6,
"icon": "",
"altIcon": "Blank",
"type": "route",
"sourceKey": "laptop-1",
"includeInSourceList": true,
"volumeControlKey": "$defaultAudio",
"routeList": [
{
"type": "audioVideo",
"sourceKey": "laptop-1",
"destinationKey": "$defaultAll"
}
]
},
"source-3": {
"order": 7,
"icon": "",
"altIcon": "Blank",
"type": "route",
"sourceKey": "wePresent-1",
"includeInSourceList": true,
"volumeControlKey": "$defaultAudio",
"routeList": [
{
"type": "audioVideo",
"sourceKey": "wePresent-1",
"destinationKey": "$defaultAll"
}
]
},
"source-1": {
"order": 5,
"icon": "",
"altIcon": "Blank",
"type": "route",
"sourceKey": "inRoomPc-1",
"includeInSourceList": true,
"volumeControlKey": "$defaultAudio",
"routeList": [
{
"type": "audioVideo",
"sourceKey": "inRoomPc-1",
"destinationKey": "$defaultAll"
}
]
},
"roomOff": {
"type": "off",
"sourceKey": "$off",
"routeList": [
{
"type": "audioVideo",
"sourceKey": "$off",
"destinationKey": "$defaultAll"
}
]
},
"codecOsd": {
"order": 1,
"name": "None",
"type": "route",
"includeInSourceList": true,
"sourceKey": "",
"routeList": [
{
"type": "audioVideo",
"sourceKey": "mockCodec-1[osd]",
"destinationKey": "$defaultAll"
}
]
}
}
}
}
}

View File

@@ -0,0 +1,439 @@
{
"system_url": "",
"template": {
"info": {
"comment": "",
"requiredControlSofwareVersion": "",
"systemType": "huddle",
"lastModifiedDate": "2018-07-09T20:00:47.873Z",
"lastUid": 23,
"processorType": "rmc3"
},
"devices": [
{
"key": "processor",
"group": "processor",
"uid": 0,
"supportsCompliance": true,
"type": "rmc3",
"properties": {},
"name": "RMC3"
},
{
"key": "comm-1",
"uid": 1,
"name": "Generic comm 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"comParams": {
"hardwareHandshake": "None",
"parity": "None",
"protocol": "RS232",
"baudRate": 9600,
"dataBits": 8,
"softwareHandshake": "None",
"stopBits": 1
},
"controlPortNumber": 1,
"controlPortDevKey": "processor",
"method": "Com"
}
}
},
{
"key": "tcp-1",
"uid": 2,
"name": "Generic TCP 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"tcpSshProperties": {
"username": "",
"autoReconnect": true,
"AutoReconnectIntervalMs": 2000,
"port": 23,
"address": "0.0.0.0",
"password": ""
},
"method": "Tcpip"
}
}
},
{
"key": "ssh-1",
"uid": 3,
"name": "Generic SSH 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"tcpSshProperties": {
"username": "crestron",
"autoReconnect": true,
"AutoReconnectIntervalMs": 2000,
"port": 22,
"address": "10.11.50.135",
"password": "2H3Zu&OvgXp6"
},
"method": "Ssh"
}
}
},
{
"key": "eisc-1A",
"uid": 4,
"type": "eiscApi",
"group": "api",
"properties": {
"control": {
"tcpSshProperties": {
"address": "127.0.0.2",
"port": 0
},
"ipId": "1A"
},
"devices": [
{
"deviceKey": "comm-1",
"joinStart": 3001
},
{
"deviceKey": "tcp-1",
"joinStart": 3011
},
{
"deviceKey": "ssh-1",
"joinStart": 3021
},
{
"deviceKey": "dmMd8x8-1",
"joinStart": 1
},
{
"deviceKey": "dmTx201C-1",
"joinStart": 3051
},
{
"deviceKey": "dmRmc4kScalerC-1",
"joinStart": 3061
},
{
"deviceKey": "dmRmc200C-1",
"joinStart": 3071
},
{
"deviceKey": "dmRmc100C-1",
"joinStart": 3081
},
{
"deviceKey": "comm-2",
"joinStart": 2501
},
{
"deviceKey": "comm-3",
"joinStart": 2511
},
{
"deviceKey": "comm-4",
"joinStart": 2521
},
{
"deviceKey": "cec-1",
"joinStart": 2531
},
{
"deviceKey": "cec-2",
"joinStart": 2541
},
{
"deviceKey": "cec-3",
"joinStart": 2551
},
{
"deviceKey": "cec-4",
"joinStart": 2561
},
{
"deviceKey": "cec-5",
"joinStart": 2571
},
{
"deviceKey": "cec-6",
"joinStart": 2581
},
{
"deviceKey": "cec-7",
"joinStart": 2591
},
{
"deviceKey": "gls-oir-1",
"joinStart": 2701
},
{
"deviceKey": "gls-odt-1",
"joinStart": 2751
}
]
}
},
{
"key": "dmMd8x8-1",
"uid": 5,
"name": "DM-MD8x8 Chassis 1",
"type": "dmMd8x8",
"group": "dmChassis",
"properties": {
"control": {
"method": "ipid",
"ipid": "40",
"params": {
"endOfLineString": "\n",
"deviceReadyResponsePattern": ".*>"
}
},
"volumeControls": {},
"inputSlots": {
"1": "dmcHdDsp",
"2": "dmcHdDsp",
"3": "dmcDvi",
"4": "dmcDvi",
"5": "dmcC",
"6": "dmcCDsp"
},
"outputSlots": {
"1": "dmcCoHd",
"2": "dmcCoHd"
},
"inputNames": {
"1": "Input 1",
"2": "Input 2",
"3": "Input 3",
"4": "Input 4",
"5": "Input 5",
"6": "Input 6"
},
"parentDeviceKey": "processor",
"outputNames": {
"1": "Output 1",
"2": "Output 2",
"3": "Output 3",
"4": "Output 4"
}
}
},
{
"key": "dmTx201C-1",
"uid": 6,
"name": "DM-TX-201C 1",
"type": "dmTx201C",
"group": "dmEndpoint",
"properties": {
"control": {
"method": "ipid",
"ipid": "45",
"params": {
"endOfLineString": "\n",
"deviceReadyResponsePattern": ".*>"
}
},
"parentDeviceKey": "dmMd8x8-1",
"parentInputNumber": "5"
}
},
{
"key": "dmRmc4kScalerC-1",
"uid": 7,
"name": "DM-RMC-4K-SCALER-C Out 1",
"type": "dmRmc4kScalerC",
"group": "dmEndpoint",
"properties": {
"control": {
"method": "ipid",
"ipid": "61",
"params": {
"endOfLineString": "\n",
"deviceReadyResponsePattern": ".*>"
}
},
"parentDeviceKey": "dmMd8x8-1",
"parentOutputNumber": "1"
}
},
{
"key": "dmRmc200C-1",
"uid": 8,
"name": "DM-RMC-200-C Out 2",
"type": "dmRmc200C",
"group": "dmEndpoint",
"properties": {
"control": {
"method": "ipid",
"ipid": "62",
"params": {
"endOfLineString": "\n",
"deviceReadyResponsePattern": ".*>"
}
},
"parentDeviceKey": "dmMd8x8-1",
"parentOutputNumber": "2"
}
},
{
"key": "dmRmc100C-1",
"uid": 9,
"name": "DM-RMC-100-C Out 3",
"type": "dmRmc100C",
"group": "dmEndpoint",
"properties": {
"control": {
"method": "ipid",
"ipid": "63",
"params": {
"endOfLineString": "\n",
"deviceReadyResponsePattern": ".*>"
}
},
"parentDeviceKey": "dmMd8x8-1",
"parentOutputNumber": "3"
}
},
{
"key": "comm-2",
"uid": 10,
"name": "Rmc comm 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"comParams": {
"hardwareHandshake": "None",
"parity": "None",
"protocol": "RS232",
"baudRate": 9600,
"dataBits": 8,
"softwareHandshake": "None",
"stopBits": 1
},
"controlPortNumber": 1,
"controlPortDevKey": "dmRmc4kScalerC-1",
"method": "Com"
}
}
},
{
"key": "comm-3",
"uid": 11,
"name": "Rmc comm 2",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"comParams": {
"hardwareHandshake": "None",
"parity": "None",
"protocol": "RS232",
"baudRate": 9600,
"dataBits": 8,
"softwareHandshake": "None",
"stopBits": 1
},
"controlPortNumber": 1,
"controlPortDevKey": "dmRmc200C-1",
"method": "Com"
}
}
},
{
"key": "cec-1",
"uid": 13,
"name": "Tx 5 cec 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"controlPortName": "HdmiIn",
"controlPortDevKey": "dmTx201C-1",
"method": "Cec"
}
}
},
{
"key": "cec-5",
"uid": 17,
"name": "Rmc 1 cec 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"controlPortName": "HdmiOut",
"controlPortDevKey": "dmRmc4kScalerC-1",
"method": "Cec"
}
}
},
{
"key": "cec-6",
"uid": 18,
"name": "Dm Chassis In 1 cec 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"controlPortName": "inputCard1--hdmiIn",
"controlPortDevKey": "dmMd8x8-1",
"method": "Cec"
}
}
},
{
"key": "cec-7",
"uid": 19,
"name": "Dm Chassis Out 1 cec 1",
"type": "genericComm",
"group": "comm",
"properties": {
"control": {
"controlPortName": "outputCard1--hdmiOut1",
"controlPortDevKey": "dmMd8x8-1",
"method": "Cec"
}
}
},
{
"key": "gls-oir-1",
"uid": 19,
"name": "GLS-OIR-CN 1",
"type": "glsoirccn",
"group": "occupancy",
"properties": {
"control": {
"cresnetId": "41",
"method": "cresnet"
}
}
},
{
"key": "gls-odt-1",
"uid": 19,
"name": "GLS-ODT-CN 1",
"type": "glsodtccn",
"group": "occupancy",
"properties": {
"control": {
"cresnetId": "42",
"method": "cresnet"
}
}
}
],
"rooms": [],
"sourceLists": {},
"tieLines": []
},
"template_url": "",
"system": {
}
}

View File

@@ -0,0 +1,70 @@
{
"system_url": "",
"template": {
"info": {
"comment": "",
"requiredControlSofwareVersion": "",
"systemType": "huddle",
"lastModifiedDate": "2018-07-09T20:00:47.873Z",
"lastUid": 23,
"processorType": "dmps3300c"
},
"devices": [
{
"key": "processor",
"group": "processor",
"uid": 0,
"supportsCompliance": true,
"type": "dmps3300c",
"properties": {
},
"name": "DMPS3-300-C"
},
{
"key": "eisc-A",
"uid":4,
"type": "eiscApi",
"group":"api",
"properties": {
"control":{
"tcpSshProperties":{
"address":"127.0.0.2",
"port":0
},
"ipId":"1A"
},
"devices": [
{
"deviceKey":"processor-avRouting",
"joinStart":1
},
{
"deviceKey":"processor-programAudioOutput",
"joinStart":3001
},
{
"deviceKey":"processor-aux1AudioOutput",
"joinStart":3011
},
{
"deviceKey":"processor-aux2AudioOutput",
"joinStart":3021
}
]
}
}
],
"rooms": [
],
"sourceLists": {
},
"tieLines": [
]
},
"template_url": "",
"system": {
}
}

View File

@@ -1,47 +0,0 @@
//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;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Core.Presets;
//namespace PepperDash.Essentials
//{
// /// <summary>
// ///
// /// </summary>
// public abstract class DevicePageControllerBase
// {
// protected BasicTriListWithSmartObject TriList;
// protected List<BoolInputSig> FixedObjectSigs;
// public DevicePageControllerBase(BasicTriListWithSmartObject triList)
// {
// TriList = triList;
// }
// public void SetVisible(bool state)
// {
// foreach (var sig in FixedObjectSigs)
// {
// Debug.Console(2, "set visible {0}={1}", sig.Number, state);
// sig.BoolValue = state;
// }
// CustomSetVisible(state);
// }
// /// <summary>
// /// Add any specialized show/hide logic here - beyond FixedObjectSigs. Overriding
// /// methods do not need to call this base method
// /// </summary>
// protected virtual void CustomSetVisible(bool state)
// {
// }
// }
//}

View File

@@ -1,308 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.UI;
//using PepperDash.Core;
//namespace PepperDash.Essentials.Core
//{
// /// <summary>
// ///
// /// </summary>
// public class LargeTouchpanelControllerBase : SmartGraphicsTouchpanelControllerBase
// {
// public string PresentationShareButtonInVideoText = "Share";
// public string PresentationShareButtonNotInVideoText = "Presentation";
// SourceListSubpageReferenceList SourceSelectSRL;
// DevicePageControllerBase CurrentPresentationSourcePageController;
// public LargeTouchpanelControllerBase(string key, string name,
// BasicTriListWithSmartObject triList, string sgdFilePath)
// : base(key, name, triList, sgdFilePath)
// {
// }
// /// <summary>
// /// Static factory method
// /// </summary>
// public static LargeTouchpanelControllerBase GetController(string key, string name,
// string type, CrestronTswPropertiesConfig props)
// {
// var id = Convert.ToUInt32(props.IpId, 16);
// type = type.ToLower();
// Tswx52ButtonVoiceControl tsw = null;
// if (type == "tsw752")
// tsw = new Tsw752(id, Global.ControlSystem);
// else if (type == "tsw1052")
// tsw = new Tsw1052(id, Global.ControlSystem);
// else
// {
// Debug.Console(0, "WARNING: Cannot create TSW controller with type '{0}'", type);
// return null;
// }
// var sgdPath = string.Format(@"\NVRAM\Program{0}\SGD\{1}",
// InitialParametersClass.ApplicationNumber, props.SgdFile);
// var controller = new LargeTouchpanelControllerBase(key, name, tsw, sgdPath);
// controller.UsesSplashPage = props.UsesSplashPage;
// // Get the room and add it after everthing is ready
// var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey) as EssentialsRoom;
// controller.AddPostActivationAction(() =>
// {
// controller.SetCurrentRoom(room);
// });
// return controller;
// }
// public override bool CustomActivate()
// {
// var baseSuccess = base.CustomActivate();
// if (!baseSuccess) return false;
// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n =>
// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); });
// var lm = Global.LicenseManager;
// if (lm != null)
// {
// lm.LicenseIsValid.LinkInputSig(TriList.BooleanInput[UiCue.ShowLicensed.Number]);
// //others
// }
// // Wire up buttons
// TriList.SetSigFalseAction(15003, () => SetMainMode(eMainModeType.Presentation));
// TriList.SetSigFalseAction(15008, PowerOffWithConfirmPressed);
// TriList.SetSigFalseAction(15101, () => SetMainMode(eMainModeType.Presentation));
// TriList.SetSigFalseAction(15013, ShowHelp);
// TriList.SetSigFalseAction(15014, () => SetMainMode(eMainModeType.Tech));
// // Temp things -----------------------------------------------------------------------
// TriList.StringInput[UiCue.SplashMessage.Number].StringValue = SplashMessage;
// //------------------------------------------------------------------------------------
// // Initialize initial view
// ShowSplashOrMain();
// return true;
// }
// /// <summary>
// /// In Essentials, this should NEVER be called, since it's a one-room solution
// /// </summary>
// protected override void HideRoomUI()
// {
// // UI Cleanup here????
// //SwapAudioDeviceControls(CurrentRoom.CurrentAudioDevice, null);
// //CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange;
// CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange;
// CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange;
// SourceSelectSRL.DetachFromCurrentRoom();
// }
// /// <summary>
// /// Ties this panel controller to the Room and gets updates.
// /// </summary>
// protected override void ShowRoomUI()
// {
// Debug.Console(1, this, "connecting to system '{0}'", CurrentRoom.Key);
// TriList.StringInput[RoomCue.Name.Number].StringValue = CurrentRoom.Name;
// TriList.StringInput[RoomCue.Description.Number].StringValue = CurrentRoom.Description;
// CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange;
// CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange;
// CurrentRoom.IsCoolingDownFeedback.OutputChange += CurrentRoom_IsCoolingDown_OutputChange;
// CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingUp_OutputChange;
// SourceSelectSRL.AttachToRoom(CurrentRoom);
// }
// void CurrentRoom_IsCoolingDown_OutputChange(object sender, EventArgs e)
// {
// Debug.Console(2, this, "Received room in cooldown={0}", CurrentRoom.IsCoolingDownFeedback.BoolValue);
// if (CurrentRoom.IsCoolingDownFeedback.BoolValue) // When entering cooldown
// {
// // Do we need to check for an already-running cooldown - like in the case of room switches?
// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power Off", "Power", "Please wait, shutting down",
// "", "", CurrentRoom.CooldownTime, true, b =>
// {
// ShowSplashOrMain();
// });
// }
// }
// void CurrentRoom_IsWarmingUp_OutputChange(object sender, EventArgs e)
// {
// Debug.Console(2, this, "Received room in warmup={0}", CurrentRoom.IsWarmingUpFeedback.BoolValue);
// if (CurrentRoom.IsWarmingUpFeedback.BoolValue) // When entering warmup
// {
// // Do we need to check for an already-running cooldown - like in the case of room switches?
// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power On", "Power", "Please wait, powering on",
// "", "", CurrentRoom.WarmupTime, false, b =>
// {
// // Reveal sources - or has already been done behind modal
// });
// }
// }
// // Handler for source change events.
// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args)
// {
// // Put away the old source and set up the new source.
// Debug.Console(2, this, "Received source change={0}", args.NewSource != null ? args.NewSource.SourceKey : "none");
// // If we're in tech, don't switch screen modes. Add any other modes we may want to switch away from
// // inside the if below.
// if (MainMode == eMainModeType.Splash)
// SetMainMode(eMainModeType.Presentation);
// SetControlSource(args.NewSource);
// }
// //***********************************************************************
// //** UI Manipulation
// //***********************************************************************
// /// <summary>
// /// Shows the splash page or the main presentation page, depending on config setting
// /// </summary>
// void ShowSplashOrMain()
// {
// if (UsesSplashPage)
// SetMainMode(eMainModeType.Splash);
// else
// SetMainMode(eMainModeType.Presentation);
// }
// /// <summary>
// /// Switches between main modes
// /// </summary>
// void SetMainMode(eMainModeType mode)
// {
// MainMode = mode;
// switch (mode)
// {
// case eMainModeType.Presentation:
// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = true;
// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = true;
// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = true;
// ShowCurrentPresentationSourceUi();
// break;
// case eMainModeType.Splash:
// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = true;
// HideCurrentPresentationSourceUi();
// break;
// case eMainModeType.Tech:
// new ModalDialog(TriList).PresentModalTimerDialog(1, "Tech page", "Info",
// "Tech page will be here soon!<br>I promise",
// "Bueno!", "", 0, false, null);
// MainMode = eMainModeType.Presentation;
// break;
// default:
// break;
// }
// }
// /// <summary>
// ///
// /// </summary>
// void PowerOffWithConfirmPressed()
// {
// if (CurrentRoom == null)
// return;
// if (!CurrentRoom.RoomIsOnFeedback.BoolValue)
// return;
// // Timeout or button 1 press will shut down
// var modal = new ModalDialog(TriList);
// uint seconds = CurrentRoom.UnattendedShutdownTimeMs / 1000;
// var message = string.Format("Meeting will end in {0} seconds", seconds);
// modal.PresentModalTimerDialog(2, "End Meeting", "Info", message,
// "End Meeting Now", "Cancel", CurrentRoom.UnattendedShutdownTimeMs, true,
// but => { if (but != 2) CurrentRoom.RoomOff(); });
// }
// /// <summary>
// /// Reveals the basic UI for the current device
// /// </summary>
// protected override void ShowCurrentPresentationSourceUi()
// {
// if (MainMode == eMainModeType.Splash && CurrentRoom.RoomIsOnFeedback.BoolValue)
// SetMainMode(eMainModeType.Presentation);
// if (CurrentPresentationControlDevice == null)
// {
// // If system is off, do one thing
// // Otherwise, do something else - shouldn't be in this condition
// return;
// }
// // If a controller is already loaded, use it
// if (LoadedPageControllers.ContainsKey(CurrentPresentationControlDevice))
// CurrentPresentationSourcePageController = LoadedPageControllers[CurrentPresentationControlDevice];
// else
// {
// // This is by no means optimal, but for now....
// if (CurrentPresentationControlDevice.Type == PresentationSourceType.SetTopBox
// && CurrentPresentationControlDevice is ISetTopBoxControls)
// CurrentPresentationSourcePageController = new PageControllerLargeSetTopBoxGeneric(TriList,
// CurrentPresentationControlDevice as ISetTopBoxControls);
// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Laptop)
// CurrentPresentationSourcePageController = new PageControllerLaptop(TriList);
// // separate these...
// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Dvd)
// CurrentPresentationSourcePageController =
// new PageControllerLargeDvd(TriList, CurrentPresentationControlDevice as IDiscPlayerControls);
// else
// CurrentPresentationSourcePageController = null;
// // Save it.
// if (CurrentPresentationSourcePageController != null)
// LoadedPageControllers[CurrentPresentationControlDevice] = CurrentPresentationSourcePageController;
// }
// if (CurrentPresentationSourcePageController != null)
// CurrentPresentationSourcePageController.SetVisible(true);
// }
// protected override void HideCurrentPresentationSourceUi()
// {
// if (CurrentPresentationControlDevice != null && CurrentPresentationSourcePageController != null)
// CurrentPresentationSourcePageController.SetVisible(false);
// }
// void ShowHelp()
// {
// new ModalDialog(TriList).PresentModalTimerDialog(1, "Help", "Help", CurrentRoom.HelpMessage,
// "OK", "", 0, false, null);
// }
// protected void ListSmartObjects()
// {
// Debug.Console(0, this, "Smart objects IDs:");
// var list = TriList.SmartObjects.OrderBy(s => s.Key);
// foreach (var kvp in list)
// Debug.Console(0, " {0}", kvp.Key);
// }
// }
//}

View File

@@ -1,28 +0,0 @@
//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;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Core.Presets;
//namespace PepperDash.Essentials
//{
// public class PageControllerLaptop : DevicePageControllerBase
// {
// public PageControllerLaptop(BasicTriListWithSmartObject tl)
// : base(tl)
// {
// FixedObjectSigs = new List<BoolInputSig>
// {
// tl.BooleanInput[10092], // well
// tl.BooleanInput[11001] // Laptop info
// };
// }
// }
//}

View File

@@ -1,46 +0,0 @@
//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;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Core.Presets;
//namespace PepperDash.Essentials
//{
// /// <summary>
// ///
// /// </summary>
// public class PageControllerLargeDvd : DevicePageControllerBase
// {
// IDiscPlayerControls Device;
// public PageControllerLargeDvd(BasicTriListWithSmartObject tl, IDiscPlayerControls device)
// : base(tl)
// {
// Device = device;
// FixedObjectSigs = new List<BoolInputSig>
// {
// tl.BooleanInput[10093], // well
// tl.BooleanInput[10411], // DVD Dpad
// tl.BooleanInput[10412] // everything else
// };
// }
// protected override void CustomSetVisible(bool state)
// {
// // Hook up smart objects if applicable
// if (Device != null)
// {
//#warning rewire this
// //var uos = (Device as IHasCueActionList).CueActionList;
// //SmartObjectHelper.LinkDpadWithUserObjects(TriList, 10411, uos, state);
// }
// }
// }
//}

View File

@@ -1,139 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using PepperDash.Essentials.Core.Presets;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//namespace PepperDash.Essentials
//{
// public class PageControllerLargeSetTopBoxGeneric : DevicePageControllerBase
// {
// // To-DO: Add properties for component subpage names. DpadPos1, DpadPos2...
// // Derived classes can then insert special subpages for variations on given
// // device types. Like DirecTV vs Comcast
// public uint DpadSmartObjectId { get; set; }
// public uint NumberPadSmartObjectId { get; set; }
// public uint PresetsSmartObjectId { get; set; }
// public uint Position5TabsId { get; set; }
// ISetTopBoxControls Device;
// DevicePresetsView PresetsView;
// bool ShowPosition5Tabs;
// uint CurrentVisiblePosition5Item = 1;
// Dictionary<uint, uint> Position5SubpageJoins = new Dictionary<uint, uint>
// {
// { 1, 10053 },
// { 2, 10054 }
// };
// public PageControllerLargeSetTopBoxGeneric(BasicTriListWithSmartObject tl, ISetTopBoxControls device)
// : base(tl)
// {
// Device = device;
// DpadSmartObjectId = 10011;
// NumberPadSmartObjectId = 10014;
// PresetsSmartObjectId = 10012;
// Position5TabsId = 10081;
// bool dpad = device is IDPad;
// bool preset = device.HasPresets;
// bool dvr = device.HasDvr;
// bool numbers = device is INumericKeypad;
// uint[] joins = null;
// if (dpad && !preset && !dvr && !numbers) joins = new uint[] { 10031, 10091 };
// else if (!dpad && preset && !dvr && !numbers) joins = new uint[] { 10032, 10091 };
// else if (!dpad && !preset && dvr && !numbers) joins = new uint[] { 10033, 10091 };
// else if (!dpad && !preset && !dvr && numbers) joins = new uint[] { 10034, 10091 };
// else if (dpad && preset && !dvr && !numbers) joins = new uint[] { 10042, 10021, 10092 };
// else if (dpad && !preset && dvr && !numbers) joins = new uint[] { 10043, 10021, 10092 };
// else if (dpad && !preset && !dvr && numbers) joins = new uint[] { 10044, 10021, 10092 };
// else if (!dpad && preset && dvr && !numbers) joins = new uint[] { 10043, 10022, 10092 };
// else if (!dpad && preset && !dvr && numbers) joins = new uint[] { 10044, 10022, 10092 };
// else if (!dpad && !preset && dvr && numbers) joins = new uint[] { 10044, 10023, 10092 };
// else if (dpad && preset && dvr && !numbers) joins = new uint[] { 10053, 10032, 10011, 10093 };
// else if (dpad && preset && !dvr && numbers) joins = new uint[] { 10054, 10032, 10011, 10093 };
// else if (dpad && !preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10011, 10093 };
// else if (!dpad && preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10012, 10093 };
// else if (dpad && preset && dvr && numbers)
// {
// joins = new uint[] { 10081, 10032, 10011, 10093 }; // special case
// ShowPosition5Tabs = true;
// }
// // Project the joins into corresponding sigs.
// FixedObjectSigs = joins.Select(u => TriList.BooleanInput[u]).ToList();
// // Build presets
// if (device.HasPresets)
// {
// PresetsView = new DevicePresetsView(tl, device.PresetsModel);
// }
// }
// protected override void CustomSetVisible(bool state)
// {
// if (ShowPosition5Tabs)
// {
// // Show selected tab
// TriList.BooleanInput[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = state;
// var tabSo = TriList.SmartObjects[Position5TabsId];
// if (state) // Link up the tab object
// {
// tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = new Action<bool>(b => ShowTab(1));
// tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = new Action<bool>(b => ShowTab(2));
// }
// else // Disco tab object
// {
// tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = null;
// tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = null;
// }
// }
// // Hook up smart objects if applicable
//#warning hook these up
// //if (Device is IHasCueActionList)
// //{
// // var uos = (Device as IHasCueActionList).CueActionList;
// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, DpadSmartObjectId, uos, state);
// // SmartObjectHelper.LinkNumpadWithUserObjects(TriList, NumberPadSmartObjectId,
// // uos, CommonBoolCue.Dash, CommonBoolCue.Last, state);
// //}
// // Link, unlink presets
// if (Device.HasPresets && state)
// PresetsView.Attach();
// else if (Device.HasPresets && !state)
// PresetsView.Detach();
// }
// void ShowTab(uint number)
// {
// // Ignore re-presses
// if (CurrentVisiblePosition5Item == number) return;
// // Swap subpage
// var bi = TriList.BooleanInput;
// if (CurrentVisiblePosition5Item > 0)
// bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = false;
// CurrentVisiblePosition5Item = number;
// bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = true;
// // Show feedback on buttons
// }
// }
//}

View File

@@ -1,43 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//namespace PepperDash.Essentials.Core
//{
// public class UiCue
// {
// public static readonly Cue VisibleSystemInit = Cue.BoolCue("VisibleSystemInit", 15001);
// public static readonly Cue VisibleSplash = Cue.BoolCue("VisibleSplash", 15002);
// public static readonly Cue PressSplash = Cue.BoolCue("PressSplash", 15003);
// public static readonly Cue PressRoomOn = Cue.BoolCue("PressRoomOn", 15006);
// public static readonly Cue PressRoomOff = Cue.BoolCue("PressRoomOff", 15007);
// public static readonly Cue PressRoomOffWithConfirm = Cue.BoolCue("PressRoomOffWithConfirm", 15008);
// public static readonly Cue VisibleCommonHeader = Cue.BoolCue("PressPowerOffConfirm", 15011);
// public static readonly Cue VisibleCommonFooter = Cue.BoolCue("VisibleCommonFooter", 15012);
// public static readonly Cue PressHelp = Cue.BoolCue("PressHelp", 15013);
// public static readonly Cue PressSettings = Cue.BoolCue("PressSettings", 15014);
// public static readonly Cue ShowDate = Cue.BoolCue("PressSettings", 15015);
// public static readonly Cue ShowTime = Cue.BoolCue("PressSettings", 15016);
// public static readonly Cue ShowLicensed = Cue.BoolCue("PressSettings", 15017);
// public static readonly Cue ShowUnLicensed = Cue.BoolCue("PressSettings", 15018);
// public static readonly Cue PressModePresentationShare = Cue.BoolCue("PressModePresentationShare", 15101);
// public static readonly Cue PressModeVideoConf = Cue.BoolCue("PressModeVideoConf", 15102);
// public static readonly Cue PressModeAudioConf = Cue.BoolCue("PressModeAudioConf", 15103);
// public static readonly Cue VisiblePresentationSourceList = Cue.BoolCue("VisiblePresentationSourceList", 15111);
// public static readonly Cue VisibleSystemIsOff = Cue.BoolCue("VisibleSystemIsOff", 15112);
// public static readonly Cue VisibleAudioConfPopover = Cue.BoolCue("VisibleAudioConfPopover", 15201);
// public static readonly Cue VisibleVideoConfPopover = Cue.BoolCue("VisibleVideoConfPopover", 15251);
// public static readonly Cue TextRoomName = Cue.BoolCue("TextRoomName", 4001);
// public static readonly Cue TextPresentationShareButton = Cue.BoolCue("TextPresentationShareButton", 4011);
// public static readonly Cue SplashMessage = Cue.StringCue("SplashMessage", 2101);
// }
//}

View File

@@ -1,318 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//namespace PepperDash.Essentials.Core
//{
// public abstract class SmartGraphicsTouchpanelControllerBase : CrestronGenericBaseDevice
// {
// public BasicTriListWithSmartObject TriList { get; protected set; }
// public bool UsesSplashPage { get; set; }
// public string SplashMessage { get; set; }
// public bool ShowDate
// {
// set { TriList.BooleanInput[UiCue.ShowDate.Number].BoolValue = value; }
// }
// public bool ShowTime
// {
// set { TriList.BooleanInput[UiCue.ShowTime.Number].BoolValue = value; }
// }
// //public abstract List<CueActionPair> FunctionList { get; }
// protected eMainModeType MainMode;
// protected SourceListItem CurrentPresentationControlDevice;
// /// <summary>
// /// Defines the signal offset for the presentation device. Defaults to 100
// /// </summary>
// public uint PresentationControlDeviceJoinOffset { get { return 100; } }
// public enum eMainModeType
// {
// Presentation, Splash, Tech
// }
// protected string SgdFilePath;
// public EssentialsRoom CurrentRoom { get; protected set; }
// protected Dictionary<SourceListItem, DevicePageControllerBase> LoadedPageControllers
// = new Dictionary<SourceListItem, DevicePageControllerBase>();
// static object RoomChangeLock = new object();
// /// <summary>
// /// Constructor
// /// </summary>
// public SmartGraphicsTouchpanelControllerBase(string key, string name, BasicTriListWithSmartObject triList,
// string sgdFilePath)
// : base(key, name, triList)
// {
// TriList = triList;
// if (string.IsNullOrEmpty(key)) throw new ArgumentNullException("key");
// if (string.IsNullOrEmpty(sgdFilePath)) throw new ArgumentNullException("sgdFilePath");
// SgdFilePath = sgdFilePath;
// TriList.LoadSmartObjects(SgdFilePath);
// UsesSplashPage = true;
// SplashMessage = "Welcome";
// TriList.SigChange += Tsw_AnySigChange;
// foreach (var kvp in TriList.SmartObjects)
// kvp.Value.SigChange += this.Tsw_AnySigChange;
// }
//#warning wire UI manipulating presses up here, typically in child classes...
// //public override bool CustomActivate()
// //{
// // var baseSuccess = base.CustomActivate();
// // if (!baseSuccess) return false;
// // // Wiring up the buttons with UOs
// // foreach (var uo in this.FunctionList)
// // {
// // if (uo.Cue.Number == 0) continue;
// // //if (uo is BoolCueActionPair)
// // // TriList.BooleanOutput[uo.Cue.Number].UserObject = uo;
// // //else if (uo is UShortCueActionPair)
// // // TriList.UShortOutput[uo.Cue.Number].UserObject = uo;
// // //else if (uo is StringCueActionPair)
// // // TriList.StringOutput[uo.Cue.Number].UserObject = uo;
// // }
// // return true;
// //}
// //public void SetCurrentRoom(EssentialsRoom room)
// //{
// // if (CurrentRoom != null)
// // HideRoomUI();
// // CurrentRoom = room;
// // ShowRoomUI();
// //}
// /// <summary>
// ///
// /// </summary>
// /// <param name="room"></param>
// public void SetCurrentRoom(EssentialsRoom room)
// {
// if (CurrentRoom == room) return;
// IBasicVolumeControls oldAudio = null;
// //Disconnect current room and audio device
// if (CurrentRoom != null)
// {
// HideRoomUI();
// CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange;
// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange;
// oldAudio = CurrentRoom.CurrentAudioDevice;
// }
// CurrentRoom = room;
// IBasicVolumeControls newAudio = null;
// if (CurrentRoom != null)
// {
// CurrentRoom.AudioDeviceWillChange += this.CurrentRoom_AudioDeviceWillChange;
// CurrentRoom.PresentationSourceChange += this.CurrentRoom_PresentationSourceChange;
// SetControlSource(CurrentRoom.CurrentPresentationSourceInfo);
// newAudio = CurrentRoom.CurrentAudioDevice;
// ShowRoomUI();
// }
// SwapAudioDeviceControls(oldAudio, newAudio);
// }
// /// <summary>
// /// Detaches and attaches an IVolumeFunctions device to the appropriate TP TriList signals.
// /// This will also add IVolumeNumeric if the device implements it.
// /// Overriding classes should call this. Overriding classes are responsible for
// /// linking up to hard keys, etc.
// /// </summary>
// /// <param name="oldDev">May be null</param>
// /// <param name="newDev">May be null</param>
// protected virtual void SwapAudioDeviceControls(IBasicVolumeControls oldDev, IBasicVolumeControls newDev)
// {
// // Disconnect
// if (oldDev != null)
// {
// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = null;
// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = null;
// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = null;
// TriList.BooleanInput[CommonBoolCue.ShowVolumeButtons.Number].BoolValue = false;
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false;
// if (oldDev is IBasicVolumeWithFeedback)
// {
// var fbDev = oldDev as IBasicVolumeWithFeedback;
// TriList.UShortOutput[401].UserObject = null;
// fbDev.MuteFeedback.UnlinkInputSig(TriList.BooleanInput[403]);
// fbDev.VolumeLevelFeedback.UnlinkInputSig(TriList.UShortInput[401]);
// }
// }
// if (newDev != null)
// {
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true;
// TriList.SetBoolSigAction(401, newDev.VolumeUp);
// TriList.SetBoolSigAction(402, newDev.VolumeDown);
// TriList.SetSigFalseAction(405, newDev.MuteToggle);
// if (newDev is IBasicVolumeWithFeedback) // Show slider
// {
// var fbDev = newDev as IBasicVolumeWithFeedback;
// TriList.BooleanInput[406].BoolValue = false;
// TriList.BooleanInput[407].BoolValue = true;
// TriList.UShortOutput[401].UserObject = new Action<ushort>(fbDev.SetVolume);
// fbDev.VolumeLevelFeedback.LinkInputSig(TriList.UShortInput[401]);
// }
// else // Show buttons only
// {
// TriList.BooleanInput[406].BoolValue = true;
// TriList.BooleanInput[407].BoolValue = false;
// }
// }
// }
// /// <summary>
// /// Does nothing. Override to add functionality when calling SetCurrentRoom
// /// </summary>
// protected virtual void HideRoomUI() { }
// /// <summary>
// /// Does nothing. Override to add functionality when calling SetCurrentRoom
// /// </summary>
// protected virtual void ShowRoomUI() { }
// /// <summary>
// /// Sets up the current presentation device and updates statuses if the device is capable.
// /// </summary>
// protected void SetControlSource(SourceListItem newSource)
// {
// if (CurrentPresentationControlDevice != null)
// {
// HideCurrentPresentationSourceUi();
//#warning Get button methods from RESI, and find a more-well-defined way to wire up feedbacks
// // Unhook presses and things
// //if (CurrentPresentationControlDevice is IHasCueActionList)
// //{
// // foreach (var uo in (CurrentPresentationControlDevice as IHasCueActionList).CueActionList)
// // {
// // if (uo.Cue.Number == 0) continue;
// // if (uo is BoolCueActionPair)
// // {
// // var bSig = TriList.BooleanOutput[uo.Cue.Number];
// // // Disconnection should also clear bool sigs in case they are pressed and
// // // might be orphaned
// // if (bSig.BoolValue)
// // (bSig.UserObject as BoolCueActionPair).Invoke(false);
// // bSig.UserObject = null;
// // }
// // else if (uo is UShortCueActionPair)
// // TriList.UShortOutput[uo.Cue.Number].UserObject = null;
// // else if (uo is StringCueActionPair)
// // TriList.StringOutput[uo.Cue.Number].UserObject = null;
// // }
// //}
// // unhook outputs
// if (CurrentPresentationControlDevice is IHasFeedback)
// {
// foreach (var fb in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks)
// {
// if (fb.Cue.Number == 0) continue;
// if (fb is BoolFeedback)
// (fb as BoolFeedback).UnlinkInputSig(TriList.BooleanInput[fb.Cue.Number]);
// else if (fb is IntFeedback)
// (fb as IntFeedback).UnlinkInputSig(TriList.UShortInput[fb.Cue.Number]);
// else if (fb is StringFeedback)
// (fb as StringFeedback).UnlinkInputSig(TriList.StringInput[fb.Cue.Number]);
// }
// }
// }
// CurrentPresentationControlDevice = newSource;
// //connect presses and things
// //if (newSource is IHasCueActionList) // This has functions, get 'em
// //{
// // foreach (var ao in (newSource as IHasCueActionList).CueActionList)
// // {
// // if (ao.Cue.Number == 0) continue;
// // if (ao is BoolCueActionPair)
// // TriList.BooleanOutput[ao.Cue.Number].UserObject = ao;
// // else if (ao is UShortCueActionPair)
// // TriList.UShortOutput[ao.Cue.Number].UserObject = ao;
// // else if (ao is StringCueActionPair)
// // TriList.StringOutput[ao.Cue.Number].UserObject = ao;
// // }
// //}
// // connect outputs (addInputSig should update sig)
// if (CurrentPresentationControlDevice is IHasFeedback)
// {
// foreach (var fb in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks)
// {
// if (fb.Cue.Number == 0) continue;
// if (fb is BoolFeedback)
// (fb as BoolFeedback).LinkInputSig(TriList.BooleanInput[fb.Cue.Number]);
// else if (fb is IntFeedback)
// (fb as IntFeedback).LinkInputSig(TriList.UShortInput[fb.Cue.Number]);
// else if (fb is StringFeedback)
// (fb as StringFeedback).LinkInputSig(TriList.StringInput[fb.Cue.Number]);
// }
// }
// ShowCurrentPresentationSourceUi();
// }
// /// <summary>
// /// Reveals the basic UI for the current device
// /// </summary>
// protected virtual void ShowCurrentPresentationSourceUi()
// {
// }
// /// <summary>
// /// Hides the UI for the current device and calls for a feedback signal cleanup
// /// </summary>
// protected virtual void HideCurrentPresentationSourceUi()
// {
// }
// /// <summary>
// ///
// /// </summary>
// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args)
// {
// SetControlSource(args.NewSource);
// }
// /// <summary>
// ///
// /// </summary>
// void CurrentRoom_AudioDeviceWillChange(object sender, EssentialsRoomAudioDeviceChangeEventArgs e)
// {
// SwapAudioDeviceControls(e.OldDevice, e.NewDevice);
// }
// /// <summary>
// /// Panel event handler
// /// </summary>
// void Tsw_AnySigChange(object currentDevice, SigEventArgs args)
// {
// // plugged in commands
// object uo = args.Sig.UserObject;
// if (uo is Action<bool>)
// (uo as Action<bool>)(args.Sig.BoolValue);
// else if (uo is Action<ushort>)
// (uo as Action<ushort>)(args.Sig.UShortValue);
// else if (uo is Action<string>)
// (uo as Action<string>)(args.Sig.StringValue);
// }
// }
//}

View File

@@ -1,164 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.UI;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//namespace PepperDash.Essentials
//{
// //*****************************************************************************
// /// <summary>
// /// Wrapper class for subpage reference list. Contains helpful methods to get at the various signal groupings
// /// and to get individual signals using an index and a join.
// /// </summary>
// public class SourceListSubpageReferenceList : SubpageReferenceList
// {
// public const uint SmartObjectJoin = 3801;
// Action<uint> SourceSelectCallback;
// EssentialsRoom CurrentRoom;
// public SourceListSubpageReferenceList(BasicTriListWithSmartObject tl,
// Action<uint> sourceSelectCallback)
// : base(tl, SmartObjectJoin, 3, 1, 3)
// {
// SourceSelectCallback = sourceSelectCallback;
// }
// void SetSourceList(Dictionary<uint, SourceListItem> dict)
// {
// // Iterate all positions, including ones missing from the dict.
// var max = dict.Keys.Max();
// for (uint i = 1; i <= max; i++)
// {
// // Add the source if it's in the dict
// if (dict.ContainsKey(i))
// {
// Items.Add(new SourceListSubpageReferenceListItem(i, dict[i], this, SourceSelectCallback));
// // Plug the callback function into the buttons
// }
// // Blank the line
// else
// Items.Add(new SourceListSubpageReferenceListItem(i, null,
// this, SourceSelectCallback));
// }
// Count = (ushort)max;
// }
// /// <summary>
// /// Links the SRL to the Room's PresentationSourceChange event for updating of the UI
// /// </summary>
// /// <param name="room"></param>
// public void AttachToRoom(EssentialsRoom room)
// {
// CurrentRoom = room;
// SetSourceList(room.Sources);
// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange;
// CurrentRoom.PresentationSourceChange += CurrentRoom_PresentationSourceChange;
// SetPresentationSourceFb(CurrentRoom.CurrentPresentationSource);
// }
// /// <summary>
// /// Disconnects the SRL from a Room's PresentationSourceChange
// /// </summary>
// public void DetachFromCurrentRoom()
// {
// ClearPresentationSourceFb(CurrentRoom.CurrentPresentationSource);
// if(CurrentRoom != null)
// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange;
// CurrentRoom = null;
// }
// // Handler to route source changes into list feedback
// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args)
// {
// Debug.Console(2, "SRL received source change");
// ClearPresentationSourceFb(args.OldSource);
// SetPresentationSourceFb(args.NewSource);
// }
// void ClearPresentationSourceFb(IPresentationSource source)
// {
// if (source == null) return;
// var oldSourceItem = (SourceListSubpageReferenceListItem)Items.FirstOrDefault(
// i => ((SourceListSubpageReferenceListItem)i).SourceDevice == source);
// if (oldSourceItem != null)
// oldSourceItem.ClearFeedback();
// }
// void SetPresentationSourceFb(SourceListItem source)
// {
// if (source == null) return;
// // Now set the new source to light up
// var newSourceItem = (SourceListSubpageReferenceListItem)Items.FirstOrDefault(
// i => ((SourceListSubpageReferenceListItem)i).SourceDevice == source);
// if (newSourceItem != null)
// newSourceItem.SetFeedback();
// }
// }
// public class SourceListSubpageReferenceListItem : SubpageReferenceListItem
// {
// public readonly IPresentationSource SourceDevice;
// public const uint ButtonPressJoin = 1;
// public const uint SelectedFeedbackJoin = 2;
// public const uint ButtonTextJoin = 1;
// public const uint IconNameJoin = 2;
// public SourceListSubpageReferenceListItem(uint index, SourceListItem srcDeviceItem,
// SubpageReferenceList owner, Action<uint> sourceSelectCallback)
// : base(index, owner)
// {
// if (srcDeviceItem == null) throw new ArgumentNullException("srcDeviceItem");
// if (owner == null) throw new ArgumentNullException("owner");
// if (sourceSelectCallback == null) throw new ArgumentNullException("sourceSelectCallback");
// SourceDevice = srcDeviceItem;
// var nameSig = owner.StringInputSig(index, ButtonTextJoin);
// // Should be able to see if there is not enough buttons right here
// if (nameSig == null)
// {
// Debug.Console(0, "ERROR: Item {0} does not exist on source list SRL", index);
// return;
// }
// nameSig.StringValue = srcDeviceItem.Name;
// owner.StringInputSig(index, IconNameJoin).StringValue = srcDeviceItem.Icon;
// // Assign a source selection action to the appropriate button's UserObject - on release
// owner.GetBoolFeedbackSig(index, ButtonPressJoin).UserObject = new Action<bool>(b =>
// { if (!b) sourceSelectCallback(index); });
// // hook up the video icon
// var videoDev = srcDeviceItem as IAttachVideoStatus;
// if (videoDev != null)
// {
// var status = videoDev.GetVideoStatuses();
// if (status != null)
// {
// Debug.Console(1, "Linking {0} video status to SRL", videoDev.Key);
// videoDev.GetVideoStatuses().VideoSyncFeedback.LinkInputSig(owner.BoolInputSig(index, 3));
// }
// }
// }
// public void SetFeedback()
// {
// Owner.BoolInputSig(Index, SelectedFeedbackJoin).BoolValue = true;
// }
// public void ClearFeedback()
// {
// Owner.BoolInputSig(Index, SelectedFeedbackJoin).BoolValue = false;
// }
// }
//}

View File

@@ -155,28 +155,11 @@
<Compile Include="Bridges\JoinMaps\GlsOccupancySensorBaseJoinMap.cs" />
<Compile Include="Bridges\JoinMaps\SystemMonitorJoinMap.cs" />
<Compile Include="Bridges\SystemMonitorBridge.cs" />
<Compile Include="Configuration ORIGINAL\Builders\TPConfig.cs" />
<Compile Include="Configuration ORIGINAL\Configuration.cs" />
<Compile Include="Configuration ORIGINAL\ConfigurationHelpers.cs" />
<Compile Include="Configuration ORIGINAL\ConfigTieLine.cs" />
<Compile Include="Configuration ORIGINAL\Factories\CommFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\RemoteFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\DeviceMonitorFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\DmFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\TouchpanelFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\PcFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\REMOVE DiscPlayerFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\MAYBE SetTopBoxFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\DisplayFactory.cs" />
<Compile Include="Configuration ORIGINAL\Factories\FactoryHelper.cs" />
<Compile Include="Factory\DeviceFactory.cs" />
<Compile Include="Devices\Amplifier.cs" />
<Compile Include="Devices\DiscPlayer\OppoExtendedBdp.cs" />
<Compile Include="Devices\NUMERIC AppleTV.cs" />
<Compile Include="ControlSystem.cs" />
<Compile Include="Factory\UiDeviceFactory.cs" />
<Compile Include="Fusion\EssentialsHuddleVtc1FusionController.cs" />
<Compile Include="REMOVE EssentialsApp.cs" />
<Compile Include="HttpApiHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Room\Config\EssentialsDualDisplayRoomPropertiesConfig.cs" />
@@ -206,14 +189,7 @@
<Compile Include="Room\Types\EssentialsDualDisplayRoom.cs" />
<Compile Include="Room\Types\EssentialsHuddleVtc1Room.cs" />
<Compile Include="Room\Types\EssentialsNDisplayRoomBase.cs" />
<Compile Include="Room\Types\EssentialsPresentationRoom.cs" />
<Compile Include="Room\Config\EssentialsRoomConfig.cs" />
<Compile Include="FOR REFERENCE UI\PageControllers\DevicePageControllerBase.cs" />
<Compile Include="FOR REFERENCE UI\PageControllers\PageControllerLaptop.cs" />
<Compile Include="FOR REFERENCE UI\PageControllers\PageControllerLargeDvd.cs" />
<Compile Include="FOR REFERENCE UI\PageControllers\PageControllerLargeSetTopBoxGeneric.cs" />
<Compile Include="FOR REFERENCE UI\PageControllers\LargeTouchpanelControllerBase.cs" />
<Compile Include="FOR REFERENCE UI\Panels\SmartGraphicsTouchpanelControllerBase.cs" />
<Compile Include="UIDrivers\Environment Drivers\EssentialsEnvironmentDriver.cs" />
<Compile Include="UIDrivers\Environment Drivers\EssentialsLightingDriver.cs" />
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
@@ -243,12 +219,22 @@
<Compile Include="AppServer\MobileControlSystemController.cs" />
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
<Compile Include="FOR REFERENCE UI\Panels\REMOVE UiCue.cs" />
<Compile Include="FOR REFERENCE UI\SRL\SourceListSubpageReferenceList.cs" />
<Compile Include="Room\Types\EssentialsHuddleSpaceRoom.cs" />
<Compile Include="UI\EssentialsTouchpanelController.cs" />
<Compile Include="UI\SubpageReferenceListSourceItem.cs" />
<None Include="app.config" />
<EmbeddedResource Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Example Configuration\EssentialsHuddleVtc1Room\configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Example Configuration\SIMPLBridging\configurationFile-dmps3300c-avRouting.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="Example Configuration\SIMPLBridging\SIMPLBridgeExample_configurationFile.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<None Include="Properties\ControlSystem.cfg" />
<EmbeddedResource Include="SGD\PepperDash Essentials iPad.sgd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -270,9 +256,6 @@
<Name>Essentials Devices Common</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="FOR REFERENCE UI\OTHER\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>

View File

@@ -1,69 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using Crestron.SimplSharp;
//using Crestron.SimplSharp.CrestronIO;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.CrestronThread;
//using Crestron.SimplSharpPro.Diagnostics;
//using Crestron.SimplSharpPro.EthernetCommunication;
//using Crestron.SimplSharpPro.UI;
//using Crestron.SimplSharpPro.DM;
//using Crestron.SimplSharpPro.DM.Cards;
//using Crestron.SimplSharpPro.DM.Endpoints.Transmitters;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Core.Devices;
////using PepperDash.Essentials.Core.Devices.Dm;
//using PepperDash.Essentials.Displays;
////using PepperDash.Essentials.Core.Http;
//using PepperDash.Core;
//namespace PepperDash.Essentials
//{
// public class EssentialsApp
// {
// public string ConfigPath { get; set; }
// public Dictionary<string, Room> Rooms { get; private set; }
// //EssentialsHttpApiHandler ApiHandler; // MOVE ???????????????????
// public EssentialsApp(CrestronControlSystem cs)
// {
// // Use a fake license manager for now
// Global.LicenseManager = PepperDash.Essentials.License.MockEssentialsLicenseManager.Manager;
// // ---------------------------------- Make this configurable
// //var server = Global.HttpConfigServer;
// //server.Start(8081, "HttpConfigServer");
// //ConfigPath = string.Format(@"\NVRAM\Program{0}\EssentialsConfiguration.json",
// // InitialParametersClass.ApplicationNumber);
// //ApiHandler = new EssentialsHttpApiHandler(server, ConfigPath, @"\HTML\presets\lists\");
// Debug.Console(0, "\r\r--------------------CONFIG BEGIN--------------------\r");
// Configuration.Initialize(cs);
// Configuration.ReadConfiguration(ConfigPath);
// Debug.Console(0, "\r--------------------CONFIG END----------------------\r\r");
// }
// }
// public class ResponseToken
// {
// public string Token { get; private set; }
// public DateTime Expires { get; private set; }
// public bool IsExpired { get { return Expires < DateTime.Now; } }
// public ResponseToken(int timeoutMinutes)
// {
// Expires = DateTime.Now.AddMinutes(timeoutMinutes);
// Token = Guid.NewGuid().ToString();
// }
// }
//}

View File

@@ -1,437 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.Room.Config;
//namespace PepperDash.Essentials
//{
// public class EssentialsPresentationRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange
// {
// public event EventHandler<VolumeDeviceChangeEventArgs> CurrentVolumeDeviceChange;
// public event SourceInfoChangeHandler CurrentSingleSourceChange;
// public event SourceInfoChangeHandler CurrentDisplay1SourceChange;
// public event SourceInfoChangeHandler CurrentDisplay2SourceChange;
// protected override Func<bool> OnFeedbackFunc { get {
// return () => (CurrentSingleSourceInfo != null
// && CurrentSingleSourceInfo.Type != eSourceListItemType.Off)
// || (Display1SourceInfo != null
// && Display1SourceInfo.Type != eSourceListItemType.Off)
// || (Display2SourceInfo != null
// && Display2SourceInfo.Type != eSourceListItemType.Off); } }
// protected override Func<bool> IsWarmingFeedbackFunc { get { return () =>false;; } }
// protected override Func<bool> IsCoolingFeedbackFunc { get { return () => false; } }
// public EssentialsPresentationRoomPropertiesConfig Config { get; private set; }
// public Dictionary<uint, IRoutingSinkNoSwitching> Displays { get; private set; }
// public IRoutingSinkNoSwitching DefaultAudioDevice { get; private set; }
// public IBasicVolumeControls DefaultVolumeControls { get; private set; }C:\Working Directories\PD\essentials\PepperDashEssentials\Room\Types\EssentialsPresentationRoom.cs
// /// <summary>
// /// The config name of the source list
// /// </summary>
// public string SourceListKey { get; set; }
// /// <summary>
// /// If room is off, enables power on to last source. Default true
// /// </summary>
// public bool EnablePowerOnToLastSource { get; set; }
// string LastSourceKey;
// public enum eVideoRoutingMode
// {
// SelectSourceSelectDisplay, SourceToAllDisplays
// }
// public eVideoRoutingMode VideoRoutingMode { get; set; }
// public enum eAudioRoutingMode
// {
// AudioFollowsLastVideo, SelectAudioFromDisplay
// }
// /// <summary>
// ///
// /// </summary>
// public IBasicVolumeControls CurrentVolumeControls
// {
// get { return _CurrentAudioDevice; }
// set
// {
// if (value == _CurrentAudioDevice) return;
// var oldDev = _CurrentAudioDevice;
// // derigister this room from the device, if it can
// if (oldDev is IInUseTracking)
// (oldDev as IInUseTracking).InUseTracker.RemoveUser(this, "audio");
// var handler = CurrentVolumeDeviceChange;
// if (handler != null)
// CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.WillChange));
// _CurrentAudioDevice = value;
// if (handler != null)
// CurrentVolumeDeviceChange(this, new VolumeDeviceChangeEventArgs(oldDev, value, ChangeType.DidChange));
// // register this room with new device, if it can
// if (_CurrentAudioDevice is IInUseTracking)
// (_CurrentAudioDevice as IInUseTracking).InUseTracker.AddUser(this, "audio");
// }
// }
// IBasicVolumeControls _CurrentAudioDevice;
// /// <summary>
// /// The SourceListItem last run - containing names and icons. The complex setter is
// /// to add/remove this room to the source's InUseTracking, if it is capable
// /// </summary>
// public SourceListItem CurrentSingleSourceInfo
// {
// get { return _CurrentSingleSourceInfo; }
// private set
// {
// if (value == _CurrentSingleSourceInfo) return;
// var handler = CurrentSingleSourceChange;
// // remove from in-use tracker, if so equipped
// if(_CurrentSingleSourceInfo != null && _CurrentSingleSourceInfo.SourceDevice is IInUseTracking)
// (_CurrentSingleSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control");
// if (handler != null)
// handler(this, _CurrentSingleSourceInfo, ChangeType.WillChange);
// _CurrentSingleSourceInfo = value;
// // add to in-use tracking
// if (_CurrentSingleSourceInfo != null && _CurrentSingleSourceInfo.SourceDevice is IInUseTracking)
// (_CurrentSingleSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control");
// if (handler != null)
// handler(this, _CurrentSingleSourceInfo, ChangeType.DidChange);
// }
// }
// SourceListItem _CurrentSingleSourceInfo;
// public SourceListItem Display1SourceInfo
// {
// get { return _Display1SourceInfo; }
// set
// {
// if (value == _Display1SourceInfo) return;
// var handler = CurrentDisplay1SourceChange;
// if (handler != null)
// handler(this, _Display1SourceInfo, ChangeType.WillChange);
// _Display1SourceInfo = value;
// if (handler != null)
// handler(this, _Display1SourceInfo, ChangeType.DidChange);
// }
// }
// SourceListItem _Display1SourceInfo;
// public SourceListItem Display2SourceInfo
// {
// get { return _Display2SourceInfo; }
// set
// {
// if (value == _Display2SourceInfo) return;
// var handler = CurrentDisplay2SourceChange;
// if (handler != null)
// handler(this, _Display2SourceInfo, ChangeType.WillChange);
// _Display2SourceInfo = value;
// if (handler != null)
// handler(this, _Display2SourceInfo, ChangeType.DidChange);
// }
// }
// SourceListItem _Display2SourceInfo;
// /// <summary>
// /// If an audio dialer is available for this room
// /// </summary>
// public bool HasAudioDialer { get { return false; } }
// /// <summary>
// ///
// /// </summary>
// /// <param name="key"></param>
// /// <param name="name"></param>
// public EssentialsPresentationRoom(string key, string name,
// Dictionary<uint, IRoutingSinkNoSwitching> displays,
// IBasicVolumeWithFeedback defaultVolume, EssentialsPresentationRoomPropertiesConfig config)
// : base(key, name)
// {
// Config = config;
// Displays = displays;
// DefaultVolumeControls = defaultVolume;
// CurrentVolumeControls = defaultVolume;
// //DefaultAudioDevice = defaultAudio;
// //if (defaultAudio is IBasicVolumeControls)
// // DefaultVolumeControls = defaultAudio as IBasicVolumeControls;
// //else if (defaultAudio is IHasVolumeDevice)
// // DefaultVolumeControls = (defaultAudio as IHasVolumeDevice).VolumeDevice;
// SourceListKey = "default";
// EnablePowerOnToLastSource = true;
// }
// /// <summary>
// /// Run the same source to all destinations
// /// </summary>
// /// <param name="sourceItem"></param>
// public void RouteSourceToAllDestinations(SourceListItem sourceItem)
// {
// if (Config.Volumes.Master != null)
// {
// var audioDev = DeviceManager.GetDeviceForKey(Config.Volumes.Master.DeviceKey);
// if (audioDev is IBasicVolumeWithFeedback)
// {
// }
// }
// foreach (var display in Displays.Values)
// {
// if (sourceItem != null)
// DoVideoRoute(sourceItem.SourceKey, display.Key);
// else
// DoVideoRoute("$off", display.Key);
// }
// Display1SourceInfo = sourceItem;
// Display2SourceInfo = sourceItem;
// CurrentSingleSourceInfo = sourceItem;
// OnFeedback.FireUpdate();
// }
// public void SourceToDisplay1(SourceListItem sourceItem)
// {
// DoVideoRoute(sourceItem.SourceKey, Displays[1].Key);
// Display1SourceInfo = sourceItem;
// OnFeedback.FireUpdate();
// }
// public void SourceToDisplay2(SourceListItem sourceItem)
// {
// DoVideoRoute(sourceItem.SourceKey, Displays[2].Key);
// Display2SourceInfo = sourceItem;
// OnFeedback.FireUpdate();
// }
// /// <summary>
// /// Basic source -> destination routing
// /// </summary>
// void DoVideoRoute(string sourceKey, string destinationKey)
// {
// new CTimer(o =>
// {
// var dest = DeviceManager.GetDeviceForKey(destinationKey) as IRoutingSinkNoSwitching;
// if (dest == null)
// {
// Debug.Console(1, this, "Cannot route. Destination '{0}' not found", destinationKey);
// return;
// }
// // off is special case
// if (sourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase))
// {
// dest.ReleaseRoute();
// if (dest is IPower)
// (dest as IPower).PowerOff();
// return;
// }
// var source = DeviceManager.GetDeviceForKey(sourceKey) as IRoutingOutputs;
// if (source == null)
// {
// Debug.Console(1, this, "Cannot route. Source '{0}' not found", sourceKey);
// return;
// }
// dest.ReleaseAndMakeRoute(source, eRoutingSignalType.Video);
// }, 0);
// }
// /// <summary>
// ///
// /// </summary>
// protected override void EndShutdown()
// {
// RunRouteAction("roomoff");
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="routeKey"></param>
// public void RunRouteAction(string routeKey)
// {
// RunRouteAction(routeKey, null);
// }
// /// <summary>
// /// Gets a source from config list SourceListKey and dynamically build and executes the
// /// route or commands
// /// </summary>
// /// <param name="name"></param>
// public void RunRouteAction(string routeKey, Action successCallback)
// {
// // Run this on a separate thread
// new CTimer(o =>
// {
// Debug.Console(1, this, "Run room action '{0}'", routeKey);
// var dict = ConfigReader.ConfigObject.GetSourceListForKey(SourceListKey);
// if(dict == null)
// {
// Debug.Console(1, this, "WARNING: Config source list '{0}' not found", SourceListKey);
// return;
// }
// // Try to get the list item by it's string key
// if (!dict.ContainsKey(routeKey))
// {
// Debug.Console(1, this, "WARNING: No item '{0}' found on config list '{1}'",
// routeKey, SourceListKey);
// return;
// }
// var item = dict[routeKey];
// //Debug.Console(2, this, "Action {0} has {1} steps",
// // item.SourceKey, item.RouteList.Count);
// // Let's run it
// if (routeKey.ToLower() != "roomoff")
// LastSourceKey = routeKey;
// foreach (var route in item.RouteList)
// {
// // if there is a $defaultAll on route, run two separate
// if (route.DestinationKey.Equals("$defaultAll", StringComparison.OrdinalIgnoreCase))
// {
// var tempAudio = new SourceRouteListItem
// {
// DestinationKey = "$defaultDisplay",
// SourceKey = route.SourceKey,
// Type = eRoutingSignalType.Video
// };
// DoRoute(tempAudio);
// var tempVideo = new SourceRouteListItem
// {
// DestinationKey = "$defaultAudio",
// SourceKey = route.SourceKey,
// Type = eRoutingSignalType.Audio
// };
// DoRoute(tempVideo);
// continue;
// }
// else
// DoRoute(route);
// }
// // Set volume control on room, using default if non provided
// IBasicVolumeControls volDev = null;
// // Handle special cases for volume control
// if (string.IsNullOrEmpty(item.VolumeControlKey)
// || item.VolumeControlKey.Equals("$defaultAudio", StringComparison.OrdinalIgnoreCase))
// volDev = DefaultVolumeControls;
// //else if (item.VolumeControlKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
// // volDev = DefaultDisplay as IBasicVolumeControls;
// // Or a specific device, probably rarely used.
// else
// {
// var dev = DeviceManager.GetDeviceForKey(item.VolumeControlKey);
// if (dev is IBasicVolumeControls)
// volDev = dev as IBasicVolumeControls;
// else if (dev is IHasVolumeDevice)
// volDev = (dev as IHasVolumeDevice).VolumeDevice;
// }
// CurrentVolumeControls = volDev;
// // store the name and UI info for routes
// if (item.SourceKey != null)
// CurrentSingleSourceInfo = item;
// // And finally, set the "control". This will trigger event
// //CurrentControlDevice = DeviceManager.GetDeviceForKey(item.SourceKey) as Device;
// OnFeedback.FireUpdate();
// // report back when done
// if (successCallback != null)
// successCallback();
// }, 0); // end of CTimer
// }
// /// <summary>
// /// Will power the room on with the last-used source
// /// </summary>
// public void PowerOnToDefaultOrLastSource()
// {
// if (!EnablePowerOnToLastSource || LastSourceKey == null)
// return;
// RunRouteAction(LastSourceKey);
// }
// /// <summary>
// /// Does what it says
// /// </summary>
// public override void SetDefaultLevels()
// {
// Debug.Console(0, this, "SetDefaultLevels not implemented");
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="route"></param>
// /// <returns></returns>
// bool DoRoute(SourceRouteListItem route)
// {
// IRoutingSinkNoSwitching dest = null;
// if (route.DestinationKey.Equals("$defaultaudio", StringComparison.OrdinalIgnoreCase))
// dest = DefaultAudioDevice;
// //else if (route.DestinationKey.Equals("$defaultDisplay", StringComparison.OrdinalIgnoreCase))
// // dest = DefaultDisplay;
// else
// dest = DeviceManager.GetDeviceForKey(route.DestinationKey) as IRoutingSinkNoSwitching;
// if (dest == null)
// {
// Debug.Console(1, this, "Cannot route, unknown destination '{0}'", route.DestinationKey);
// return false;
// }
// if (route.SourceKey.Equals("$off", StringComparison.OrdinalIgnoreCase))
// {
// dest.ReleaseRoute();
// if (dest is IPower)
// (dest as IPower).PowerOff();
// }
// else
// {
// var source = DeviceManager.GetDeviceForKey(route.SourceKey) as IRoutingOutputs;
// if (source == null)
// {
// Debug.Console(1, this, "Cannot route unknown source '{0}' to {1}", route.SourceKey, route.DestinationKey);
// return false;
// }
// dest.ReleaseAndMakeRoute(source, route.Type);
// }
// return true;
// }
// public override void RoomVacatedForTimeoutPeriod(object o)
// {
// //Implement this
// }
// }
//}

View File

@@ -1,13 +1,53 @@
# Pepperdash Essentials
## RELEASE PROCESS CONTROLLED BY JENKINS CI PROCESS
# PepperDash Essentials Framework (c) 2020
#### How to merge
## License
Provided under MIT license
## Overview
PepperDash Essentials is an open source Crestron framework that can be configured as a standalone program capable of running a wide variety of system designs and can also be utilized as a plug-in architecture to augment other Simpl# Pro and Simpl Windows programs.
Essentials Framework is a collection of C# / Simpl# Pro libraries that can be utilized in several different manners. It is currently operating as a 100% configuration-driven system, and can be extended to add different workflows and behaviors, either through the addition of further device "types" or via the plug-in mechanism. The framework is a collection of "things" that are all related and interconnected, but in general do not have dependencies on each other.
## Minimum Requirements
- Essentials Framework runs on any Crestron 3-series processor or Crestron's VC-4 platform.
- To edit and compile the source, Microsoft Visual Studio 2008 Professional with SP1 is required.
- Crestron's Simpl# Plugin is also required (must be obtained from Crestron).
## Dependencies
The PepperDash.Core SIMPL# library is required. It is referenced as a submodule and will be automatically checked out when cloning this repo if set to recurse submodules. This allows different builds of the PepperDash.Core library to be reference by checking out the desired submodule commit.
## Utilization
Essentials was originally conceptualized as a standalone application for running control system logic entirely in Simpl# Pro. It is primarily designed around accomplishing this goal, but during development, it became obvious that it could easily be leveraged to also serve as a partner application to one or more SIMPL Windows programs.
Utilization of Essentials Framework falls into the following categories:
1. Standalone Control System Application for controlling one or more rooms
2. Partner Application to a SIMPL Windows program. This allows for several useful advantages
- Dynamic device instantiation. Devices can be defined in configuration and instantiated at runtime and then "bridged" to a SIMPL Windows program via EISC.
- Advanced logic. Some logic operations that cannot be affectively accomplished in SIMPL Windows (ex. JSON/XML serialization/deserialization, database operations, etc.) can be done in the Simpl# Pro environment and the necessary input and output "bridged" to a SIMPL Windows program via EISC.
3. Hybrid Application that may contain elements of both standalone control and SIMPL partner application integration.
- There may be a use case where a device can only be defined in a single application, but that device may need to be interacted with from multiple applications. The device can be defined in an Essentials application, interacted with in that application and also "bridged" to one or more SIMPL Windows applications.
## Documentation
For detailed documentation, follow this [LINK](https://github.com/PepperDash/EssentialsFramework/wiki) to the Wiki.
## How-To (Getting Started)
To help understand Essentials Framework, we recommend starting with the current [Example Build]() and loading it to a Crestron 3-Series processor.
1. First, load the PepperDashEssentials.cpz to the processor in program slot 1 and start the program.
2. On first boot, the Essentials Application will build the necessary configuration folder structure in the User/Program1/ path.
3. Load the ExampleEssentialsConfigurationFile.json to the User/Program1/ folder.
4. Reset the program via console (progreset -p:1). The program will load the example configuration file.
5. Launch the EssentialsExampleXpanel.vtz project. You can interact with the program (which uses simulated device logic to emulate a real commercial huddle room with presentation, audio and video calling capabilities).
6. Via console, you can run the (**devlist:1**) command to get some insight into what has been loaded from the configuration file into the system . This will print the basic device information in the form of ["key"] "Name". The "key" value is what we can use to interact with each device uniquely.
7. Run the command (**devprops:1 display-1**). This will print the real-time property values of the device with key "display-1".
8. Run the command (**devmethods:1 display-1**). This will print the public methods available for the device with key "display-1".
9. Run the command (**devjson:1 {"deviceKey":"display-1","methodName":"PowerOn", "params": []}**). This will call the method PowerOn() on the device with key "display-1".
- Make changes
- Build
- Test on your system
- Commit and push to essentials
- Curse a whole lot when you try to figure out how to then get developments all synced up

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 KiB

BIN
docs/arch-high-level.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

BIN
docs/arch-overview.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 KiB

BIN
docs/arch-table.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
docs/lifecycle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

View File

@@ -7,7 +7,7 @@ using Crestron.SimplSharp.Net.Http;
using PepperDash.Core;
using PepperDash.Core.DebugThings;
namespace PepperDash.Essentials.Devices.Common
namespace PepperDash.Essentials.Core
{
public class GenericHttpClient : Device, IBasicCommunication
{

View File

@@ -1,127 +0,0 @@
using Crestron.SimplSharpPro;
namespace PepperDash.Essentials.Core
{
public static class CommonBoolCue
{
public static readonly Cue Power = new Cue("Power", 101, eCueType.Bool);
public static readonly Cue PowerOn = new Cue("PowerOn", 102, eCueType.Bool);
public static readonly Cue PowerOff = new Cue("PowerOff", 103, eCueType.Bool);
public static readonly Cue HasPowerFeedback = new Cue("HasPowerFeedback", 101, eCueType.Bool);
public static readonly Cue PowerOnFeedback = new Cue("PowerOnFeedback", 102, eCueType.Bool);
public static readonly Cue IsOnlineFeedback = new Cue("IsOnlineFeedback", 104, eCueType.Bool);
public static readonly Cue IsWarmingUp = new Cue("IsWarmingUp", 105, eCueType.Bool);
public static readonly Cue IsCoolingDown = new Cue("IsCoolingDown", 106, eCueType.Bool);
public static readonly Cue Dash = new Cue("Dash", 109, eCueType.Bool);
public static readonly Cue Digit0 = new Cue("Digit0", 110, eCueType.Bool);
public static readonly Cue Digit1 = new Cue("Digit1", 111, eCueType.Bool);
public static readonly Cue Digit2 = new Cue("Digit2", 112, eCueType.Bool);
public static readonly Cue Digit3 = new Cue("Digit3", 113, eCueType.Bool);
public static readonly Cue Digit4 = new Cue("Digit4", 114, eCueType.Bool);
public static readonly Cue Digit5 = new Cue("Digit5", 115, eCueType.Bool);
public static readonly Cue Digit6 = new Cue("Digit6", 116, eCueType.Bool);
public static readonly Cue Digit7 = new Cue("Digit7", 117, eCueType.Bool);
public static readonly Cue Digit8 = new Cue("Digit8", 118, eCueType.Bool);
public static readonly Cue Digit9 = new Cue("Digit9", 119, eCueType.Bool);
public static readonly Cue KeypadMisc1 = new Cue("KeypadMisc1", 120, eCueType.Bool);
public static readonly Cue KeypadMisc2 = new Cue("KeypadMisc2", 121, eCueType.Bool);
public static readonly Cue NumericEnter = new Cue("Enter", 122, eCueType.Bool);
public static readonly Cue ChannelUp = new Cue("ChannelUp", 123, eCueType.Bool);
public static readonly Cue ChannelDown = new Cue("ChannelDown", 124, eCueType.Bool);
public static readonly Cue Last = new Cue("Last", 125, eCueType.Bool);
public static readonly Cue OpenClose = new Cue("OpenClose", 126, eCueType.Bool);
public static readonly Cue Subtitle = new Cue("Subtitle", 127, eCueType.Bool);
public static readonly Cue Audio = new Cue("Audio", 128, eCueType.Bool);
public static readonly Cue Info = new Cue("Info", 129, eCueType.Bool);
public static readonly Cue Menu = new Cue("Menu", 130, eCueType.Bool);
public static readonly Cue DeviceMenu = new Cue("DeviceMenu", 131, eCueType.Bool);
public static readonly Cue Return = new Cue("Return", 132, eCueType.Bool);
public static readonly Cue Back = new Cue("Back", 133, eCueType.Bool);
public static readonly Cue Exit = new Cue("Exit", 134, eCueType.Bool);
public static readonly Cue Clear = new Cue("Clear", 135, eCueType.Bool);
public static readonly Cue List = new Cue("List", 136, eCueType.Bool);
public static readonly Cue Guide = new Cue("Guide", 137, eCueType.Bool);
public static readonly Cue Am = new Cue("Am", 136, eCueType.Bool);
public static readonly Cue Fm = new Cue("Fm", 137, eCueType.Bool);
public static readonly Cue Up = new Cue("Up", 138, eCueType.Bool);
public static readonly Cue Down = new Cue("Down", 139, eCueType.Bool);
public static readonly Cue Left = new Cue("Left", 140, eCueType.Bool);
public static readonly Cue Right = new Cue("Right", 141, eCueType.Bool);
public static readonly Cue Select = new Cue("Select", 142, eCueType.Bool);
public static readonly Cue SmartApps = new Cue("SmartApps", 143, eCueType.Bool);
public static readonly Cue Dvr = new Cue("Dvr", 144, eCueType.Bool);
public static readonly Cue Play = new Cue("Play", 145, eCueType.Bool);
public static readonly Cue Pause = new Cue("Pause", 146, eCueType.Bool);
public static readonly Cue Stop = new Cue("Stop", 147, eCueType.Bool);
public static readonly Cue ChapNext = new Cue("ChapNext", 148, eCueType.Bool);
public static readonly Cue ChapPrevious = new Cue("ChapPrevious", 149, eCueType.Bool);
public static readonly Cue Rewind = new Cue("Rewind", 150, eCueType.Bool);
public static readonly Cue Ffwd = new Cue("Ffwd", 151, eCueType.Bool);
public static readonly Cue Replay = new Cue("Replay", 152, eCueType.Bool);
public static readonly Cue Advance = new Cue("Advance", 153, eCueType.Bool);
public static readonly Cue Record = new Cue("Record", 154, eCueType.Bool);
public static readonly Cue Red = new Cue("Red", 155, eCueType.Bool);
public static readonly Cue Green = new Cue("Green", 156, eCueType.Bool);
public static readonly Cue Yellow = new Cue("Yellow", 157, eCueType.Bool);
public static readonly Cue Blue = new Cue("Blue", 158, eCueType.Bool);
public static readonly Cue Home = new Cue("Home", 159, eCueType.Bool);
public static readonly Cue PopUp = new Cue("PopUp", 160, eCueType.Bool);
public static readonly Cue PageUp = new Cue("PageUp", 161, eCueType.Bool);
public static readonly Cue PageDown = new Cue("PageDown", 162, eCueType.Bool);
public static readonly Cue Search = new Cue("Search", 163, eCueType.Bool);
public static readonly Cue Setup = new Cue("Setup", 164, eCueType.Bool);
public static readonly Cue RStep = new Cue("RStep", 165, eCueType.Bool);
public static readonly Cue FStep = new Cue("FStep", 166, eCueType.Bool);
public static readonly Cue IsConnected = new Cue("IsConnected", 281, eCueType.Bool);
public static readonly Cue IsOk = new Cue("IsOk", 282, eCueType.Bool);
public static readonly Cue InWarning = new Cue("InWarning", 283, eCueType.Bool);
public static readonly Cue InError = new Cue("InError", 284, eCueType.Bool);
public static readonly Cue StatusUnknown = new Cue("StatusUnknown", 285, eCueType.Bool);
public static readonly Cue VolumeUp = new Cue("VolumeUp", 401, eCueType.Bool);
public static readonly Cue VolumeDown = new Cue("VolumeDown", 402, eCueType.Bool);
public static readonly Cue MuteOn = new Cue("MuteOn", 403, eCueType.Bool);
public static readonly Cue MuteOff = new Cue("MuteOff", 404, eCueType.Bool);
public static readonly Cue MuteToggle = new Cue("MuteToggle", 405, eCueType.Bool);
public static readonly Cue ShowVolumeButtons = new Cue("ShowVolumeButtons", 406, eCueType.Bool);
public static readonly Cue ShowVolumeSlider = new Cue("ShowVolumeSlider", 407, eCueType.Bool);
public static readonly Cue Hdmi1 = new Cue("Hdmi1", 451, eCueType.Bool);
public static readonly Cue Hdmi2 = new Cue("Hdmi2", 452, eCueType.Bool);
public static readonly Cue Hdmi3 = new Cue("Hdmi3", 453, eCueType.Bool);
public static readonly Cue Hdmi4 = new Cue("Hdmi4", 454, eCueType.Bool);
public static readonly Cue Hdmi5 = new Cue("Hdmi5", 455, eCueType.Bool);
public static readonly Cue Hdmi6 = new Cue("Hdmi6", 456, eCueType.Bool);
public static readonly Cue DisplayPort1 = new Cue("DisplayPort1", 457, eCueType.Bool);
public static readonly Cue DisplayPort2 = new Cue("DisplayPort2", 458, eCueType.Bool);
public static readonly Cue Dvi1 = new Cue("Dvi1", 459, eCueType.Bool);
public static readonly Cue Dvi2 = new Cue("Dvi2", 460, eCueType.Bool);
public static readonly Cue Video1 = new Cue("Video1", 461, eCueType.Bool);
public static readonly Cue Video2 = new Cue("Video2", 462, eCueType.Bool);
public static readonly Cue Component1 = new Cue("Component1", 463, eCueType.Bool);
public static readonly Cue Component2 = new Cue("Component2", 464, eCueType.Bool);
public static readonly Cue Vga1 = new Cue("Vga1", 465, eCueType.Bool);
public static readonly Cue Vga2 = new Cue("Vga2", 466, eCueType.Bool);
public static readonly Cue Rgb1 = new Cue("Rgb1", 467, eCueType.Bool);
public static readonly Cue Rgb2 = new Cue("Rgb2", 468, eCueType.Bool);
public static readonly Cue Antenna = new Cue("Antenna", 469, eCueType.Bool);
public static readonly Cue InCall = new Cue("InCall", 501, eCueType.Bool);
}
public static class CommonIntCue
{
public static readonly Cue MainVolumeLevel = new Cue("MainVolumeLevel", 401, eCueType.Int);
public static readonly Cue MainVolumeLevelFeedback = new Cue("MainVolumeLevelFeedback", 401, eCueType.Int);
}
public static class CommonStringCue
{
public static readonly Cue IpConnectionsText = new Cue("IpConnectionsText", 9999, eCueType.String);
}
}

View File

@@ -1,98 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
namespace PepperDash.Essentials.Core
{
/// <summary>
/// Encapsulates a string-named, joined and typed command to a device
/// </summary>
[Obsolete()]
public class DevAction
{
public Cue Cue { get; private set; }
public Action<object> Action { get; private set; }
public DevAction(Cue cue, Action<object> action)
{
Cue = cue;
Action = action;
}
}
public enum eCueType
{
Bool, Int, String, Serial, Void, Other
}
/// <summary>
/// The Cue class is a container to represent a name / join number / type for simplifying
/// commands coming into devices.
/// </summary>
public class Cue
{
public string Name { get; private set; }
public uint Number { get; private set; }
public eCueType Type { get; private set; }
public Cue(string name, uint join, eCueType type)
{
Name = name;
Number = join;
Type = type;
}
/// <summary>
/// Override that prints out the cue's data
/// </summary>
public override string ToString()
{
return string.Format("{0} Cue '{1}'-{2}", Type, Name, Number);
}
///// <summary>
///// Returns a new Cue with JoinNumber offset
///// </summary>
//public Cue GetOffsetCopy(uint offset)
//{
// return new Cue(Name, Number + offset, Type);
//}
/// <summary>
/// Helper method to create a Cue of Bool type
/// </summary>
/// <returns>Cue</returns>
public static Cue BoolCue(string name, uint join)
{
return new Cue(name, join, eCueType.Bool);
}
/// <summary>
/// Helper method to create a Cue of ushort type
/// </summary>
/// <returns>Cue</returns>
public static Cue UShortCue(string name, uint join)
{
return new Cue(name, join, eCueType.Int);
}
/// <summary>
/// Helper method to create a Cue of string type
/// </summary>
/// <returns>Cue</returns>
public static Cue StringCue(string name, uint join)
{
return new Cue(name, join, eCueType.String);
}
public static readonly Cue DefaultBoolCue = new Cue("-none-", 0, eCueType.Bool);
public static readonly Cue DefaultIntCue = new Cue("-none-", 0, eCueType.Int);
public static readonly Cue DefaultStringCue = new Cue("-none-", 0, eCueType.String);
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.Core
{
public enum AudioChangeType
{
Mute, Volume
}
public class AudioChangeEventArgs
{
public AudioChangeType ChangeType { get; private set; }
public IBasicVolumeControls AudioDevice { get; private set; }
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
{
ChangeType = changeType;
AudioDevice = device;
}
}
}

View File

@@ -26,9 +26,7 @@ namespace PepperDash.Essentials.Core
// get the properties and set them into a new collection of NameType wrappers
var props = t.GetProperties().Select(p => new PropertyNameType(p, t));
var feedbacks = source.Feedbacks.OrderBy(x => x.Type);
var feedbacks = source.Feedbacks;
if (feedbacks != null)
{
Debug.Console(0, source, "\n\nAvailable feedbacks:");

View File

@@ -120,26 +120,5 @@ namespace PepperDash.Essentials.Core
Key, IrPort.IRDriverFileNameByIRDriverId(IrPortUid), command);
}
///// <summary>
///// When fed a dictionary of uint, string, will return UOs for each item,
///// attached to this IrOutputPort
///// </summary>
///// <param name="numStringDict"></param>
///// <returns></returns>
//public List<CueActionPair> GetUOsForIrCommands(Dictionary<Cue, string> numStringDict)
//{
// var funcs = new List<CueActionPair>(numStringDict.Count);
// foreach (var kvp in numStringDict)
// {
// // Have to assign these locally because of kvp's scope
// var cue = kvp.Key;
// var command = kvp.Value;
// funcs.Add(new BoolCueActionPair(cue, b => this.PressRelease(command, b)));
// }
// return funcs;
//}
}
}

View File

@@ -1,56 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.Core
{
//public interface IVolumeFunctions
//{
// BoolCueActionPair VolumeUpCueActionPair { get; }
// BoolCueActionPair VolumeDownCueActionPair { get; }
// BoolCueActionPair MuteToggleCueActionPair { get; }
//}
//public interface IVolumeTwoWay : IVolumeFunctions
//{
// IntFeedback VolumeLevelFeedback { get; }
// UShortCueActionPair VolumeLevelCueActionPair { get; }
// BoolFeedback IsMutedFeedback { get; }
//}
///// <summary>
/////
///// </summary>
//public static class IFunctionListExtensions
//{
// public static string GetFunctionsConsoleList(this IHasCueActionList device)
// {
// var sb = new StringBuilder();
// var list = device.CueActionList;
// foreach (var cap in list)
// sb.AppendFormat("{0,-15} {1,4} {2}\r", cap.Cue.Name, cap.Cue.Number, cap.GetType().Name);
// return sb.ToString();
// }
//}
public enum AudioChangeType
{
Mute, Volume
}
public class AudioChangeEventArgs
{
public AudioChangeType ChangeType { get; private set; }
public IBasicVolumeControls AudioDevice { get; private set; }
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
{
ChangeType = changeType;
AudioDevice = device;
}
}
}

View File

@@ -1,105 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//namespace PepperDash.Essentials.Core
//{
// public abstract class IRDisplayBase : DisplayBase, IHasCueActionList
// {
// public IrOutputPortController IrPort { get; private set; }
// /// <summary>
// /// Default to 200ms
// /// </summary>
// public ushort IrPulseTime { get; set; }
// bool _PowerIsOn;
// bool _IsWarmingUp;
// bool _IsCoolingDown;
// /// <summary>
// /// FunctionList is pre-defined to have power commands.
// /// </summary>
// public IRDisplayBase(string key, string name, IROutputPort port, string irDriverFilepath)
// : base(key, name)
// {
// IrPort = new IrOutputPortController("ir-" + key, port, irDriverFilepath);
// IrPulseTime = 200;
// WarmupTime = 7000;
// CooldownTime = 10000;
// CueActionList = new List<CueActionPair>
// {
// new BoolCueActionPair(CommonBoolCue.Power, b=> PowerToggle()),
// new BoolCueActionPair(CommonBoolCue.PowerOn, b=> PowerOn()),
// new BoolCueActionPair(CommonBoolCue.PowerOff, b=> PowerOff()),
// };
// }
// public override void PowerOn()
// {
// if (!PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown)
// {
// _IsWarmingUp = true;
// IsWarmingUpFeedback.FireUpdate();
// // Fake power-up cycle
// WarmupTimer = new CTimer(o =>
// {
// _IsWarmingUp = false;
// _PowerIsOn = true;
// IsWarmingUpFeedback.FireUpdate();
// PowerIsOnFeedback.FireUpdate();
// }, WarmupTime);
// }
// IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime);
// }
// public override void PowerOff()
// {
// // If a display has unreliable-power off feedback, just override this and
// // remove this check.
// if (PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown)
// {
// _IsCoolingDown = true;
// _PowerIsOn = false;
// PowerIsOnFeedback.FireUpdate();
// IsCoolingDownFeedback.FireUpdate();
// // Fake cool-down cycle
// CooldownTimer = new CTimer(o =>
// {
// _IsCoolingDown = false;
// IsCoolingDownFeedback.FireUpdate();
// }, CooldownTime);
// }
// IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime);
// }
// public override void PowerToggle()
// {
// // Not sure how to handle the feedback, but we should default to power off fb.
// // Does this need to trigger feedback??
// _PowerIsOn = false;
// IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime);
// }
// #region IFunctionList Members
// public List<CueActionPair> CueActionList
// {
// get;
// private set;
// }
// #endregion
// protected override Func<bool> PowerIsOnOutputFunc { get { return () => _PowerIsOn; } }
// protected override Func<bool> IsCoolingDownOutputFunc { get { return () => _IsCoolingDown; } }
// protected override Func<bool> IsWarmingUpOutputFunc { get { return () => _IsWarmingUp; } }
// public override void ExecuteSwitch(object selector)
// {
// IrPort.Pulse((string)selector, IrPulseTime);
// }
// }
//}

View File

@@ -30,15 +30,4 @@ namespace PepperDash.Essentials.Core.Ethernet
() => CrestronEthernetHelper.GetEthernetParameter(
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, 0));
}
public static class EthernetCue
{
public static readonly Cue LinkActive = Cue.BoolCue("LinkActive", 1);
public static readonly Cue DhcpActive = Cue.BoolCue("DhcpActive", 2);
public static readonly Cue Hostname = Cue.StringCue("Hostname", 1);
public static readonly Cue IpAddress0 = Cue.StringCue("IpAddress0", 2);
public static readonly Cue SubnetMask0 = Cue.StringCue("SubnetMask0", 3);
public static readonly Cue DefaultGateway0 = Cue.StringCue("DefaultGateway0", 4);
}
}

View File

@@ -55,7 +55,7 @@ namespace PepperDash.Essentials.Core
else if (typeName == "ceniodigin104")
{
var control = CommFactory.GetControlPropertiesConfig(dc);
var ipid = control.CresnetIdInt;
var ipid = control.IpIdInt;
return new CenIoDigIn104Controller(key, name, new Crestron.SimplSharpPro.GeneralIO.CenIoDi104(ipid, Global.ControlSystem));
}

View File

@@ -19,8 +19,6 @@ namespace PepperDash.Essentials.Core
public override bool BoolValue { get { return _BoolValue; } }
bool _BoolValue;
public override eCueType Type { get { return eCueType.Bool; } }
/// <summary>
/// Fake value to be used in test mode
/// </summary>
@@ -45,12 +43,6 @@ namespace PepperDash.Essentials.Core
ValueFunc = valueFunc;
}
//public BoolFeedback(Cue cue, Func<bool> valueFunc)
// : base(cue)
//{
// if (cue == null) throw new ArgumentNullException("cue");
// ValueFunc = valueFunc;
//}
public override void FireUpdate()
{

View File

@@ -20,10 +20,6 @@ namespace PepperDash.Essentials.Core
public virtual string StringValue { get { return ""; } }
public virtual string SerialValue { get { return ""; } }
//public Cue Cue { get; private set; }
public abstract eCueType Type { get; }
/// <summary>
/// Feedbacks can be put into test mode for simulation of events without real data.
/// Using JSON debugging methods and the Set/ClearTestValue methods, we can simulate
@@ -46,10 +42,7 @@ namespace PepperDash.Essentials.Core
Key = key;
}
//protected Feedback(Cue cue)
//{
// Cue = cue;
//}
/// <summary>
/// Clears test mode and fires update.

View File

@@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Core
int _IntValue;
public ushort UShortValue { get { return (ushort)_IntValue; } }
public override eCueType Type { get { return eCueType.Int; } }
//public override eCueType Type { get { return eCueType.Int; } }
public int TestValue { get; private set; }
@@ -34,13 +34,6 @@ namespace PepperDash.Essentials.Core
ValueFunc = valueFunc;
}
//public IntFeedback(Cue cue, Func<int> valueFunc)
// : base(cue)
//{
// if (cue == null) throw new ArgumentNullException("cue");
// ValueFunc = valueFunc;
//}
public override void FireUpdate()
{
var newValue = InTestMode ? TestValue : ValueFunc.Invoke();

View File

@@ -16,7 +16,7 @@ namespace PepperDash.Essentials.Core
public override string SerialValue { get { return _SerialValue; } }
string _SerialValue;
public override eCueType Type { get { return eCueType.Serial; } }
//public override eCueType Type { get { return eCueType.Serial; } }
/// <summary>
/// Used in testing. Set/Clear functions

View File

@@ -12,8 +12,6 @@ namespace PepperDash.Essentials.Core
public override string StringValue { get { return _StringValue; } } // ValueFunc.Invoke(); } }
string _StringValue;
public override eCueType Type { get { return eCueType.String; } }
/// <summary>
/// Used in testing. Set/Clear functions
/// </summary>
@@ -36,13 +34,7 @@ namespace PepperDash.Essentials.Core
ValueFunc = valueFunc;
}
//public StringFeedback(Cue cue, Func<string> valueFunc)
// : base(cue)
//{
// if (cue == null) throw new ArgumentNullException("cue");
// ValueFunc = valueFunc;
//}
public override void FireUpdate()
{

View File

@@ -1,10 +1,16 @@
using Crestron.SimplSharp;
using System;
using System.Text.RegularExpressions;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronIO;
using Crestron.SimplSharp.CrestronDataStore;
using Crestron.SimplSharpPro;
//using PepperDash.Essentials.Core.Http;
using PepperDash.Core;
using PepperDash.Essentials.License;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
namespace PepperDash.Essentials.Core
@@ -45,6 +51,81 @@ namespace PepperDash.Essentials.Core
FilePathPrefix = prefix;
}
static string _AssemblyVersion;
/// <summary>
/// Gets the Assembly Version of Essentials
/// </summary>
/// <returns>The Assembly Version at Runtime</returns>
public static string AssemblyVersion
{
get
{
return _AssemblyVersion;
}
private set
{
_AssemblyVersion = value;
}
}
/// <summary>
/// Sets the Assembly version to the version of the Essentials Library
/// </summary>
/// <param name="assemblyVersion"></param>
public static void SetAssemblyVersion(string assemblyVersion)
{
AssemblyVersion = assemblyVersion;
}
/// <summary>
/// Checks to see if the running version meets or exceed the minimum specified version. For beta versions (0.xx.yy), will always return true.
/// </summary>
/// <param name="minimumVersion">Minimum specified version in format of xx.yy.zz</param>
/// <returns>Returns true if the running version meets or exceeds the minimum specified version</returns>
public static bool IsRunningMinimumVersionOrHigher(string minimumVersion)
{
Debug.Console(2, "Comparing running version '{0}' to minimum version '{1}'", AssemblyVersion, minimumVersion);
var runtimeVersion = Regex.Match(AssemblyVersion, @"^(\d*).(\d*).(\d*)$");
var runtimeVersionMajor = Int16.Parse(runtimeVersion.Groups[1].Value);
var runtimeVersionMinor = Int16.Parse(runtimeVersion.Groups[2].Value);
var runtimeVersionBuild = Int16.Parse(runtimeVersion.Groups[3].Value);
// Check for beta build version
if (runtimeVersionMajor == 0)
{
Debug.Console(2, "Running Beta Build. Bypassing Dependency Check.");
return true;
}
var minVersion = Regex.Match(minimumVersion, @"^(\d*).(\d*).(\d*)$");
if(!minVersion.Success)
{
Debug.Console(2, "minimumVersion String does not match format xx.yy.zz");
return false;
}
var minVersionMajor = Int16.Parse(minVersion.Groups[1].Value);
var minVersionMinor = Int16.Parse(minVersion.Groups[2].Value);
var minVersionBuild = Int16.Parse(minVersion.Groups[3].Value);
if (minVersionMajor > runtimeVersionMajor)
return false;
if (minVersionMinor > runtimeVersionMinor)
return false;
if (minVersionBuild > runtimeVersionBuild)
return false;
return true;
}
static Global()
{
// Fire up CrestronDataStoreStatic

View File

@@ -31,7 +31,9 @@ namespace PepperDash.Essentials.Core
}
}
/// <summary>
/// Base class for join maps
/// </summary>
public abstract class JoinMapBase
{
/// <summary>

View File

@@ -83,16 +83,4 @@ namespace PepperDash.Essentials.License
return string.Format("License Status: {0}", IsValid ? "Valid" : "Not Valid");
}
}
public class EssentialsLicenseManager
{
}
public class LicenseCue
{
public static Cue LicenseIsValid = Cue.BoolCue("LicenseIsValid", 15991);
public static Cue LicenseMessage = Cue.StringCue("LicenseMessage", 15991);
}
}

View File

@@ -111,8 +111,9 @@
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="Comm and IR\CecPortController.cs" />
<Compile Include="Comm and IR\GenericComm.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="Config\Essentials\ConfigUpdater.cs" />
<Compile Include="Config\Essentials\ConfigReader.cs" />
<Compile Include="Config\Essentials\ConfigWriter.cs" />
@@ -153,16 +154,15 @@
<Compile Include="Microphone Privacy\MicrophonePrivacyController.cs" />
<Compile Include="Microphone Privacy\MicrophonePrivacyControllerConfig.cs" />
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
<Compile Include="Comm and IR\CommFactory.cs" />
<Compile Include="Comm and IR\CommunicationExtras.cs" />
<Compile Include="Comm and IR\ComSpecJsonConverter.cs" />
<Compile Include="Comm and IR\ConsoleCommMockDevice.cs" />
<Compile Include="Comm and IR\IRPortHelper.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" />
<Compile Include="Config\DeviceConfig.cs" />
<Compile Include="Constants\CommonCues.cs" />
<Compile Include="Devices\DisplayUiConstants.cs" />
<Compile Include="Devices\IUsageTracking.cs" />
<Compile Include="Devices\DeviceJsonApi.cs" />
@@ -199,14 +199,13 @@
<Compile Include="Monitoring\StatusMonitorCollection.cs" />
<Compile Include="Monitoring\CrestronGenericBaseCommunicationMonitor.cs" />
<Compile Include="Monitoring\StatusMonitorBase.cs" />
<Compile Include="Monitoring\Interfaces and things.cs" />
<Compile Include="Monitoring\Interfaces.cs" />
<Compile Include="Monitoring\GenericCommunicationMonitor.cs" />
<Compile Include="Devices\NewInterfaces.cs" />
<Compile Include="Devices\AudioInterfaces.cs" />
<Compile Include="Devices\IAttachVideoStatusExtensions.cs" />
<Compile Include="Devices\IHasFeedbacks.cs" />
<Compile Include="Devices\SmartObjectBaseTypes.cs" />
<Compile Include="Devices\PresentationDeviceType.cs" />
<Compile Include="Display\DELETE IRDisplayBase.cs" />
<Compile Include="Display\MockDisplay.cs" />
<Compile Include="Ethernet\EthernetStatistics.cs" />
<Compile Include="Global\Global.cs" />
@@ -229,25 +228,20 @@
<Compile Include="SmartObjects\SmartObjectNumeric.cs" />
<Compile Include="SmartObjects\SmartObjectDynamicList.cs" />
<Compile Include="SmartObjects\SmartObjectDPad.cs" />
<Compile Include="SmartObjects\SmartObjectHelper.cs" />
<Compile Include="SmartObjects\SmartObjectHelperBase.cs" />
<Compile Include="Routing\TieLine.cs" />
<Compile Include="Timers\CountdownTimer.cs" />
<Compile Include="Touchpanels\CrestronTouchpanelPropertiesConfig.cs" />
<Compile Include="Touchpanels\Interfaces.cs" />
<Compile Include="Touchpanels\Keyboards\HabaneroKeyboardController.cs" />
<Compile Include="Touchpanels\MOVED LargeTouchpanelControllerBase.cs" />
<Compile Include="Touchpanels\TriListExtensions.cs" />
<Compile Include="Touchpanels\MOVED UIControllers\DevicePageControllerBase.cs" />
<Compile Include="UI PageManagers\BlurayPageManager.cs" />
<Compile Include="UI PageManagers\SetTopBoxThreePanelPageManager.cs" />
<Compile Include="UI PageManagers\SinglePageManager.cs" />
<Compile Include="UI PageManagers\PageManager.cs" />
<Compile Include="UI PageManagers\SetTopBoxTwoPanelPageManager.cs" />
<Compile Include="VideoStatus\VideoStatusOutputs.cs" />
<Compile Include="VideoStatus\VideoStatusCues.cs" />
<Compile Include="Cues and DevAction\Cues.cs" />
<Compile Include="Comm and IR\ComPortController.cs" />
<Compile Include="Config\Comm and IR\ComPortController.cs" />
<Compile Include="Crestron\CrestronGenericBaseDevice.cs" />
<Compile Include="DeviceControlsParentInterfaces\IPresentationSource.cs" />
<Compile Include="Devices\DeviceManager.cs" />
@@ -255,23 +249,17 @@
<Compile Include="Display\DisplayBase.cs" />
<Compile Include="Feedbacks\FeedbackBase.cs" />
<Compile Include="Room\Room.cs" />
<Compile Include="Room\RoomCues.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SourceListSubpageReferenceList.cs" />
<Compile Include="Touchpanels\ModalDialog.cs" />
<Compile Include="Touchpanels\SmartGraphicsTouchpanelControllerBase.cs" />
<Compile Include="TriListBridges\HandlerBridge.cs" />
<Compile Include="Devices\FIND HOMES Interfaces.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SigHelper.cs" />
<Compile Include="REMOVE SigId.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceList.cs" />
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceListItem.cs" />
<None Include="app.config" />
<None Include="Properties\ControlSystem.cfg" />
</ItemGroup>
<ItemGroup>
<Folder Include="bin\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>

View File

@@ -4,4 +4,4 @@
[assembly: AssemblyCompany("PepperDash Technology Corp")]
[assembly: AssemblyProduct("PepperDashEssentialsBase")]
[assembly: AssemblyCopyright("Copyright © Ppperdash 2019")]
[assembly: AssemblyVersion("1.4.2.*")]
[assembly: AssemblyVersion("1.4.0.*")]

View File

@@ -1,37 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharpPro;
//namespace PepperDash.Essentials.Core
//{
// public class SigId
// {
// public uint Number { get; private set; }
// public eSigType Type { get; private set; }
// public SigId(eSigType type, uint number)
// {
// Type = type;
// Number = number;
// }
// public override bool Equals(object id)
// {
// if (id is SigId)
// {
// var sigId = id as SigId;
// return this.Number == sigId.Number && this.Type == sigId.Type;
// }
// else
// return base.Equals(id);
// }
// public override int GetHashCode()
// {
// return base.GetHashCode();
// }
// }
//}

View File

@@ -1,61 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials
{
public static class RoomCue
{
// Commands/
//bools
public static readonly Cue RoomOnToggle = Cue.BoolCue("RoomOnToggle", 2001);
public static readonly Cue RoomOn = Cue.BoolCue("RoomOn", 2002);
public static readonly Cue RoomOff = Cue.BoolCue("RoomOff", 2003);
public static readonly Cue VolumeUp = Cue.BoolCue("VolumeUp", 2011);
public static readonly Cue VolumeDown = Cue.BoolCue("VolumeDown", 2012);
public static readonly Cue VolumeDefault = Cue.BoolCue("VolumeDefault", 2013);
public static readonly Cue MuteToggle = Cue.BoolCue("MuteToggle", 2014);
public static readonly Cue MuteOn = Cue.BoolCue("MuteOn", 2015);
public static readonly Cue MuteOff = Cue.BoolCue("MuteOff", 2016);
//ushorts
public static readonly Cue SelectSourceByNumber = Cue.UShortCue("SelectSourceByNumber", 2001);
public static readonly Cue VolumeLevel = Cue.UShortCue("VolumeLevel", 2011);
public static readonly Cue VolumeLevelPercent = Cue.UShortCue("VolumeLevelPercent", 2012);
//strings
public static readonly Cue SelectSourceByKey = Cue.StringCue("SelectSourceByKey", 2001);
// Outputs
//Bools
public static readonly Cue RoomIsOn = Cue.BoolCue("RoomIsOn", 2002);
public static readonly Cue RoomIsOnStandby = Cue.BoolCue("RoomIsOnStandby", 2003);
public static readonly Cue RoomIsWarmingUp = Cue.BoolCue("RoomIsWarmingUp", 2004);
public static readonly Cue RoomIsCoolingDown = Cue.BoolCue("RoomIsCoolingDown", 2005);
public static readonly Cue RoomIsOccupied = Cue.BoolCue("RoomIsOccupied", 2006);
//Ushorts
public static readonly Cue SourcesCount = Cue.UShortCue("SourcesCount", 2001);
public static readonly Cue CurrentSourceNumber = Cue.UShortCue("CurrentSourceNumber", 2002);
public static readonly Cue CurrentSourceType = Cue.UShortCue("CurrentSourceType", 2003);
//Strings
public static readonly Cue CurrentSourceKey = Cue.StringCue("CurrentSourceKey", 2001);
public static readonly Cue CurrentSourceName = Cue.StringCue("CurrentSourceName", 2002);
public static readonly Cue VolumeLevelText = Cue.StringCue("VolumeLevelText", 2012);
public static readonly Cue Key = Cue.StringCue("RoomKey", 2021);
public static readonly Cue Name = Cue.StringCue("RoomName", 2022);
public static readonly Cue Description = Cue.StringCue("Description", 2023);
public static readonly Cue HelpMessage = Cue.StringCue("HelpMessage", 2024);
//Special
public static readonly Cue Source = new Cue("Source", 0, eCueType.Other);
}
}

View File

@@ -1,128 +0,0 @@
using System;
using System.Linq;
using System.Collections.Generic;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core;
namespace PepperDash.Essentials.Core
{
public class SmartObjectHelper
{
public static uint GetSmartObjectJoinForTypeAndObject(uint sourceType, uint typeOffset)
{
return (uint)(10000 + (sourceType * 100) + typeOffset);
}
//public static void DumpSmartObject(SmartGraphicsTouchpanelControllerBase tp, uint id)
//{
// if (!tp.TriList.SmartObjects.Contains(id))
// {
// Debug.Console(0, tp, "does not contain smart object ID {0}", id);
// return;
// }
// var so = tp.TriList.SmartObjects[id];
// Debug.Console(0, tp, "Signals for smart object ID {0}", id);
// Debug.Console(0, "BooleanInput -------------------------------");
// foreach (var s in so.BooleanInput)
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
// Debug.Console(0, "UShortInput -------------------------------");
// foreach (var s in so.UShortInput)
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
// Debug.Console(0, "StringInput -------------------------------");
// foreach (var s in so.StringInput)
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
// Debug.Console(0, "BooleanOutput -------------------------------");
// foreach (var s in so.BooleanOutput)
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
// Debug.Console(0, "UShortOutput -------------------------------");
// foreach (var s in so.UShortOutput)
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
// Debug.Console(0, "StringOutput -------------------------------");
// foreach (var s in so.StringOutput)
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
//}
///// <summary>
///// Inserts/removes the appropriate UO's onto sigs
///// </summary>
///// <param name="triList"></param>
///// <param name="smartObjectId"></param>
///// <param name="deviceUserObjects"></param>
///// <param name="state"></param>
//public static void LinkNumpadWithUserObjects(BasicTriListWithSmartObject triList,
// uint smartObjectId, List<CueActionPair> deviceUserObjects, Cue Misc_1Function, Cue Misc_2Function, bool state)
//{
// var sigDict = new Dictionary<string, Cue>
// {
// { "0", CommonBoolCue.Digit0 },
// { "1", CommonBoolCue.Digit1 },
// { "2", CommonBoolCue.Digit2 },
// { "3", CommonBoolCue.Digit3 },
// { "4", CommonBoolCue.Digit4 },
// { "5", CommonBoolCue.Digit5 },
// { "6", CommonBoolCue.Digit6 },
// { "7", CommonBoolCue.Digit7 },
// { "8", CommonBoolCue.Digit8 },
// { "9", CommonBoolCue.Digit9 },
// { "Misc_1", Misc_1Function },
// { "Misc_2", Misc_2Function },
// };
// LinkSmartObjectWithUserObjects(triList, smartObjectId, deviceUserObjects, sigDict, state);
//}
//public static void LinkDpadWithUserObjects(BasicTriListWithSmartObject triList,
// uint smartObjectId, List<CueActionPair> deviceUserObjects, bool state)
//{
// var sigDict = new Dictionary<string, Cue>
// {
// { "Up", CommonBoolCue.Up },
// { "Down", CommonBoolCue.Down },
// { "Left", CommonBoolCue.Left },
// { "Right", CommonBoolCue.Right },
// { "OK", CommonBoolCue.Select },
// };
// LinkSmartObjectWithUserObjects(triList, smartObjectId, deviceUserObjects, sigDict, state);
//}
///// <summary>
///// MOVE TO HELPER CLASS
///// </summary>
///// <param name="triList"></param>
///// <param name="smartObjectId"></param>
///// <param name="deviceUserObjects"></param>
///// <param name="smartObjectSigMap"></param>
///// <param name="state"></param>
//public static void LinkSmartObjectWithUserObjects(BasicTriListWithSmartObject triList,
// uint smartObjectId, List<CueActionPair> deviceUserObjects, Dictionary<string, Cue> smartObjectSigMap, bool state)
//{
// // Hook up smart objects if applicable
// if (triList.SmartObjects.Contains(smartObjectId))
// {
// var smartObject = triList.SmartObjects[smartObjectId];
// foreach (var kvp in smartObjectSigMap)
// {
// if (smartObject.BooleanOutput.Contains(kvp.Key))
// {
// if (state)
// {
// // look for a user object and if so, attach/detach it to/from the sig.
// var uo = deviceUserObjects.FirstOrDefault(ao => ao.Cue == kvp.Value);
// if (uo != null)
// smartObject.BooleanOutput[kvp.Key].UserObject = uo;
// }
// else
// smartObject.BooleanOutput[kvp.Key].UserObject = null;
// }
// else
// Debug.Console(0, "Smart object {0} does not contain Sig {1}", smartObject.ID, kvp.Key);
// }
// }
// else
// Debug.Console(0, "ERROR Smart object {0} not found on {1:X2}", smartObjectId, triList.ID);
//}
}
}

View File

@@ -1,275 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using PepperDash.Core;
//namespace PepperDash.Essentials.Core
//{
// /// <summary>
// ///
// /// </summary>
// public class LargeTouchpanelControllerBase : SmartGraphicsTouchpanelControllerBase
// {
// public string PresentationShareButtonInVideoText = "Share";
// public string PresentationShareButtonNotInVideoText = "Presentation";
// SourceListSubpageReferenceList SourceSelectSRL;
// DevicePageControllerBase CurrentPresentationSourcePageController;
// public LargeTouchpanelControllerBase(string key, string name,
// BasicTriListWithSmartObject triList, string sgdFilePath)
// : base(key, name, triList, sgdFilePath)
// {
// }
// public override bool CustomActivate()
// {
// var baseSuccess = base.CustomActivate();
// if (!baseSuccess) return false;
// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n =>
// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); });
// var lm = Global.LicenseManager;
// if (lm != null)
// {
// lm.LicenseIsValid.LinkInputSig(TriList.BooleanInput[UiCue.ShowLicensed.Number]);
// //others
// }
// // Temp things -----------------------------------------------------------------------
// TriList.StringInput[UiCue.SplashMessage.Number].StringValue = SplashMessage;
// //------------------------------------------------------------------------------------
// // Initialize initial view
// ShowSplashOrMain();
// return true;
// }
// /// <summary>
// /// In Essentials, this should NEVER be called, since it's a one-room solution
// /// </summary>
// protected override void HideRoomUI()
// {
// // UI Cleanup here????
// //SwapAudioDeviceControls(CurrentRoom.CurrentAudioDevice, null);
// //CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange;
// CurrentRoom.IsCoolingDown.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange;
// CurrentRoom.IsWarmingUp.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange;
// SourceSelectSRL.DetachFromCurrentRoom();
// }
// /// <summary>
// /// Ties this panel controller to the Room and gets updates.
// /// </summary>
// protected override void ShowRoomUI()
// {
// Debug.Console(1, this, "connecting to system '{0}'", CurrentRoom.Key);
// TriList.StringInput[RoomCue.Name.Number].StringValue = CurrentRoom.Name;
// TriList.StringInput[RoomCue.Description.Number].StringValue = CurrentRoom.Description;
// CurrentRoom.IsCoolingDown.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange;
// CurrentRoom.IsWarmingUp.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange;
// CurrentRoom.IsCoolingDown.OutputChange += CurrentRoom_IsCoolingDown_OutputChange;
// CurrentRoom.IsWarmingUp.OutputChange += CurrentRoom_IsWarmingUp_OutputChange;
// SourceSelectSRL.AttachToRoom(CurrentRoom);
// }
// void CurrentRoom_IsCoolingDown_OutputChange(object sender, EventArgs e)
// {
// Debug.Console(2, this, "Received room in cooldown={0}", CurrentRoom.IsCoolingDown.BoolValue);
// if (CurrentRoom.IsCoolingDown.BoolValue) // When entering cooldown
// {
// // Do we need to check for an already-running cooldown - like in the case of room switches?
// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power Off", "Power", "Please wait, shutting down",
// "", "", CurrentRoom.CooldownTime, true, b =>
// {
// ShowSplashOrMain();
// });
// }
// }
// void CurrentRoom_IsWarmingUp_OutputChange(object sender, EventArgs e)
// {
// Debug.Console(2, this, "Received room in warmup={0}", CurrentRoom.IsWarmingUp.BoolValue);
// if (CurrentRoom.IsWarmingUp.BoolValue) // When entering warmup
// {
// // Do we need to check for an already-running cooldown - like in the case of room switches?
// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power On", "Power", "Please wait, powering on",
// "", "", CurrentRoom.WarmupTime, false, b =>
// {
// // Reveal sources - or has already been done behind modal
// });
// }
// }
// // Handler for source change events.
// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args)
// {
// // Put away the old source and set up the new source.
// Debug.Console(2, this, "Received source change={0}", args.NewSource != null ? args.NewSource.Key : "none");
// // If we're in tech, don't switch screen modes. Add any other modes we may want to switch away from
// // inside the if below.
// if (MainMode == eMainModeType.Splash)
// setMainMode(eMainModeType.Presentation);
// SetControlSource(args.NewSource);
// }
// //***********************************************************************
// //** UI Manipulation
// //***********************************************************************
// /// <summary>
// /// Shows the splash page or the main presentation page, depending on config setting
// /// </summary>
// void ShowSplashOrMain()
// {
// if (UsesSplashPage)
// setMainMode(eMainModeType.Splash);
// else
// setMainMode(eMainModeType.Presentation);
// }
// /// <summary>
// /// Switches between main modes
// /// </summary>
// void setMainMode(eMainModeType mode)
// {
// MainMode = mode;
// switch (mode)
// {
// case eMainModeType.Presentation:
// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = true;
// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = true;
// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = true;
// ShowCurrentPresentationSourceUi();
// break;
// case eMainModeType.Splash:
// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = false;
// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = true;
// HideCurrentPresentationSourceUi();
// break;
// case eMainModeType.Tech:
// new ModalDialog(TriList).PresentModalTimerDialog(1, "Tech page", "Info",
// "Tech page will be here soon!<br>I promise",
// "Bueno!", "", 0, false, null);
// MainMode = eMainModeType.Presentation;
// break;
// default:
// break;
// }
// }
// void PowerOffWithConfirmPressed()
// {
// if (!CurrentRoom.RoomIsOn.BoolValue) return;
// // Timeout or button 1 press will shut down
// var modal = new ModalDialog(TriList);
// uint seconds = CurrentRoom.UnattendedShutdownTimeMs / 1000;
// var message = string.Format("Meeting will end in {0} seconds", seconds);
// modal.PresentModalTimerDialog(2, "End Meeting", "Info", message,
// "End Meeting Now", "Cancel", CurrentRoom.UnattendedShutdownTimeMs, true,
// but => { if (but != 2) CurrentRoom.RoomOff(); });
// }
// /// <summary>
// /// Reveals the basic UI for the current device
// /// </summary>
// protected override void ShowCurrentPresentationSourceUi()
// {
// if (MainMode == eMainModeType.Splash && CurrentRoom.RoomIsOn.BoolValue)
// setMainMode(eMainModeType.Presentation);
// if (CurrentPresentationControlDevice == null)
// {
// // If system is off, do one thing
// // Otherwise, do something else - shouldn't be in this condition
// return;
// }
// // If a controller is already loaded, use it
// if (LoadedPageControllers.ContainsKey(CurrentPresentationControlDevice))
// CurrentPresentationSourcePageController = LoadedPageControllers[CurrentPresentationControlDevice];
// else
// {
// // This is by no means optimal, but for now....
// if (CurrentPresentationControlDevice.Type == PresentationSourceType.SetTopBox
// && CurrentPresentationControlDevice is IHasSetTopBoxProperties)
// CurrentPresentationSourcePageController = new PageControllerLargeSetTopBoxGeneric(TriList,
// CurrentPresentationControlDevice as IHasSetTopBoxProperties);
// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Laptop)
// CurrentPresentationSourcePageController = new PageControllerLaptop(TriList);
// // separate these...
// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Dvd)
// CurrentPresentationSourcePageController =
// new PageControllerLargeDvd(TriList, CurrentPresentationControlDevice as IHasCueActionList);
// else
// CurrentPresentationSourcePageController = null;
// // Save it.
// if (CurrentPresentationSourcePageController != null)
// LoadedPageControllers[CurrentPresentationControlDevice] = CurrentPresentationSourcePageController;
// }
// if (CurrentPresentationSourcePageController != null)
// CurrentPresentationSourcePageController.SetVisible(true);
// }
// protected override void HideCurrentPresentationSourceUi()
// {
// if (CurrentPresentationControlDevice != null && CurrentPresentationSourcePageController != null)
// CurrentPresentationSourcePageController.SetVisible(false);
// }
// void ShowHelp()
// {
// new ModalDialog(TriList).PresentModalTimerDialog(1, "Help", "Help", CurrentRoom.HelpMessage,
// "OK", "", 0, false, null);
// }
// protected void ListSmartObjects()
// {
// Debug.Console(0, this, "Smart objects IDs:");
// var list = TriList.SmartObjects.OrderBy(s => s.Key);
// foreach (var kvp in list)
// Debug.Console(0, " {0}", kvp.Key);
// }
// public override List<CueActionPair> FunctionList
// {
// get
// {
// return new List<CueActionPair>
// {
// new BoolCueActionPair(UiCue.PressSplash, b => { if(!b) setMainMode(eMainModeType.Presentation); }),
// new BoolCueActionPair(UiCue.PressRoomOffWithConfirm, b => { if(!b) PowerOffWithConfirmPressed(); }),
// new BoolCueActionPair(UiCue.PressModePresentationShare, b => { if(!b) setMainMode(eMainModeType.Presentation); }),
// new BoolCueActionPair(UiCue.PressHelp, b => { if(!b) ShowHelp(); }),
// new BoolCueActionPair(UiCue.PressSettings, b => { if(!b) setMainMode(eMainModeType.Tech); }),
// };
// }
// }
// //#endregion
// }
//}

View File

@@ -1,244 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using PepperDash.Essentials.Core.Presets;
//using PepperDash.Core;
//namespace PepperDash.Essentials.Core
//{
// /// <summary>
// ///
// /// </summary>
// public abstract class DevicePageControllerBase
// {
// protected BasicTriListWithSmartObject TriList;
// protected List<BoolInputSig> FixedObjectSigs;
// public DevicePageControllerBase(BasicTriListWithSmartObject triList)
// {
// TriList = triList;
// }
// public void SetVisible(bool state)
// {
// foreach (var sig in FixedObjectSigs)
// {
// Debug.Console(2, "set visible {0}={1}", sig.Number, state);
// sig.BoolValue = state;
// }
// CustomSetVisible(state);
// }
// /// <summary>
// /// Add any specialized show/hide logic here - beyond FixedObjectSigs. Overriding
// /// methods do not need to call this base method
// /// </summary>
// protected virtual void CustomSetVisible(bool state)
// {
// }
// }
// //public class InterlockedDevicePageController
// //{
// // public List<uint> ObjectBoolJoins { get; set; }
// // public uint DefaultJoin { get; set; }
// //}
// ///// <summary>
// /////
// ///// </summary>
// //public interface IHasSetTopBoxProperties
// //{
// // bool HasDpad { get; }
// // bool HasPreset { get; }
// // bool HasDvr { get; }
// // bool HasNumbers { get; }
// // DevicePresetsModel PresetsModel { get; }
// // void LoadPresets(string filePath);
// //}
// public class PageControllerLaptop : DevicePageControllerBase
// {
// public PageControllerLaptop(BasicTriListWithSmartObject tl)
// : base(tl)
// {
// FixedObjectSigs = new List<BoolInputSig>
// {
// tl.BooleanInput[10092], // well
// tl.BooleanInput[11001] // Laptop info
// };
// }
// }
// ///// <summary>
// /////
// ///// </summary>
// //public class PageControllerLargeDvd : DevicePageControllerBase
// //{
// // IHasCueActionList Device;
// // public PageControllerLargeDvd(BasicTriListWithSmartObject tl, IHasCueActionList device)
// // : base(tl)
// // {
// // Device = device;
// // FixedObjectSigs = new List<BoolInputSig>
// // {
// // tl.BooleanInput[10093], // well
// // tl.BooleanInput[10411], // DVD Dpad
// // tl.BooleanInput[10412] // everything else
// // };
// // }
// // protected override void CustomSetVisible(bool state)
// // {
// // // Hook up smart objects if applicable
// // if (Device != null)
// // {
// // var uos = (Device as IHasCueActionList).CueActionList;
// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, 10411, uos, state);
// // }
// // }
// //}
// /// <summary>
// ///
// /// </summary>
// //public class PageControllerLargeSetTopBoxGeneric : DevicePageControllerBase
// //{
// // // To-DO: Add properties for component subpage names. DpadPos1, DpadPos2...
// // // Derived classes can then insert special subpages for variations on given
// // // device types. Like DirecTV vs Comcast
// // public uint DpadSmartObjectId { get; set; }
// // public uint NumberPadSmartObjectId { get; set; }
// // public uint PresetsSmartObjectId { get; set; }
// // public uint Position5TabsId { get; set; }
// // IHasSetTopBoxProperties Device;
// // DevicePresetsView PresetsView;
// // bool ShowPosition5Tabs;
// // uint CurrentVisiblePosition5Item = 1;
// // Dictionary<uint, uint> Position5SubpageJoins = new Dictionary<uint, uint>
// // {
// // { 1, 10053 },
// // { 2, 10054 }
// // };
// // public PageControllerLargeSetTopBoxGeneric(BasicTriListWithSmartObject tl, IHasSetTopBoxProperties device)
// // : base(tl)
// // {
// // Device = device;
// // DpadSmartObjectId = 10011;
// // NumberPadSmartObjectId = 10014;
// // PresetsSmartObjectId = 10012;
// // Position5TabsId = 10081;
// // bool dpad = device.HasDpad;
// // bool preset = device.HasPreset;
// // bool dvr = device.HasDvr;
// // bool numbers = device.HasNumbers;
// // uint[] joins = null;
// // if (dpad && !preset && !dvr && !numbers) joins = new uint[] { 10031, 10091 };
// // else if (!dpad && preset && !dvr && !numbers) joins = new uint[] { 10032, 10091 };
// // else if (!dpad && !preset && dvr && !numbers) joins = new uint[] { 10033, 10091 };
// // else if (!dpad && !preset && !dvr && numbers) joins = new uint[] { 10034, 10091 };
// // else if (dpad && preset && !dvr && !numbers) joins = new uint[] { 10042, 10021, 10092 };
// // else if (dpad && !preset && dvr && !numbers) joins = new uint[] { 10043, 10021, 10092 };
// // else if (dpad && !preset && !dvr && numbers) joins = new uint[] { 10044, 10021, 10092 };
// // else if (!dpad && preset && dvr && !numbers) joins = new uint[] { 10043, 10022, 10092 };
// // else if (!dpad && preset && !dvr && numbers) joins = new uint[] { 10044, 10022, 10092 };
// // else if (!dpad && !preset && dvr && numbers) joins = new uint[] { 10044, 10023, 10092 };
// // else if (dpad && preset && dvr && !numbers) joins = new uint[] { 10053, 10032, 10011, 10093 };
// // else if (dpad && preset && !dvr && numbers) joins = new uint[] { 10054, 10032, 10011, 10093 };
// // else if (dpad && !preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10011, 10093 };
// // else if (!dpad && preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10012, 10093 };
// // else if (dpad && preset && dvr && numbers)
// // {
// // joins = new uint[] { 10081, 10032, 10011, 10093 }; // special case
// // ShowPosition5Tabs = true;
// // }
// // // Project the joins into corresponding sigs.
// // FixedObjectSigs = joins.Select(u => TriList.BooleanInput[u]).ToList();
// // // Build presets
// // if (device.HasPreset)
// // {
// // PresetsView = new DevicePresetsView(tl, device.PresetsModel);
// // }
// // }
// // protected override void CustomSetVisible(bool state)
// // {
// // if (ShowPosition5Tabs)
// // {
// // // Show selected tab
// // TriList.BooleanInput[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = state;
// // var tabSo = TriList.SmartObjects[Position5TabsId];
// // if (state) // Link up the tab object
// // {
// // tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = new BoolCueActionPair(b => ShowTab(1));
// // tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = new BoolCueActionPair(b => ShowTab(2));
// // }
// // else // Disco tab object
// // {
// // tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = null;
// // tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = null;
// // }
// // }
// // // Hook up smart objects if applicable
// // if (Device is IHasCueActionList)
// // {
// // var uos = (Device as IHasCueActionList).CueActionList;
// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, DpadSmartObjectId, uos, state);
// // SmartObjectHelper.LinkNumpadWithUserObjects(TriList, NumberPadSmartObjectId,
// // uos, CommonBoolCue.Dash, CommonBoolCue.Last, state);
// // }
// // // Link, unlink presets
// // if (Device.HasPreset && state)
// // PresetsView.Attach();
// // else if (Device.HasPreset && !state)
// // PresetsView.Detach();
// // }
// // void ShowTab(uint number)
// // {
// // // Ignore re-presses
// // if (CurrentVisiblePosition5Item == number) return;
// // // Swap subpage
// // var bi = TriList.BooleanInput;
// // if(CurrentVisiblePosition5Item > 0)
// // bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = false;
// // CurrentVisiblePosition5Item = number;
// // bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = true;
// // // Show feedback on buttons
// // }
// //}
//}

View File

@@ -1,135 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.UI;
//using PepperDash.Core;
//namespace PepperDash.Essentials.Core
//{
//[Obsolete("Replaced, initially with CrestronTsr302Controller in Resissentials")]
// public class Tsr302Controller : SmartGraphicsTouchpanelControllerBase
// {
// //public override List<CueActionPair> FunctionList
// //{
// // get
// // {
// // return new List<CueActionPair>
// // {
// // };
// // }
// //}
// public Tsr302 Remote { get; private set; }
// SourceListSubpageReferenceList SourceSelectSRL;
// DevicePageControllerBase CurrentPresentationSourcePageController;
// CTimer VolumeFeedbackTimer;
// public Tsr302Controller(string key, string name, Tsr302 device, string sgdFilePath) :
// base(key, name, device, sgdFilePath)
// {
// // Base takes care of TriList
// Remote = device;
// Remote.Home.UserObject = new BoolCueActionPair(b => { if (!b) PressHome(); });
// Remote.VolumeUp.UserObject = new BoolCueActionPair(b => { if (!b) PressHome(); });
// Remote.ButtonStateChange += Remote_ButtonStateChange;
// }
// public override bool CustomActivate()
// {
// var baseSuccess = base.CustomActivate();
// if (!baseSuccess) return false;
// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n =>
// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); });
// return true;
// }
// protected override void SwapAudioDeviceControls(IVolumeFunctions oldDev, IVolumeFunctions newDev)
// {
// // stop presses
// if (oldDev != null)
// {
// ReleaseAudioPresses();
// if (oldDev is IVolumeTwoWay)
// {
// (newDev as IVolumeTwoWay).VolumeLevelFeedback.OutputChange -= VolumeLevelOutput_OutputChange;
// (oldDev as IVolumeTwoWay).VolumeLevelFeedback
// .UnlinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]);
// }
// }
// if (newDev != null)
// {
// Remote.VolumeDown.UserObject = newDev.VolumeDownCueActionPair;
// Remote.VolumeUp.UserObject = newDev.VolumeUpCueActionPair;
// Remote.Mute.UserObject = newDev.MuteToggleCueActionPair;
// if (newDev is IVolumeTwoWay)
// {
// var vOut = (newDev as IVolumeTwoWay).VolumeLevelFeedback;
// vOut.OutputChange += VolumeLevelOutput_OutputChange;
// TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number].UShortValue = vOut.UShortValue;
// }
// }
// else
// {
// Remote.VolumeDown.UserObject = null;
// Remote.VolumeUp.UserObject = null;
// Remote.Mute.UserObject = null;
// }
// base.SwapAudioDeviceControls(oldDev, newDev);
// }
// void PressHome()
// {
// }
// void VolumeLevelOutput_OutputChange(object sender, EventArgs e)
// {
// // Set level and show popup on timer
// TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number].UShortValue =
// (sender as IntFeedback).UShortValue;
// if (VolumeFeedbackTimer == null)
// {
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true;
// VolumeFeedbackTimer = new CTimer(o => {
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false;
// }, 1000);
// }
// }
// void ReleaseAudioPresses()
// {
// if (Remote.VolumeDown.UserObject is BoolCueActionPair && Remote.VolumeDown.State == eButtonState.Pressed)
// (Remote.VolumeDown.UserObject as BoolCueActionPair).Invoke(false);
// if (Remote.VolumeUp.UserObject is BoolCueActionPair && Remote.VolumeUp.State == eButtonState.Pressed)
// (Remote.VolumeUp.UserObject as BoolCueActionPair).Invoke(false);
// if (Remote.Mute.UserObject is BoolCueActionPair && Remote.Mute.State == eButtonState.Pressed)
// (Remote.Mute.UserObject as BoolCueActionPair).Invoke(false);
// }
// /// <summary>
// /// Handler. Run UO's stored in buttons
// /// </summary>
// void Remote_ButtonStateChange(GenericBase device, ButtonEventArgs args)
// {
// Debug.Console(2, this, "{0}={1}", args.Button.Name, args.Button.State);
// var uo = args.Button.UserObject as BoolCueActionPair;
// if (uo != null)
// uo.Invoke(args.NewButtonState == eButtonState.Pressed);
// }
// }
//}

View File

@@ -1,309 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//namespace PepperDash.Essentials.Core
//{
// public abstract class SmartGraphicsTouchpanelControllerBase : CrestronGenericBaseDevice
// {
// public BasicTriListWithSmartObject TriList { get; protected set; }
// public bool UsesSplashPage { get; set; }
// public string SplashMessage { get; set; }
// public bool ShowDate
// {
// set { TriList.BooleanInput[UiCue.ShowDate.Number].BoolValue = value; }
// }
// public bool ShowTime
// {
// set { TriList.BooleanInput[UiCue.ShowTime.Number].BoolValue = value; }
// }
// public abstract List<CueActionPair> FunctionList { get; }
// protected eMainModeType MainMode;
// protected IPresentationSource CurrentPresentationControlDevice;
// /// <summary>
// /// Defines the signal offset for the presentation device. Defaults to 100
// /// </summary>
// public uint PresentationControlDeviceJoinOffset { get { return 100; } }
// public enum eMainModeType
// {
// Presentation, Splash, Tech
// }
// protected string SgdFilePath;
// public EssentialsRoom CurrentRoom { get; protected set; }
// protected Dictionary<IPresentationSource, DevicePageControllerBase> LoadedPageControllers
// = new Dictionary<IPresentationSource, DevicePageControllerBase>();
// static object RoomChangeLock = new object();
// /// <summary>
// /// Constructor
// /// </summary>
// public SmartGraphicsTouchpanelControllerBase(string key, string name, BasicTriListWithSmartObject triList,
// string sgdFilePath)
// : base(key, name, triList)
// {
// TriList = triList;
// if (string.IsNullOrEmpty(key)) throw new ArgumentNullException("key");
// if (string.IsNullOrEmpty(sgdFilePath)) throw new ArgumentNullException("sgdFilePath");
// SgdFilePath = sgdFilePath;
// TriList.LoadSmartObjects(SgdFilePath);
// UsesSplashPage = true;
// SplashMessage = "Welcome";
// TriList.SigChange += Tsw_AnySigChange;
// foreach (var kvp in TriList.SmartObjects)
// kvp.Value.SigChange += this.Tsw_AnySigChange;
// }
// public override bool CustomActivate()
// {
// var baseSuccess = base.CustomActivate();
// if (!baseSuccess) return false;
// // Wiring up the buttons with UOs
// foreach (var uo in this.FunctionList)
// {
// if (uo.Cue.Number == 0) continue;
// if (uo is BoolCueActionPair)
// TriList.BooleanOutput[uo.Cue.Number].UserObject = uo;
// else if (uo is UShortCueActionPair)
// TriList.UShortOutput[uo.Cue.Number].UserObject = uo;
// else if (uo is StringCueActionPair)
// TriList.StringOutput[uo.Cue.Number].UserObject = uo;
// }
// return true;
// }
// //public void SetCurrentRoom(EssentialsRoom room)
// //{
// // if (CurrentRoom != null)
// // HideRoomUI();
// // CurrentRoom = room;
// // ShowRoomUI();
// //}
// /// <summary>
// ///
// /// </summary>
// /// <param name="room"></param>
// public void SetCurrentRoom(EssentialsRoom room)
// {
// if (CurrentRoom == room) return;
// IVolumeFunctions oldAudio = null;
// //Disconnect current room and audio device
// if (CurrentRoom != null)
// {
// HideRoomUI();
// CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange;
// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange;
// oldAudio = CurrentRoom.CurrentAudioDevice;
// }
// CurrentRoom = room;
// IVolumeFunctions newAudio = null;
// if (CurrentRoom != null)
// {
// CurrentRoom.AudioDeviceWillChange += this.CurrentRoom_AudioDeviceWillChange;
// CurrentRoom.PresentationSourceChange += this.CurrentRoom_PresentationSourceChange;
// SetControlSource(CurrentRoom.CurrentPresentationSource);
// newAudio = CurrentRoom.CurrentAudioDevice;
// ShowRoomUI();
// }
// SwapAudioDeviceControls(oldAudio, newAudio);
// }
// /// <summary>
// /// Detaches and attaches an IVolumeFunctions device to the appropriate TP TriList signals.
// /// This will also add IVolumeNumeric if the device implements it.
// /// Overriding classes should call this. Overriding classes are responsible for
// /// linking up to hard keys, etc.
// /// </summary>
// /// <param name="oldDev">May be null</param>
// /// <param name="newDev">May be null</param>
// protected virtual void SwapAudioDeviceControls(IVolumeFunctions oldDev, IVolumeFunctions newDev)
// {
// // Disconnect
// if (oldDev != null)
// {
// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = null;
// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = null;
// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = null;
// TriList.BooleanInput[CommonBoolCue.ShowVolumeButtons.Number].BoolValue = false;
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false;
// if (oldDev is IVolumeTwoWay)
// {
// TriList.UShortOutput[CommonIntCue.MainVolumeLevel.Number].UserObject = null;
// (oldDev as IVolumeTwoWay).IsMutedFeedback
// .UnlinkInputSig(TriList.BooleanInput[CommonBoolCue.MuteOn.Number]);
// (oldDev as IVolumeTwoWay).VolumeLevelFeedback
// .UnlinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]);
// }
// }
// if (newDev != null)
// {
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true;
// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = newDev.VolumeDownCueActionPair;
// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = newDev.VolumeUpCueActionPair;
// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = newDev.MuteToggleCueActionPair;
// if (newDev is IVolumeTwoWay)
// {
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true;
// var numDev = newDev as IVolumeTwoWay;
// TriList.UShortOutput[CommonIntCue.MainVolumeLevel.Number].UserObject = numDev.VolumeLevelCueActionPair;
// numDev.VolumeLevelFeedback
// .LinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]);
// }
// }
// }
// /// <summary>
// /// Does nothing. Override to add functionality when calling SetCurrentRoom
// /// </summary>
// protected virtual void HideRoomUI() { }
// /// <summary>
// /// Does nothing. Override to add functionality when calling SetCurrentRoom
// /// </summary>
// protected virtual void ShowRoomUI() { }
// /// <summary>
// /// Sets up the current presentation device and updates statuses if the device is capable.
// /// </summary>
// protected void SetControlSource(IPresentationSource newSource)
// {
// if (CurrentPresentationControlDevice != null)
// {
// HideCurrentPresentationSourceUi();
// // Unhook presses and things
// if (CurrentPresentationControlDevice is IHasCueActionList)
// {
// foreach (var uo in (CurrentPresentationControlDevice as IHasCueActionList).CueActionList)
// {
// if (uo.Cue.Number == 0) continue;
// if (uo is BoolCueActionPair)
// {
// var bSig = TriList.BooleanOutput[uo.Cue.Number];
// // Disconnection should also clear bool sigs in case they are pressed and
// // might be orphaned
// if (bSig.BoolValue)
// (bSig.UserObject as BoolCueActionPair).Invoke(false);
// bSig.UserObject = null;
// }
// else if (uo is UShortCueActionPair)
// TriList.UShortOutput[uo.Cue.Number].UserObject = null;
// else if (uo is StringCueActionPair)
// TriList.StringOutput[uo.Cue.Number].UserObject = null;
// }
// }
// // unhook outputs
// if (CurrentPresentationControlDevice is IHasFeedback)
// {
// foreach (var output in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks)
// {
// if (output.Cue.Number == 0) continue;
// if (output is BoolFeedback)
// (output as BoolFeedback).UnlinkInputSig(TriList.BooleanInput[output.Cue.Number]);
// else if (output is IntFeedback)
// (output as IntFeedback).UnlinkInputSig(TriList.UShortInput[output.Cue.Number]);
// else if (output is StringFeedback)
// (output as StringFeedback).UnlinkInputSig(TriList.StringInput[output.Cue.Number]);
// }
// }
// }
// CurrentPresentationControlDevice = newSource;
// //connect presses and things
// if (newSource is IHasCueActionList) // This has functions, get 'em
// {
// foreach (var ao in (newSource as IHasCueActionList).CueActionList)
// {
// if (ao.Cue.Number == 0) continue;
// if (ao is BoolCueActionPair)
// TriList.BooleanOutput[ao.Cue.Number].UserObject = ao;
// else if (ao is UShortCueActionPair)
// TriList.UShortOutput[ao.Cue.Number].UserObject = ao;
// else if (ao is StringCueActionPair)
// TriList.StringOutput[ao.Cue.Number].UserObject = ao;
// }
// }
// // connect outputs (addInputSig should update sig)
// if (CurrentPresentationControlDevice is IHasFeedback)
// {
// foreach (var output in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks)
// {
// if (output.Cue.Number == 0) continue;
// if (output is BoolFeedback)
// (output as BoolFeedback).LinkInputSig(TriList.BooleanInput[output.Cue.Number]);
// else if (output is IntFeedback)
// (output as IntFeedback).LinkInputSig(TriList.UShortInput[output.Cue.Number]);
// else if (output is StringFeedback)
// (output as StringFeedback).LinkInputSig(TriList.StringInput[output.Cue.Number]);
// }
// }
// ShowCurrentPresentationSourceUi();
// }
// /// <summary>
// /// Reveals the basic UI for the current device
// /// </summary>
// protected virtual void ShowCurrentPresentationSourceUi()
// {
// }
// /// <summary>
// /// Hides the UI for the current device and calls for a feedback signal cleanup
// /// </summary>
// protected virtual void HideCurrentPresentationSourceUi()
// {
// }
// /// <summary>
// ///
// /// </summary>
// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args)
// {
// SetControlSource(args.NewSource);
// }
// /// <summary>
// ///
// /// </summary>
// void CurrentRoom_AudioDeviceWillChange(object sender, EssentialsRoomAudioDeviceChangeEventArgs e)
// {
// SwapAudioDeviceControls(e.OldDevice, e.NewDevice);
// }
// /// <summary>
// /// Panel event handler
// /// </summary>
// void Tsw_AnySigChange(object currentDevice, SigEventArgs args)
// {
// // plugged in commands
// object uo = args.Sig.UserObject;
// if (uo is Action<bool>)
// (uo as Action<bool>)(args.Sig.BoolValue);
// else if (uo is Action<ushort>)
// (uo as Action<ushort>)(args.Sig.UShortValue);
// else if (uo is Action<string>)
// (uo as Action<string>)(args.Sig.StringValue);
// }
// }
//}

View File

@@ -1,20 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
namespace PepperDash.Essentials.Core
{
public static class VideoStatusCues
{
public static readonly Cue HasVideoStatusFeedback = Cue.BoolCue("HasVideoStatusFeedback", 1);
public static readonly Cue VideoSyncFeedback = Cue.BoolCue("VideoSyncFeedback", 2);
public static readonly Cue HdcpActiveFeedback = Cue.BoolCue("HdcpActiveFeedback", 3);
public static readonly Cue HdcpStateFeedback = Cue.StringCue("HdcpStateFeedback", 3);
public static readonly Cue VideoResolutionFeedback = Cue.StringCue("VideoResolutionFeedback", 2);
public static readonly Cue VideoStatusDeviceKey = Cue.StringCue("VideoStatusDeviceKey", 0);
public static readonly Cue VideoStatusDeviceName = Cue.StringCue("VideoStatusDeviceName", 4);
}
}

View File

@@ -1,62 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.DM;
//using Crestron.SimplSharpPro.DM.Cards;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.DM;
//namespace PepperDash.Essentials.DM.Cards
//{
// public class DmInputCardControllerBase : IRoutingInputsOutputs
// {
// public string Key { get; private set; }
// public uint Slot { get; private set; }
// public abstract eDmInputCardType Type { get; }
// //public RoutingOutputPort BackplaneVideoOut { get; private set; }
// //public RoutingOutputPort BackplaneAudioOut { get; private set; }
// public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
// public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
// public DmInputCardControllerBase(string key, uint slot)
// {
// Key = key;
// Slot = slot;
// //BackplaneAudioOut = new RoutingOutputPort("backplaneAudioOut", eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.BackplaneOnly, slot, this);
// //BackplaneVideoOut = new RoutingOutputPort("backplaneVideoOut", eRoutingSignalType.Video,
// // eRoutingPortConnectionType.BackplaneOnly, slot, this);
// //InputPorts = new RoutingPortCollection<RoutingInputPort>();
// //OutputPorts = new RoutingPortCollection<RoutingOutputPort> { BackplaneAudioOut, BackplaneVideoOut };
// }
// ///// <summary>
// ///// Gets a physical port by name. Returns null if doesn't exist
// ///// </summary>
// //public RoutingInputPort GetInputPort(string key)
// //{
// // return InputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
// //}
// ///// <summary>
// ///// Gets a physical port by name. Returns null if doesn't exist
// ///// </summary>
// //public RoutingOutputPort GetOutputPort(string key)
// //{
// // return OutputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
// //}
// }
// public enum eDmInputCardType
// {
// None, DmcHd, DmcHdDsp, Dmc4kHd, Dmc4kHdDsp, Dmc4kC, Dmc4kCDsp
// }
//}

View File

@@ -1,79 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Cards;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
namespace PepperDash.Essentials.DM.Cards
{
/// <summary>
///
/// </summary>
public abstract class DmSingleOutputCardControllerBase// : IRoutingInputsOutputs
{
public string Key { get; private set; }
public uint Slot { get; private set; }
public abstract eDmOutputCardType Type { get; }
//public RoutingInputPort BackplaneAudioIn1 { get; private set; }
//public RoutingInputPort BackplaneVideoIn1 { get; private set; }
//public RoutingInputPort BackplaneAudioIn2 { get; private set; }
//public RoutingInputPort BackplaneVideoIn2 { get; private set; }
//public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
//public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
public DmSingleOutputCardControllerBase(string key, uint cardSlot)
{
Key = key;
Slot = cardSlot;
//BackplaneAudioIn1 = new RoutingInputPort("backplaneAudioIn1", eRoutingSignalType.Audio,
// eRoutingPortConnectionType.BackplaneOnly, cardSlot, this);
//BackplaneVideoIn1 = new RoutingInputPort("backplaneVideoIn1", eRoutingSignalType.Video,
// eRoutingPortConnectionType.BackplaneOnly, cardSlot, this);
//BackplaneAudioIn2 = new RoutingInputPort("backplaneAudioIn2", eRoutingSignalType.Audio,
// eRoutingPortConnectionType.BackplaneOnly, cardSlot + 1, this);
//BackplaneVideoIn2 = new RoutingInputPort("backplaneVideoIn2", eRoutingSignalType.Video,
// eRoutingPortConnectionType.BackplaneOnly, cardSlot + 1, this);
//InputPorts = new RoutingPortCollection<RoutingInputPort>
//{
// BackplaneAudioIn1,
// BackplaneAudioIn2,
// BackplaneVideoIn1,
// BackplaneVideoIn2
//};
//OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
}
///// <summary>
///// Gets a physical port by name. Returns null if doesn't exist
///// </summary>
//public RoutingInputPort GetInputPort(string key)
//{
// return InputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
//}
///// <summary>
///// Gets a physical port by name. Returns null if doesn't exist
///// </summary>
//public RoutingOutputPort GetOutputPort(string key)
//{
// return OutputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
//}
}
/// <summary>
///
/// </summary>
public enum eDmOutputCardType
{
None, Dmc4kCoHd, Dmc4kHdo, DmcCoHd, DmcSoHd
}
}

View File

@@ -1,43 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DeviceSupport;
using Crestron.SimplSharpPro.DM;
using Crestron.SimplSharpPro.DM.Cards;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM;
namespace PepperDash.Essentials.DM.Cards
{
public class Dmc4kCoHdSingleOutputCard : DmSingleOutputCardControllerBase
{
public override eDmOutputCardType Type
{
get { return eDmOutputCardType.Dmc4kCoHd; }
}
public Dmc4kCoHdSingle Card { get; private set; }
//public RoutingOutputPort DmOut1 { get; private set; }
//public RoutingOutputPort DmOut2 { get; private set; }
//public RoutingOutputPort HdmiOut1 { get; private set; }
public Dmc4kCoHdSingleOutputCard(string key, Dmc4kCoHdSingle card, uint slot)
: base(key, slot)
{
Card = card;
//DmOut1 = new RoutingOutputPort(DmPortName.DmOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.DmCat, null, this);
//DmOut2 = new RoutingOutputPort(DmPortName.DmOut2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.DmCat, null, this);
//HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.Hdmi, null, this);
//OutputPorts.AddRange(new[] { DmOut1, DmOut2, HdmiOut1 });
}
}
}

View File

@@ -1,46 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.DM;
//using Crestron.SimplSharpPro.DM.Cards;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.DM;
//namespace PepperDash.Essentials.DM.Cards
//{
// public class Dmc4kHdoSingleOutputCard : DmSingleOutputCardControllerBase
// {
// public override eDmOutputCardType Type
// {
// get { return eDmOutputCardType.Dmc4kHdo; }
// }
// public Dmc4kHdoSingle Card { get; private set; }
// //public RoutingOutputPort AudioOut1 { get; private set; }
// //public RoutingOutputPort AudioOut2 { get; private set; }
// //public RoutingOutputPort HdmiOut1 { get; private set; }
// //public RoutingOutputPort HdmiOut2 { get; private set; }
// public Dmc4kHdoSingleOutputCard(string key, Dmc4kHdoSingle card, uint slot)
// : base(key, slot)
// {
// Card = card;
// //AudioOut1 = new RoutingOutputPort(DmPortName.BalancedAudioOut1, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.LineAudio, null, this);
// //AudioOut2 = new RoutingOutputPort(DmPortName.BalancedAudioOut2, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.LineAudio, null, this);
// //HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //HdmiOut2 = new RoutingOutputPort(DmPortName.HdmiOut2, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //OutputPorts.AddRange(new[] { AudioOut1, AudioOut2, HdmiOut1, HdmiOut2 });
// }
// }
//}

View File

@@ -1,76 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.DM;
//using Crestron.SimplSharpPro.DM.Cards;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.DM;
//namespace PepperDash.Essentials.DM.Cards
//{
// public class Dmc4kCController : DmInputCardControllerBase
// {
// public override eDmInputCardType Type
// {
// get { return eDmInputCardType.Dmc4kC; }
// }
// public Dmc4kC Card { get; private set; }
// //public RoutingInputPortWithVideoStatuses DmIn { get; private set; }
// //public RoutingOutputPort HdmiLoopOut { get; private set; }
// //public RoutingOutputPort AudioLoopOut { get; private set; }
// public Dmc4kCController(string key, Dmc4kC card, uint slot)
// : base(key, slot)
// {
// Card = card;
// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.DmCat, null, this,
// // VideoStatusHelper.GetDmInputStatusFuncs(Card.DmInput));
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //InputPorts.Add(DmIn);
// //OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut });
// }
// }
// public class Dmc4kCDspController : DmInputCardControllerBase
// {
// public override eDmInputCardType Type
// {
// get { return eDmInputCardType.Dmc4kCDsp; }
// }
// public Dmc4kCDsp Card { get; private set; }
// //public RoutingInputPortWithVideoStatuses DmIn { get; private set; }
// //public RoutingOutputPort HdmiLoopOut { get; private set; }
// //public RoutingOutputPort AudioLoopOut { get; private set; }
// public Dmc4kCDspController(string key, Dmc4kCDsp card, uint slot)
// : base(key, slot)
// {
// Card = card;
// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.DmCat, null, this,
// // VideoStatusHelper.GetDmInputStatusFuncs(Card.DmInput));
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //InputPorts.Add(DmIn);
// //OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut });
// }
// }
//}

View File

@@ -1,82 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.DM;
//using Crestron.SimplSharpPro.DM.Cards;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.DM;
//namespace PepperDash.Essentials.DM.Cards
//{
// /// <summary>
// ///
// /// </summary>
// public class Dmc4kHdController : DmInputCardControllerBase
// {
// public Dmc4kHd Card { get; private set; }
// public override eDmInputCardType Type
// {
// get { return eDmInputCardType.Dmc4kHd; }
// }
// public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
// public RoutingOutputPort HdmiLoopOut { get; private set; }
// public RoutingOutputPort AudioLoopOut { get; private set; }
// public Dmc4kHdController(string key, Dmc4kHd card, uint slot)
// : base(key, slot)
// {
// Card = card;
// HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.Hdmi, null, this,
// VideoStatusHelper.GetHdmiInputStatusFuncs(Card.HdmiInput));
// HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// eRoutingPortConnectionType.Hdmi, null, this);
// AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// eRoutingPortConnectionType.Hdmi, null, this);
// InputPorts.Add(HdmiIn);
// OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut });
// }
// }
// /// <summary>
// ///
// /// </summary>
// public class Dmc4kHdDspController : DmInputCardControllerBase
// {
// public Dmc4kHdDsp Card { get; private set; }
// public override eDmInputCardType Type
// {
// get { return eDmInputCardType.Dmc4kHdDsp; }
// }
// //public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; }
// //public RoutingOutputPort HdmiLoopOut { get; private set; }
// //public RoutingOutputPort AudioLoopOut { get; private set; }
// public Dmc4kHdDspController(string key, Dmc4kHdDsp card, uint slot)
// : base(key, slot)
// {
// Card = card;
// //HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this,
// // VideoStatusHelper.GetHdmiInputStatusFuncs(Card.HdmiInput));
// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio,
// // eRoutingPortConnectionType.Hdmi, null, this);
// //InputPorts.Add(HdmiIn);
// //OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut });
// }
// }
//}

View File

@@ -0,0 +1,83 @@
{
"$schema": "http://json-schema.org/draft-03/schema#",
"title": "DmChassisController Properties Config Schema",
"description": "",
"$ref": "EssentialsConfigSchema.json#definitions/Device",
"properties": {
"properties": {
"$ref": "#/propertiesConfig"
}
},
"propertiesConfig": {
"type": "object",
"additionalProperties": true,
"properties": {
"control": {
"required":true,
"type": "object",
"$ref": "../../ControlPropertiesConfigSchema.json#/ControlPropertiesConfig"
},
"volumeControls": {
"title": "Volume Controls",
"type": "object",
"additionalProperties": {
"type": "object",
"$ref": "#/dmAudioCardPropertiesConfig"
}
},
"inputSlots": {
"required":true,
"title": "Input Slots",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"outputSlots": {
"required":true,
"title": "Output Slots",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"inputNames": {
"title": "Input Names",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"outputNames": {
"title": "Output Names",
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"noRouteText": {
"title": "No Route Text",
"type": "string"
},
"inputSlotSupportsHdcp2": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
}
},
"dmAudioCardPropertiesConfig": {
"type": "object",
"properties": {
"OutLevel": {
"title": "Output Level",
"type": "integer"
},
"isVolumeControlPoint": {
"title": "Volume Control Point?",
"type": "boolean"
}
}
}
}

View File

@@ -135,7 +135,12 @@ namespace PepperDash.Essentials.DM
controller.OutputNames = properties.OutputNames;
if (!string.IsNullOrEmpty(properties.NoRouteText))
{
controller.NoRouteText = properties.NoRouteText;
Debug.Console(1, controller, "Setting No Route Text value to: {0}", controller.NoRouteText);
}
else
Debug.Console(1, controller, "NoRouteText not specified. Defaulting to blank string.", controller.NoRouteText);
controller.PropertiesConfig = properties;
return controller;

View File

@@ -5,7 +5,6 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM.Cards;
namespace PepperDash.Essentials.DM.Config
{

View File

@@ -4,7 +4,6 @@ using Crestron.SimplSharpPro.DM;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Core;
using PepperDash.Essentials.DM.Cards;
namespace PepperDash.Essentials.DM.Config
{

View File

@@ -4,7 +4,6 @@ using Crestron.SimplSharpPro.DM;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Core;
using PepperDash.Essentials.DM.Cards;
namespace PepperDash.Essentials.DM.Config
{

View File

@@ -5,7 +5,6 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.DM.Cards;
namespace PepperDash.Essentials.DM.Config
{

View File

@@ -1,19 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro.DM.Streaming;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//namespace PepperDash.Essentials.DM.Endpoints.NVX
//{
// public class DmNvx35xController: DmNvxControllerBase
// {
// }
//}

View File

@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro.DM.Streaming;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PepperDash.Core;
namespace PepperDash.Essentials.DM.Endpoints.NVX
{
/// <summary>
/// Represents the "properties" property of a DM NVX device config
/// </summary>
public class DmNvxConfig
{
[JsonProperty("control")]
public ControlPropertiesConfig Control { get; set; }
[JsonProperty("parrentDeviceKey")]
public string ParentDeviceKey { get; set; }
[JsonProperty("deviceMode")]
public eDeviceMode DeviceMode { get; set; }
}
}

View File

@@ -1,30 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
using Crestron.SimplSharpPro.DM.Streaming;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.DM.Endpoints.NVX
{
public abstract class DmNvxControllerBase: CrestronGenericBaseDevice
{
public DmNvx35x DmNvx { get; private set; }
public abstract StringFeedback ActiveVideoInputFeedback { get; protected set; }
public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; }
public DmNvxControllerBase(string key, string name, DmNvxBaseClass hardware)
: base(key, name, hardware)
{
AddToFeedbackList(ActiveVideoInputFeedback);
}
}
}

View File

@@ -89,12 +89,6 @@
<ItemGroup>
<Compile Include="AirMedia\AirMediaPropertiesConfig.cs" />
<Compile Include="AirMedia\AirMediaController.cs" />
<Compile Include="Cards REMOVE\Dmc4kHdoSingleOutputCard.cs" />
<Compile Include="Cards REMOVE\Dmc4kCoHdSingleOutputCard.cs" />
<Compile Include="Cards REMOVE\DmOutputCardBase.cs" />
<Compile Include="Cards REMOVE\DmcC4kInputCard.cs" />
<Compile Include="Cards REMOVE\DmcHD4kInputCard.cs" />
<Compile Include="Cards REMOVE\DmInputCardBase.cs" />
<Compile Include="Chassis\DmBladeChassisController.cs" />
<Compile Include="Chassis\DmCardAudioOutput.cs" />
<Compile Include="Chassis\DmChassisController.cs" />
@@ -110,9 +104,6 @@
<Compile Include="Config\HdMdNxM4kEPropertiesConfig.cs" />
<Compile Include="Config\InputPropertiesConfig.cs" />
<Compile Include="DmPortName.cs" />
<Compile Include="Endpoints\NVX\DmNvx35xController.cs" />
<Compile Include="Endpoints\NVX\DmNvxConfig.cs" />
<Compile Include="Endpoints\NVX\DmNvxControllerBase.cs" />
<Compile Include="Endpoints\DGEs\DgeController.cs" />
<Compile Include="Endpoints\DGEs\DgePropertiesConfig.cs" />
<Compile Include="DmLite\HdMdxxxCEController.cs" />
@@ -141,10 +132,6 @@
<Compile Include="Extensions.cs" />
<Compile Include="Config\DeviceFactory.cs" />
<Compile Include="IDmHdmiInputExtensions.cs" />
<Compile Include="MOVE IBasicVideoStatusFeedbacks.cs" />
<Compile Include="Nvx\NvxDirectorController.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="VideoStatusHelpers.cs" />
<None Include="app.config" />

View File

@@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.DM
{
public interface IBasicVideoStatusFeedbacks
{
BoolFeedback HasVideoStatusFeedback { get; }
BoolFeedback HdcpActiveFeedback { get; }
StringFeedback HdcpStateFeedback { get; }
StringFeedback VideoResolutionFeedback { get; }
BoolFeedback VideoSyncFeedback { get; }
}
}

View File

@@ -1,746 +0,0 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DM;
//using Crestron.SimplSharpPro.DM.Cards;
//using Crestron.SimplSharpPro.DM.Streaming;
//using Crestron.SimplSharpPro.DM.Endpoints;
//using Crestron.SimplSharpPro.DM.Endpoints.Receivers;
//using PepperDash.Core;
//using PepperDash.Essentials.Core;
//using PepperDash.Essentials.DM.Cards;
//using PepperDash.Essentials.DM.Config;
//namespace PepperDash.Essentials.DM
//{
// /// <summary>
// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions
// ///
// /// </summary>
// public class NvxDirectorController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting, IHasFeedback//, ICardPortsDevice
// {
// public NvxDirectorController Chassis { get; private set; }
// // Feedbacks for EssentialDM
// public Dictionary<uint, IntFeedback> VideoOutputFeedbacks { get; private set; }
// public Dictionary<uint, IntFeedback> AudioOutputFeedbacks { get; private set; }
// public Dictionary<uint, BoolFeedback> VideoInputSyncFeedbacks { get; private set; }
// public Dictionary<uint, BoolFeedback> InputEndpointOnlineFeedbacks { get; private set; }
// public Dictionary<uint, BoolFeedback> OutputEndpointOnlineFeedbacks { get; private set; }
// public Dictionary<uint, StringFeedback> InputNameFeedbacks { get; private set; }
// public Dictionary<uint, StringFeedback> OutputNameFeedbacks { get; private set; }
// public Dictionary<uint, StringFeedback> OutputVideoRouteNameFeedbacks { get; private set; }
// public Dictionary<uint, StringFeedback> OutputAudioRouteNameFeedbacks { get; private set; }
// // Need a couple Lists of generic Backplane ports
// public RoutingPortCollection<RoutingInputPort> InputPorts { get; private set; }
// public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
// public Dictionary<uint, string> TxDictionary { get; set; }
// public Dictionary<uint, string> RxDictionary { get; set; }
// //public Dictionary<uint, DmInputCardControllerBase> InputCards { get; private set; }
// //public Dictionary<uint, DmSingleOutputCardControllerBase> OutputCards { get; private set; }
// public Dictionary<uint, string> InputNames { get; set; }
// public Dictionary<uint, string> OutputNames { get; set; }
// public Dictionary<uint, DmCardAudioOutputController> VolumeControls { get; private set; }
// public const int RouteOffTime = 500;
// Dictionary<PortNumberType, CTimer> RouteOffTimers = new Dictionary<PortNumberType, CTimer>();
// /// <summary>
// /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now
// /// </summary>
// public static NvxDirectorController GetNvxDirectorController(string key, string name,
// string type, DMChassisPropertiesConfig properties)
// {
// try
// {
// type = type.ToLower();
// uint ipid = properties.Control.IpIdInt; // Convert.ToUInt16(properties.Id, 16);
// NvxDirectorController controller = null;
// if (type == "dmmd8x8")
// {
// controller = new NvxDirectorController(key, name, new DmMd8x8(ipid, Global.ControlSystem));
// // add the cards and port names
// foreach (var kvp in properties.InputSlots)
// controller.AddInputCard(kvp.Value, kvp.Key);
// foreach (var kvp in properties.OutputSlots) {
// controller.AddOutputCard(kvp.Value, kvp.Key);
// }
// foreach (var kvp in properties.VolumeControls)
// {
// // get the card
// // check it for an audio-compatible type
// // make a something-something that will make it work
// // retire to mountain village
// var outNum = kvp.Key;
// var card = controller.Chassis.Outputs[outNum].Card;
// Audio.Output audio = null;
// if (card is DmcHdo)
// audio = (card as DmcHdo).Audio;
// else if (card is Dmc4kHdo)
// audio = (card as Dmc4kHdo).Audio;
// if (audio == null)
// continue;
// // wire up the audio to something here...
// controller.AddVolumeControl(outNum, audio);
// }
// controller.InputNames = properties.InputNames;
// controller.OutputNames = properties.OutputNames;
// return controller;
// }
// else if (type == "dmmd16x16") {
// controller = new NvxDirectorController(key, name, new DmMd16x16(ipid, Global.ControlSystem));
// // add the cards and port names
// foreach (var kvp in properties.InputSlots)
// controller.AddInputCard(kvp.Value, kvp.Key);
// foreach (var kvp in properties.OutputSlots) {
// controller.AddOutputCard(kvp.Value, kvp.Key);
// }
// foreach (var kvp in properties.VolumeControls) {
// // get the card
// // check it for an audio-compatible type
// // make a something-something that will make it work
// // retire to mountain village
// var outNum = kvp.Key;
// var card = controller.Chassis.Outputs[outNum].Card;
// Audio.Output audio = null;
// if (card is DmcHdo)
// audio = (card as DmcHdo).Audio;
// else if (card is Dmc4kHdo)
// audio = (card as Dmc4kHdo).Audio;
// if (audio == null)
// continue;
// // wire up the audio to something here...
// controller.AddVolumeControl(outNum, audio);
// }
// controller.InputNames = properties.InputNames;
// controller.OutputNames = properties.OutputNames;
// return controller;
// }
// }
// catch (System.Exception e)
// {
// Debug.Console(0, "Error creating DM chassis:\r{0}", e);
// }
// return null;
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="key"></param>
// /// <param name="name"></param>
// /// <param name="chassis"></param>
// public NvxDirectorController(string key, string name, DmMDMnxn chassis)
// : base(key, name, chassis)
// {
// Chassis = chassis;
// InputPorts = new RoutingPortCollection<RoutingInputPort>();
// OutputPorts = new RoutingPortCollection<RoutingOutputPort>();
// VolumeControls = new Dictionary<uint, DmCardAudioOutputController>();
// TxDictionary = new Dictionary<uint, string>();
// RxDictionary = new Dictionary<uint, string>();
// IsOnline.OutputChange += new EventHandler<FeedbackEventArgs>(IsOnline_OutputChange);
// //IsOnline.OutputChange += new EventHandler<EventArgs>(this.IsOnline_OutputChange);
// Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange);
// //Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange);
// Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange);
// VideoOutputFeedbacks = new Dictionary<uint, IntFeedback>();
// AudioOutputFeedbacks = new Dictionary<uint, IntFeedback>();
// VideoInputSyncFeedbacks = new Dictionary<uint, BoolFeedback>();
// InputNameFeedbacks = new Dictionary<uint, StringFeedback>();
// OutputNameFeedbacks = new Dictionary<uint, StringFeedback>();
// OutputVideoRouteNameFeedbacks = new Dictionary<uint, StringFeedback>();
// OutputAudioRouteNameFeedbacks = new Dictionary<uint, StringFeedback>();
// InputEndpointOnlineFeedbacks = new Dictionary<uint, BoolFeedback>();
// OutputEndpointOnlineFeedbacks = new Dictionary<uint, BoolFeedback>();
// for (uint x = 1; x <= Chassis.NumberOfOutputs; x++)
// {
// var tempX = x;
// VideoOutputFeedbacks[tempX] = new IntFeedback(() => {
// if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;}
// else { return 0; };
// });
// AudioOutputFeedbacks[tempX] = new IntFeedback(() => {
// if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; }
// else { return 0; };
// });
// VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => {
// return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue;
// });
// InputNameFeedbacks[tempX] = new StringFeedback(() => {
// if (Chassis.Inputs[tempX].NameFeedback.StringValue != null)
// {
// return Chassis.Inputs[tempX].NameFeedback.StringValue;
// }
// else
// {
// return "";
// }
// });
// OutputNameFeedbacks[tempX] = new StringFeedback(() => {
// if (Chassis.Outputs[tempX].NameFeedback.StringValue != null)
// {
// return Chassis.Outputs[tempX].NameFeedback.StringValue;
// }
// else
// {
// return "";
// }
// });
// OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() =>
// {
// if (Chassis.Outputs[tempX].VideoOutFeedback != null)
// {
// return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue;
// }
// else
// {
// return "";
// }
// });
// OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() =>
// {
// if (Chassis.Outputs[tempX].AudioOutFeedback != null)
// {
// return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue;
// }
// else
// {
// return "";
// }
// });
// InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; });
// OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Outputs[tempX].EndpointOnlineFeedback; });
// }
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="type"></param>
// /// <param name="number"></param>
// public void AddInputCard(string type, uint number)
// {
// Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number);
// if (type == "dmcHd")
// {
// var inputCard = new DmcHd(number, this.Chassis);
// var cecPort = inputCard.HdmiInput as ICec;
// AddHdmiInCardPorts(number, cecPort);
// }
// else if (type == "dmcHdDsp")
// {
// var inputCard = new DmcHdDsp(number, this.Chassis);
// var cecPort = inputCard.HdmiInput as ICec;
// AddHdmiInCardPorts(number, cecPort);
// }
// else if (type == "dmc4kHd")
// {
// var inputCard = new Dmc4kHd(number, this.Chassis);
// var cecPort = inputCard.HdmiInput as ICec;
// AddHdmiInCardPorts(number, cecPort);
// }
// else if (type == "dmc4kHdDsp")
// {
// var inputCard = new Dmc4kHdDsp(number, this.Chassis);
// var cecPort = inputCard.HdmiInput as ICec;
// AddHdmiInCardPorts(number, cecPort);
// }
// else if (type == "dmc4kzHd")
// {
// var inputCard = new Dmc4kzHd(number, this.Chassis);
// var cecPort = inputCard.HdmiInput as ICec;
// AddHdmiInCardPorts(number, cecPort);
// }
// else if (type == "dmc4kzHdDsp")
// {
// var inputCard = new Dmc4kzHdDsp(number, this.Chassis);
// var cecPort = inputCard.HdmiInput as ICec;
// AddHdmiInCardPorts(number, cecPort);
// }
// else if (type == "dmcC")
// {
// new DmcC(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmcCDsp")
// {
// new DmcCDsp(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmc4kC")
// {
// new Dmc4kC(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmc4kCDsp")
// {
// new Dmc4kCDsp(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmc4kzC")
// {
// new Dmc4kzC(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmc4kzCDsp")
// {
// new Dmc4kzCDsp(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmcCat")
// {
// new DmcCat(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmcCatDsp")
// {
// new DmcCatDsp(number, this.Chassis);
// AddDmInCardPorts(number);
// }
// else if (type == "dmcS")
// {
// new DmcS(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcSDsp")
// {
// new DmcSDsp(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcS2")
// {
// new DmcS2(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcS2Dsp")
// {
// new DmcS2Dsp(number, Chassis);
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcSdi")
// {
// new DmcSdi(number, Chassis);
// AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi);
// AddOutputPortWithDebug(number, "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// else if (type == "dmcDvi")
// {
// new DmcDvi(number, Chassis);
// AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi);
// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
// AddInCardHdmiLoopPort(number);
// }
// else if (type == "dmcVga")
// {
// new DmcVga(number, Chassis);
// AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga);
// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
// AddInCardHdmiLoopPort(number);
// }
// else if (type == "dmcVidBnc")
// {
// new DmcVidBnc(number, Chassis);
// AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
// AddInCardHdmiLoopPort(number);
// }
// else if (type == "dmcVidRcaA")
// {
// new DmcVidRcaA(number, Chassis);
// AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio);
// AddInCardHdmiLoopPort(number);
// }
// else if (type == "dmcVidRcaD")
// {
// new DmcVidRcaD(number, Chassis);
// AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component);
// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio);
// AddInCardHdmiLoopPort(number);
// }
// else if (type == "dmcVid4")
// {
// new DmcVid4(number, Chassis);
// AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
// AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
// AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
// AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite);
// AddInCardHdmiLoopPort(number);
// }
// else if (type == "dmcStr")
// {
// new DmcStr(number, Chassis);
// AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// }
// void AddDmInCardPorts(uint number)
// {
// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// void AddHdmiInCardPorts(uint number, ICec cecPort)
// {
// AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort);
// AddInCardHdmiAndAudioLoopPorts(number);
// }
// void AddInCardHdmiAndAudioLoopPorts(uint number)
// {
// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null);
// AddOutputPortWithDebug(number, "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null);
// }
// void AddInCardHdmiLoopPort(uint number)
// {
// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null);
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="type"></param>
// /// <param name="number"></param>
// public void AddOutputCard(string type, uint number)
// {
// Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number);
// if (type == "dmc4kHdo")
// {
// var outputCard = new Dmc4kHdoSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// var cecPort2 = outputCard.Card2.HdmiOutput;
// AddDmcHdoPorts(number, cecPort1, cecPort2);
// }
// else if (type == "dmcHdo")
// {
// var outputCard = new DmcHdoSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// var cecPort2 = outputCard.Card2.HdmiOutput;
// AddDmcHdoPorts(number, cecPort1, cecPort2);
// }
// else if (type == "dmc4kCoHd")
// {
// var outputCard = new Dmc4kCoHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddDmcCoPorts(number, cecPort1);
// }
// else if (type == "dmc4kzCoHd")
// {
// var outputCard = new Dmc4kzCoHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddDmcCoPorts(number, cecPort1);
// }
// else if (type == "dmcCoHd")
// {
// var outputCard = new DmcCoHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddDmcCoPorts(number, cecPort1);
// }
// else if (type == "dmCatoHd")
// {
// var outputCard = new DmcCatoHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddDmcCoPorts(number, cecPort1);
// }
// else if (type == "dmcSoHd")
// {
// var outputCard = new DmcSoHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2);
// }
// else if (type == "dmcS2oHd")
// {
// var outputCard = new DmcS2oHdSingle(number, Chassis);
// var cecPort1 = outputCard.Card1.HdmiOutput;
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2);
// }
// else if (type == "dmcStro")
// {
// var outputCard = new DmcStroSingle(number, Chassis);
// AddOutputPortWithDebug(number, "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1);
// }
// else
// Debug.Console(1, this, " WARNING: Output card type '{0}' is not available", type);
// }
// void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2)
// {
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2);
// AddOutputPortWithDebug(number, "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 2);
// }
// void AddDmcCoPorts(uint number, ICec cecPort1)
// {
// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1);
// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1);
// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2);
// }
// /// <summary>
// /// Adds InputPort
// /// </summary>
// void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType)
// {
// var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
// Debug.Console(2, this, "Adding input port '{0}'", portKey);
// var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
// InputPorts.Add(inputPort);
// }
// /// <summary>
// /// Adds InputPort and sets Port as ICec object
// /// </summary>
// void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort)
// {
// var portKey = string.Format("inputCard{0}--{1}", cardNum, portName);
// Debug.Console(2, this, "Adding input port '{0}'", portKey);
// var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this);
// if (cecPort != null)
// inputPort.Port = cecPort;
// InputPorts.Add(inputPort);
// }
// /// <summary>
// /// Adds OutputPort
// /// </summary>
// void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector)
// {
// var portKey = string.Format("outputCard{0}--{1}", cardNum, portName);
// Debug.Console(2, this, "Adding output port '{0}'", portKey);
// OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this));
// }
// /// <summary>
// /// Adds OutputPort and sets Port as ICec object
// /// </summary>
// void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort)
// {
// var portKey = string.Format("outputCard{0}--{1}", cardNum, portName);
// Debug.Console(2, this, "Adding output port '{0}'", portKey);
// var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this);
// if (cecPort != null)
// outputPort.Port = cecPort;
// OutputPorts.Add(outputPort);
// }
// /// <summary>
// ///
// /// </summary>
// void AddVolumeControl(uint number, Audio.Output audio)
// {
// VolumeControls.Add(number, new DmCardAudioOutputController(audio));
// }
// //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting)
// //{
// //}
// void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args) {
// }
// void Chassis_DMInputChange(Switch device, DMInputEventArgs args) {
// //Debug.Console(2, this, "DMSwitch:{0} Input:{1} Event:{2}'", this.Name, args.Number, args.EventId.ToString());
// switch (args.EventId) {
// case (DMInputEventIds.OnlineFeedbackEventId): {
// Debug.Console(2, this, "DMINput OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback);
// InputEndpointOnlineFeedbacks[args.Number].FireUpdate();
// break;
// }
// case (DMInputEventIds.VideoDetectedEventId): {
// Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number);
// VideoInputSyncFeedbacks[args.Number].FireUpdate();
// break;
// }
// case (DMInputEventIds.InputNameEventId): {
// Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number);
// InputNameFeedbacks[args.Number].FireUpdate();
// break;
// }
// }
// }
// ///
// /// </summary>
// void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args)
// {
// //This should be a switch case JTA 2018-07-02
// var output = args.Number;
// if (args.EventId == DMOutputEventIds.VolumeEventId &&
// VolumeControls.ContainsKey(output))
// {
// VolumeControls[args.Number].VolumeEventFromChassis();
// }
// else if (args.EventId == DMOutputEventIds.OnlineFeedbackEventId)
// {
// OutputEndpointOnlineFeedbacks[output].FireUpdate();
// }
// else if (args.EventId == DMOutputEventIds.VideoOutEventId)
// {
// if (Chassis.Outputs[output].VideoOutFeedback != null)
// {
// Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].VideoOutFeedback.Number, output);
// }
// if (VideoOutputFeedbacks.ContainsKey(output))
// {
// VideoOutputFeedbacks[output].FireUpdate();
// }
// if (OutputVideoRouteNameFeedbacks.ContainsKey(output))
// {
// OutputVideoRouteNameFeedbacks[output].FireUpdate();
// }
// }
// else if (args.EventId == DMOutputEventIds.AudioOutEventId)
// {
// if (Chassis.Outputs[output].AudioOutFeedback != null)
// {
// Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].AudioOutFeedback.Number, output);
// }
// if (AudioOutputFeedbacks.ContainsKey(output))
// {
// AudioOutputFeedbacks[output].FireUpdate();
// }
// }
// else if (args.EventId == DMOutputEventIds.OutputNameEventId)
// {
// Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output);
// OutputNameFeedbacks[output].FireUpdate();
// }
// }
// /// <summary>
// ///
// /// </summary>
// /// <param name="pnt"></param>
// void StartOffTimer(PortNumberType pnt)
// {
// if (RouteOffTimers.ContainsKey(pnt))
// return;
// RouteOffTimers[pnt] = new CTimer(o =>
// {
// ExecuteSwitch(0, pnt.Number, pnt.Type);
// }, RouteOffTime);
// }
// // Send out sigs when coming online
// void IsOnline_OutputChange(object sender, EventArgs e)
// {
// if (IsOnline.BoolValue)
// {
// if (InputNames != null)
// foreach (var kvp in InputNames)
// Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value;
// if (OutputNames != null)
// foreach(var kvp in OutputNames)
// Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value;
// }
// }
// #region IRouting Members
// public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType)
// {
// Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType);
// var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail
// var output = Convert.ToUInt32(outputSelector);
// // Check to see if there's an off timer waiting on this and if so, cancel
// var key = new PortNumberType(output, sigType);
// if (input == 0)
// {
// StartOffTimer(key);
// }
// else
// {
// if(RouteOffTimers.ContainsKey(key))
// {
// Debug.Console(2, this, "{0} cancelling route off due to new source", output);
// RouteOffTimers[key].Stop();
// RouteOffTimers.Remove(key);
// }
// }
// Card.DMICard inCard = input == 0 ? null : Chassis.Inputs[input];
// // NOTE THAT THESE ARE NOTS - TO CATCH THE AudioVideo TYPE
// if (sigType != eRoutingSignalType.Audio)
// {
// Chassis.VideoEnter.BoolValue = true;
// Chassis.Outputs[output].VideoOut = inCard;
// }
// if (sigType != eRoutingSignalType.Video)
// {
// Chassis.AudioEnter.BoolValue = true;
// Chassis.Outputs[output].AudioOut = inCard;
// }
// }
// #endregion
// }
// //public struct PortNumberType
// //{
// // public uint Number { get; private set; }
// // public eRoutingSignalType Type { get; private set; }
// // public PortNumberType(uint number, eRoutingSignalType type) : this()
// // {
// // Number = number;
// // Type = type;
// // }
// //}
//}

View File

@@ -62,7 +62,6 @@ namespace PepperDash.Essentials.Devices.Common.DSP
/// In BiAmp: Instance Tag, QSC: Named Control, Polycom:
/// </summary>
string ControlPointTag { get; }
#warning I dont think index1 and index2 should be a part of the interface. JTA 2018-07-17
int Index1 { get; }
int Index2 { get; }
bool HasMute { get; }

View File

@@ -218,26 +218,5 @@ namespace PepperDash.Essentials.Devices.Displays
}
#region INonStandardControls Members
public Dictionary<Cue, Action<object>> GetNonStandardControls()
{
return new Dictionary<Cue, Action<object>>
{
{ CommonBoolCue.PowerOn, o => PowerOn() },
{ CommonBoolCue.PowerOff, o => PowerOff() },
{ Cue.BoolCue("PictureMute", 0), o =>
{
if((bool)o)
PictureMuteOn();
else
PictureMuteOff(); } },
{ Cue.UShortCue("GetLampRemaining", 0), o => GetLampRemaining((int) o) },
{ Cue.StringCue("SelectInput", 0), o => SelectInput((String)o) }
};
}
#endregion
}
}

Some files were not shown because too many files have changed in this diff Show More