mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
Merge remote-tracking branch 'origin/maintenance/KPMG' into feature/ecs-1123
# Conflicts: # PepperDashEssentials/Bridges/BridgeBase.cs # PepperDashEssentials/ControlSystem.cs
This commit is contained in:
@@ -8,6 +8,7 @@ using Newtonsoft.Json;
|
|||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
|
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.AppServer.Messengers
|
namespace PepperDash.Essentials.AppServer.Messengers
|
||||||
@@ -365,7 +366,7 @@ namespace PepperDash.Essentials.AppServer.Messengers
|
|||||||
hasDirectory = Codec is IHasDirectory,
|
hasDirectory = Codec is IHasDirectory,
|
||||||
hasDirectorySearch = true,
|
hasDirectorySearch = true,
|
||||||
hasRecents = Codec is IHasCallHistory,
|
hasRecents = Codec is IHasCallHistory,
|
||||||
hasCameras = Codec is IHasCameraControl
|
hasCameras = Codec is IHasCodecCameras
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,6 +128,11 @@ namespace PepperDash.Essentials.Bridges
|
|||||||
(device as AppleTV).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
(device as AppleTV).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (device is IBridge)
|
||||||
|
{
|
||||||
|
(device as IBridge).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
//else if (device is LightingBase)
|
//else if (device is LightingBase)
|
||||||
//{
|
//{
|
||||||
// (device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
// (device as LightingBase).LinkToApi(Eisc, d.JoinStart, d.JoinMapKey);
|
||||||
|
|||||||
@@ -13,129 +13,127 @@ using PepperDash.Essentials.Bridges;
|
|||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
using Crestron.SimplSharpPro.EthernetCommunication;
|
using Crestron.SimplSharpPro.EthernetCommunication;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
|
|
||||||
{
|
{
|
||||||
public class BridgeFactory
|
public class BridgeFactory
|
||||||
{
|
{
|
||||||
public static IKeyed GetDevice(DeviceConfig dc)
|
public static IKeyed GetDevice(DeviceConfig dc)
|
||||||
{
|
{
|
||||||
// ? why is this static JTA 2018-06-13?
|
// ? why is this static JTA 2018-06-13?
|
||||||
|
|
||||||
var key = dc.Key;
|
|
||||||
var name = dc.Name;
|
|
||||||
var type = dc.Type;
|
|
||||||
var properties = dc.Properties;
|
|
||||||
var propAnon = new { };
|
|
||||||
|
|
||||||
var typeName = dc.Type.ToLower();
|
|
||||||
var groupName = dc.Group.ToLower();
|
|
||||||
|
|
||||||
//Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
|
var key = dc.Key;
|
||||||
|
var name = dc.Name;
|
||||||
|
var type = dc.Type;
|
||||||
|
var properties = dc.Properties;
|
||||||
|
var propAnon = new { };
|
||||||
|
|
||||||
if (typeName == "eiscapi")
|
var typeName = dc.Type.ToLower();
|
||||||
{
|
var groupName = dc.Group.ToLower();
|
||||||
return new EiscApi(dc);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
//Debug.Console(2, "Name {0}, Key {1}, Type {2}, Properties {3}", name, key, type, properties.ToString());
|
||||||
}
|
|
||||||
|
if (typeName == "eiscapi")
|
||||||
|
{
|
||||||
|
return new EiscApi(dc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class CommBridge : Device
|
||||||
|
{
|
||||||
|
public CommBridgeProperties Properties { get; private set; }
|
||||||
|
|
||||||
|
public List<IBasicCommunication> CommDevices { get; private set; }
|
||||||
|
|
||||||
|
public CommBridge(string key, string name, JToken properties)
|
||||||
|
: base(key, name)
|
||||||
|
{
|
||||||
|
Properties = JsonConvert.DeserializeObject<CommBridgeProperties>(properties.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CustomActivate()
|
||||||
|
{
|
||||||
|
// Create EiscApis
|
||||||
|
if (Properties.Eiscs != null)
|
||||||
|
{
|
||||||
|
foreach (var eisc in Properties.Eiscs)
|
||||||
|
{
|
||||||
|
var ApiEisc = new BridgeApiEisc(eisc.IpId, eisc.Hostname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var deviceKey in Properties.CommDevices)
|
||||||
|
{
|
||||||
|
var device = DeviceManager.GetDeviceForKey(deviceKey);
|
||||||
|
|
||||||
|
if (device != null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "deviceKey {0} Found in Device Manager", device.Key);
|
||||||
|
CommDevices.Add(device as IBasicCommunication);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(0, "deviceKey {0} Not Found in Device Manager", deviceKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Iterate through all the CommDevices and link up their Actions and Feedbacks
|
||||||
|
|
||||||
|
Debug.Console(0, "Bridge {0} Activated", this.Name);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class EiscBridgeProperties
|
||||||
|
{
|
||||||
|
public string ParentDeviceKey { get; set; }
|
||||||
|
public eApiType ApiType { get; set; }
|
||||||
|
public List<EiscProperties> Eiscs { get; set; }
|
||||||
|
public string ApiOverrideFilePath { get; set; }
|
||||||
|
|
||||||
|
public class EiscProperties
|
||||||
|
{
|
||||||
|
public string IpId { get; set; }
|
||||||
|
public string Hostname { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CommBridgeProperties : EiscBridgeProperties
|
||||||
|
{
|
||||||
|
public List<string> CommDevices { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum eApiType { Eisc = 0 }
|
||||||
|
|
||||||
|
public class BridgeApiEisc
|
||||||
|
{
|
||||||
|
public uint Ipid { get; private set; }
|
||||||
|
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
|
||||||
|
|
||||||
|
public BridgeApiEisc(string ipid, string hostname)
|
||||||
|
{
|
||||||
|
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
||||||
|
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, hostname, Global.ControlSystem);
|
||||||
|
Eisc.Register();
|
||||||
|
Eisc.SigChange += Eisc_SigChange;
|
||||||
|
Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid);
|
||||||
|
}
|
||||||
|
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
||||||
|
{
|
||||||
|
if (Debug.Level >= 1)
|
||||||
|
Debug.Console(1, "BridgeApiEisc change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||||
|
var 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class CommBridge : Device
|
|
||||||
{
|
|
||||||
public CommBridgeProperties Properties { get; private set; }
|
|
||||||
|
|
||||||
public List<IBasicCommunication> CommDevices { get; private set; }
|
|
||||||
|
|
||||||
public CommBridge(string key, string name, JToken properties)
|
|
||||||
: base(key, name)
|
|
||||||
{
|
|
||||||
Properties = JsonConvert.DeserializeObject<CommBridgeProperties>(properties.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CustomActivate()
|
|
||||||
{
|
|
||||||
// Create EiscApis
|
|
||||||
if (Properties.Eiscs != null)
|
|
||||||
{
|
|
||||||
foreach (var eisc in Properties.Eiscs)
|
|
||||||
{
|
|
||||||
var ApiEisc = new BridgeApiEisc(eisc.IpId, eisc.Hostname);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var deviceKey in Properties.CommDevices)
|
|
||||||
{
|
|
||||||
var device = DeviceManager.GetDeviceForKey(deviceKey);
|
|
||||||
|
|
||||||
if (device != null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, "deviceKey {0} Found in Device Manager", device.Key);
|
|
||||||
CommDevices.Add(device as IBasicCommunication);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Debug.Console(0, "deviceKey {0} Not Found in Device Manager", deviceKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Iterate through all the CommDevices and link up their Actions and Feedbacks
|
|
||||||
|
|
||||||
Debug.Console(0, "Bridge {0} Activated", this.Name);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class EiscBridgeProperties
|
|
||||||
{
|
|
||||||
public string ParentDeviceKey { get; set; }
|
|
||||||
public eApiType ApiType { get; set; }
|
|
||||||
public List<EiscProperties> Eiscs { get; set; }
|
|
||||||
public string ApiOverrideFilePath { get; set; }
|
|
||||||
|
|
||||||
public class EiscProperties
|
|
||||||
{
|
|
||||||
public string IpId { get; set; }
|
|
||||||
public string Hostname { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public class CommBridgeProperties : EiscBridgeProperties
|
|
||||||
{
|
|
||||||
public List<string> CommDevices { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum eApiType { Eisc = 0 }
|
|
||||||
|
|
||||||
public class BridgeApiEisc
|
|
||||||
{
|
|
||||||
public uint Ipid { get; private set; }
|
|
||||||
public ThreeSeriesTcpIpEthernetIntersystemCommunications Eisc { get; private set; }
|
|
||||||
|
|
||||||
public BridgeApiEisc(string ipid, string hostname)
|
|
||||||
{
|
|
||||||
Ipid = (UInt32)int.Parse(ipid, System.Globalization.NumberStyles.HexNumber);
|
|
||||||
Eisc = new ThreeSeriesTcpIpEthernetIntersystemCommunications(Ipid, hostname, Global.ControlSystem);
|
|
||||||
Eisc.Register();
|
|
||||||
Eisc.SigChange += Eisc_SigChange;
|
|
||||||
Debug.Console(0, "BridgeApiEisc Created at Ipid {0}", ipid);
|
|
||||||
}
|
|
||||||
void Eisc_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
|
||||||
{
|
|
||||||
if (Debug.Level >= 1)
|
|
||||||
Debug.Console(1, "BridgeApiEisc change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
|
||||||
var 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
14
PepperDashEssentials/Bridges/IBridge.cs
Normal file
14
PepperDashEssentials/Bridges/IBridge.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Bridges
|
||||||
|
{
|
||||||
|
public interface IBridge
|
||||||
|
{
|
||||||
|
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,35 +19,35 @@ using PepperDash.Essentials.Room.Cotija;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public class ControlSystem : CrestronControlSystem
|
public class ControlSystem : CrestronControlSystem
|
||||||
{
|
{
|
||||||
HttpLogoServer LogoServer;
|
HttpLogoServer LogoServer;
|
||||||
|
|
||||||
List<object> FactoryObjects = new List<object>();
|
List<object> FactoryObjects = new List<object>();
|
||||||
|
|
||||||
public ControlSystem()
|
public ControlSystem()
|
||||||
: base()
|
: base()
|
||||||
{
|
{
|
||||||
Thread.MaxNumberOfUserThreads = 400;
|
Thread.MaxNumberOfUserThreads = 400;
|
||||||
Global.ControlSystem = this;
|
Global.ControlSystem = this;
|
||||||
DeviceManager.Initialize(this);
|
DeviceManager.Initialize(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Git 'er goin'
|
/// Git 'er goin'
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void InitializeSystem()
|
public override void InitializeSystem()
|
||||||
{
|
{
|
||||||
DeterminePlatform();
|
DeterminePlatform();
|
||||||
|
|
||||||
//CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file",
|
//CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file",
|
||||||
// ConsoleAccessLevelEnum.AccessOperator);
|
// ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
// CrestronConsole.AddNewConsoleCommand(S => { ConfigWriter.WriteConfigFile(null); }, "writeconfig", "writes the current config to a file", ConsoleAccessLevelEnum.AccessOperator);
|
// CrestronConsole.AddNewConsoleCommand(S => { ConfigWriter.WriteConfigFile(null); }, "writeconfig", "writes the current config to a file", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "CONSOLE MESSAGE: {0}", s);
|
||||||
}, "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator);
|
}, "appdebugmessage", "Writes message to log", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
@@ -56,23 +56,23 @@ namespace PepperDash.Essentials
|
|||||||
},
|
},
|
||||||
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
"listtielines", "Prints out all tie lines", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse
|
CrestronConsole.ConsoleCommandResponse
|
||||||
("Current running configuration. This is the merged system and template configuration");
|
("Current running configuration. This is the merged system and template configuration");
|
||||||
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
CrestronConsole.ConsoleCommandResponse(Newtonsoft.Json.JsonConvert.SerializeObject
|
||||||
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
(ConfigReader.ConfigObject, Newtonsoft.Json.Formatting.Indented));
|
||||||
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
}, "showconfig", "Shows the current running merged config", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
CrestronConsole.AddNewConsoleCommand(s =>
|
CrestronConsole.AddNewConsoleCommand(s =>
|
||||||
{
|
{
|
||||||
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
|
CrestronConsole.ConsoleCommandResponse("This system can be found at the following URLs:\r" +
|
||||||
"System URL: {0}\r" +
|
"System URL: {0}\r" +
|
||||||
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
|
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
|
||||||
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
|
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
GoWithLoad();
|
GoWithLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determines if the program is running on a processor (appliance) or server (VC-4).
|
/// Determines if the program is running on a processor (appliance) or server (VC-4).
|
||||||
@@ -100,11 +100,11 @@ namespace PepperDash.Essentials
|
|||||||
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", versionString);
|
||||||
|
|
||||||
// Check if User/ProgramX exists
|
// Check if User/ProgramX exists
|
||||||
if(Directory.Exists(directoryPrefix + dirSeparator + "User"
|
if (Directory.Exists(directoryPrefix + dirSeparator + "User"
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber)))
|
||||||
{
|
{
|
||||||
Debug.Console(0, @"User/program{0} directory found", InitialParametersClass.ApplicationNumber);
|
Debug.Console(0, @"User/program{0} directory found", InitialParametersClass.ApplicationNumber);
|
||||||
filePathPrefix = directoryPrefix + dirSeparator + "User"
|
filePathPrefix = directoryPrefix + dirSeparator + "User"
|
||||||
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
+ dirSeparator + string.Format("program{0}", InitialParametersClass.ApplicationNumber) + dirSeparator;
|
||||||
}
|
}
|
||||||
// Check if Nvram/Programx exists
|
// Check if Nvram/Programx exists
|
||||||
@@ -134,115 +134,148 @@ namespace PepperDash.Essentials
|
|||||||
Global.SetFilePathPrefix(filePathPrefix);
|
Global.SetFilePathPrefix(filePathPrefix);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Do it, yo
|
/// Do it, yo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void GoWithLoad()
|
public void GoWithLoad()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials load from configuration");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Starting Essentials load from configuration");
|
||||||
|
|
||||||
var filesReady = SetupFilesystem();
|
var filesReady = SetupFilesystem();
|
||||||
if (filesReady)
|
if (filesReady)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Checking for plugins");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Checking for plugins");
|
||||||
LoadPlugins();
|
LoadPlugins();
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Folder structure verified. Loading config...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Folder structure verified. Loading config...");
|
||||||
if (!ConfigReader.LoadConfig2())
|
if (!ConfigReader.LoadConfig2())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Load();
|
Load();
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Essentials load complete\r" +
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Essentials load complete\r" +
|
||||||
"-------------------------------------------------------------");
|
"-------------------------------------------------------------");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0,
|
Debug.Console(0,
|
||||||
"------------------------------------------------\r" +
|
"------------------------------------------------\r" +
|
||||||
"------------------------------------------------\r" +
|
"------------------------------------------------\r" +
|
||||||
"------------------------------------------------\r" +
|
"------------------------------------------------\r" +
|
||||||
"Essentials file structure setup completed.\r" +
|
"Essentials file structure setup completed.\r" +
|
||||||
"Please load config, sgd and ir files and\r" +
|
"Please load config, sgd and ir files and\r" +
|
||||||
"restart program.\r" +
|
"restart program.\r" +
|
||||||
"------------------------------------------------\r" +
|
"------------------------------------------------\r" +
|
||||||
"------------------------------------------------\r" +
|
"------------------------------------------------\r" +
|
||||||
"------------------------------------------------");
|
"------------------------------------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r{0}", 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
|
// Notify the OS that the program intitialization has completed
|
||||||
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
SystemMonitor.ProgramInitialization.ProgramInitializationComplete = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initial simple implementation. Reads user/programN/plugins folder and
|
/// Initial simple implementation. Reads user/programN/plugins folder and
|
||||||
/// use
|
/// use
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void LoadPlugins()
|
void LoadPlugins()
|
||||||
{
|
{
|
||||||
var dir = Global.FilePathPrefix + "plugins";
|
var dir = Global.FilePathPrefix + "plugins";
|
||||||
if (Directory.Exists(dir))
|
if (Directory.Exists(dir))
|
||||||
{
|
{
|
||||||
// TODO Clear out or create localPlugins folder (maybe in program slot folder)
|
// TODO Clear out or create localPlugins folder (maybe in program slot folder)
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Plugins directory found, checking for factory plugins");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Plugins directory found, checking for factory plugins");
|
||||||
var di = new DirectoryInfo(dir);
|
var di = new DirectoryInfo(dir);
|
||||||
var files = di.GetFiles("*.dll");
|
var zFiles = di.GetFiles("*.cplz");
|
||||||
foreach (FileInfo fi in files)
|
foreach (var fi in zFiles)
|
||||||
{
|
{
|
||||||
// TODO COPY plugin to loadedPlugins folder
|
Debug.Console(0, "Found cplz: {0}. Unzipping into plugins directory", fi.Name);
|
||||||
|
var result = CrestronZIP.Unzip(fi.FullName, di.FullName);
|
||||||
|
Debug.Console(0, "UnZip Result: {0}", result.ToString());
|
||||||
|
fi.Delete();
|
||||||
|
}
|
||||||
|
var files = di.GetFiles("*.dll");
|
||||||
|
Dictionary<string, Assembly> assyList = new Dictionary<string, Assembly>();
|
||||||
|
foreach (FileInfo fi in files)
|
||||||
|
{
|
||||||
|
// TODO COPY plugin to loadedPlugins folder
|
||||||
|
// TODO LOAD that loadedPlugins dll file
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var assy = Assembly.LoadFrom(fi.FullName);
|
||||||
|
var ver = assy.GetName().Version;
|
||||||
|
var verStr = string.Format("{0}.{1}.{2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision);
|
||||||
|
assyList.Add(fi.FullName, assy);
|
||||||
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded plugin file '{0}', version {1}", fi.FullName, verStr);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Debug.Console(2, "Assembly {0} is not a custom assembly", fi.FullName);
|
||||||
|
continue; //catching any load issues and continuing. There will be exceptions loading Crestron .dlls from the cplz Probably should do something different here
|
||||||
|
}
|
||||||
|
}
|
||||||
|
foreach (var assy in assyList)
|
||||||
|
{
|
||||||
|
// iteratate this assembly's classes, looking for "LoadPlugin()" methods
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var types = assy.Value.GetTypes();
|
||||||
|
foreach (var type in types)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);
|
||||||
|
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);
|
||||||
|
loadPlugin.Invoke(null, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Debug.Console(2, "Load Plugin not found. {0} is not a plugin assembly", assy.Value.FullName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO LOAD that loadedPlugins dll file
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Debug.Console(2, "Assembly {0} is not a custom assembly. Types cannot be loaded.", assy.Value.FullName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// plugin dll will be loaded. Any classes in plugin should have a static constructor
|
||||||
|
// that registers that class with the Core.DeviceFactory
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var assy = Assembly.LoadFrom(fi.FullName);
|
/// <summary>
|
||||||
var ver = assy.GetName().Version;
|
/// Verifies filesystem is set up. IR, SGD, and programX folders
|
||||||
var verStr = string.Format("{0}.{1}.{2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision);
|
/// </summary>
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Loaded plugin file '{0}', version {1}", fi.FullName, verStr);
|
bool SetupFilesystem()
|
||||||
|
{
|
||||||
|
Debug.Console(0, "Verifying and/or creating folder structure");
|
||||||
|
var configDir = Global.FilePathPrefix;
|
||||||
|
var configExists = Directory.Exists(configDir);
|
||||||
|
if (!configExists)
|
||||||
|
Directory.Create(configDir);
|
||||||
|
|
||||||
// iteratate this assembly's classes, looking for "LoadPlugin()" methods
|
var irDir = Global.FilePathPrefix + "ir";
|
||||||
var types = assy.GetTypes();
|
if (!Directory.Exists(irDir))
|
||||||
foreach (var type in types)
|
Directory.Create(irDir);
|
||||||
{
|
|
||||||
var methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static);
|
|
||||||
var loadPlugin = methods.FirstOrDefault(m => m.Name.Equals("LoadPlugin"));
|
|
||||||
if (loadPlugin != null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Adding type {0}", fi.FullName, type.FullName);
|
|
||||||
loadPlugin.Invoke(null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// plugin dll will be loaded. Any classes in plugin should have a static constructor
|
|
||||||
// that registers that class with the Core.DeviceFactory
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Verifies filesystem is set up. IR, SGD, and programX folders
|
|
||||||
/// </summary>
|
|
||||||
bool SetupFilesystem()
|
|
||||||
{
|
|
||||||
Debug.Console(0, "Verifying and/or creating folder structure");
|
|
||||||
var configDir = Global.FilePathPrefix;
|
|
||||||
var configExists = Directory.Exists(configDir);
|
|
||||||
if (!configExists)
|
|
||||||
Directory.Create(configDir);
|
|
||||||
|
|
||||||
var irDir = Global.FilePathPrefix + "ir";
|
|
||||||
if (!Directory.Exists(irDir))
|
|
||||||
Directory.Create(irDir);
|
|
||||||
|
|
||||||
var sgdDir = Global.FilePathPrefix + "sgd";
|
var sgdDir = Global.FilePathPrefix + "sgd";
|
||||||
if (!Directory.Exists(sgdDir))
|
if (!Directory.Exists(sgdDir))
|
||||||
@@ -296,7 +329,7 @@ namespace PepperDash.Essentials
|
|||||||
DeviceManager.ActivateAll();
|
DeviceManager.ActivateAll();
|
||||||
|
|
||||||
LinkSystemMonitorToAppServer();
|
LinkSystemMonitorToAppServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinkSystemMonitorToAppServer()
|
void LinkSystemMonitorToAppServer()
|
||||||
{
|
{
|
||||||
@@ -313,28 +346,28 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
messenger.RegisterWithAppServer(appServer);
|
messenger.RegisterWithAppServer(appServer);
|
||||||
|
|
||||||
DeviceManager.AddDevice(messenger);
|
DeviceManager.AddDevice(messenger);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads all devices from config and adds them to DeviceManager
|
/// Reads all devices from config and adds them to DeviceManager
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void LoadDevices()
|
public void LoadDevices()
|
||||||
{
|
{
|
||||||
// Build the processor wrapper class
|
// Build the processor wrapper class
|
||||||
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Devices.CrestronProcessor("processor"));
|
||||||
|
|
||||||
// Add global System Monitor device
|
// Add global System Monitor device
|
||||||
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor"));
|
DeviceManager.AddDevice(new PepperDash.Essentials.Core.Monitoring.SystemMonitorController("systemMonitor"));
|
||||||
|
|
||||||
foreach (var devConf in ConfigReader.ConfigObject.Devices)
|
foreach (var devConf in ConfigReader.ConfigObject.Devices)
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Creating device '{0}', type '{1}'", devConf.Key, devConf.Type);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Creating device '{0}', type '{1}'", devConf.Key, devConf.Type);
|
||||||
// Skip this to prevent unnecessary warnings
|
// Skip this to prevent unnecessary warnings
|
||||||
if (devConf.Key == "processor")
|
if (devConf.Key == "processor")
|
||||||
{
|
{
|
||||||
if (devConf.Type.ToLower() != Global.ControlSystem.ControllerPrompt.ToLower())
|
if (devConf.Type.ToLower() != Global.ControlSystem.ControllerPrompt.ToLower())
|
||||||
@@ -345,13 +378,13 @@ namespace PepperDash.Essentials
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try local factories first
|
// Try local factories first
|
||||||
var newDev = DeviceFactory.GetDevice(devConf);
|
var newDev = DeviceFactory.GetDevice(devConf);
|
||||||
|
|
||||||
if (newDev == null)
|
if (newDev == null)
|
||||||
newDev = BridgeFactory.GetDevice(devConf);
|
newDev = BridgeFactory.GetDevice(devConf);
|
||||||
|
|
||||||
// Then associated library factories
|
// Then associated library factories
|
||||||
if (newDev == null)
|
if (newDev == null)
|
||||||
newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf);
|
newDev = PepperDash.Essentials.Core.DeviceFactory.GetDevice(devConf);
|
||||||
if (newDev == null)
|
if (newDev == null)
|
||||||
@@ -378,59 +411,59 @@ namespace PepperDash.Essentials
|
|||||||
DeviceManager.AddDevice(newDev);
|
DeviceManager.AddDevice(newDev);
|
||||||
else
|
else
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "ERROR: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "ERROR: Cannot load unknown device type '{0}', key '{1}'.", devConf.Type, devConf.Key);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "ERROR: Creating device {0}. Skipping device. \r{1}", devConf.Key, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Devices Loaded.");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Devices Loaded.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper method to load tie lines. This should run after devices have loaded
|
/// Helper method to load tie lines. This should run after devices have loaded
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void LoadTieLines()
|
public void LoadTieLines()
|
||||||
{
|
{
|
||||||
// In the future, we can't necessarily just clear here because devices
|
// In the future, we can't necessarily just clear here because devices
|
||||||
// might be making their own internal sources/tie lines
|
// might be making their own internal sources/tie lines
|
||||||
|
|
||||||
var tlc = TieLineCollection.Default;
|
var tlc = TieLineCollection.Default;
|
||||||
//tlc.Clear();
|
//tlc.Clear();
|
||||||
if (ConfigReader.ConfigObject.TieLines == null)
|
if (ConfigReader.ConfigObject.TieLines == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var tieLineConfig in ConfigReader.ConfigObject.TieLines)
|
foreach (var tieLineConfig in ConfigReader.ConfigObject.TieLines)
|
||||||
{
|
{
|
||||||
var newTL = tieLineConfig.GetTieLine();
|
var newTL = tieLineConfig.GetTieLine();
|
||||||
if (newTL != null)
|
if (newTL != null)
|
||||||
tlc.Add(newTL);
|
tlc.Add(newTL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Tie Lines Loaded.");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Tie Lines Loaded.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads all rooms from config and adds them to DeviceManager
|
/// Reads all rooms from config and adds them to DeviceManager
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void LoadRooms()
|
public void LoadRooms()
|
||||||
{
|
{
|
||||||
if (ConfigReader.ConfigObject.Rooms == null)
|
if (ConfigReader.ConfigObject.Rooms == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Warning, "WARNING: Configuration contains no rooms");
|
Debug.Console(0, Debug.ErrorLogLevel.Warning, "WARNING: Configuration contains no rooms");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
|
||||||
{
|
{
|
||||||
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
||||||
if (room != null)
|
if (room != null)
|
||||||
{
|
{
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
if (room is EssentialsHuddleSpaceRoom)
|
||||||
{
|
{
|
||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
@@ -440,10 +473,10 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Cotija Bridge...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Cotija Bridge...");
|
||||||
// Cotija bridge
|
// Cotija bridge
|
||||||
var bridge = new CotijaEssentialsHuddleSpaceRoomBridge(room as EssentialsHuddleSpaceRoom);
|
var bridge = new CotijaEssentialsHuddleSpaceRoomBridge(room as EssentialsHuddleSpaceRoom);
|
||||||
AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
|
AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
|
||||||
DeviceManager.AddDevice(bridge);
|
DeviceManager.AddDevice(bridge);
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Cotija Bridge Added...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Cotija Bridge Added...");
|
||||||
}
|
}
|
||||||
@@ -454,60 +487,60 @@ namespace PepperDash.Essentials
|
|||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is EssentialsHuddleVtc1Room, attempting to add to DeviceManager with Fusion");
|
||||||
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, 0xf1));
|
DeviceManager.AddDevice(new EssentialsHuddleVtc1FusionController((EssentialsHuddleVtc1Room)room, 0xf1));
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Cotija Bridge...");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Attempting to build Cotija Bridge...");
|
||||||
// Cotija bridge
|
// Cotija bridge
|
||||||
var bridge = new CotijaEssentialsHuddleSpaceRoomBridge(room);
|
var bridge = new CotijaEssentialsHuddleSpaceRoomBridge(room);
|
||||||
AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
|
AddBridgePostActivationHelper(bridge); // Lets things happen later when all devices are present
|
||||||
DeviceManager.AddDevice(bridge);
|
DeviceManager.AddDevice(bridge);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is NOT EssentialsRoom, attempting to add to DeviceManager w/o Fusion");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Room is NOT EssentialsRoom, attempting to add to DeviceManager w/o Fusion");
|
||||||
DeviceManager.AddDevice(room);
|
DeviceManager.AddDevice(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create room from config, key '{0}'", roomConfig.Key);
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create room from config, key '{0}'", roomConfig.Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helps add the post activation steps that link bridges to main controller
|
/// Helps add the post activation steps that link bridges to main controller
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bridge"></param>
|
/// <param name="bridge"></param>
|
||||||
void AddBridgePostActivationHelper(CotijaBridgeBase bridge)
|
void AddBridgePostActivationHelper(CotijaBridgeBase bridge)
|
||||||
{
|
{
|
||||||
bridge.AddPostActivationAction(() =>
|
bridge.AddPostActivationAction(() =>
|
||||||
{
|
{
|
||||||
var parent = DeviceManager.AllDevices.FirstOrDefault(d => d.Key == "appServer") as CotijaSystemController;
|
var parent = DeviceManager.AllDevices.FirstOrDefault(d => d.Key == "appServer") as CotijaSystemController;
|
||||||
if (parent == null)
|
if (parent == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, bridge, "ERROR: Cannot connect app server room bridge. System controller not present");
|
Debug.Console(0, bridge, "ERROR: Cannot connect app server room bridge. System controller not present");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Debug.Console(0, bridge, "Linking to parent controller");
|
Debug.Console(0, bridge, "Linking to parent controller");
|
||||||
bridge.AddParent(parent);
|
bridge.AddParent(parent);
|
||||||
parent.AddBridge(bridge);
|
parent.AddBridge(bridge);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fires up a logo server if not already running
|
/// Fires up a logo server if not already running
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void LoadLogoServer()
|
void LoadLogoServer()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LogoServer = new HttpLogoServer(8080, Global.DirectorySeparator + "html" + Global.DirectorySeparator + "logo");
|
LogoServer = new HttpLogoServer(8080, Global.DirectorySeparator + "html" + Global.DirectorySeparator + "logo");
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "NOTICE: Logo server cannot be started. Likely already running in another program");
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "NOTICE: Logo server cannot be started. Likely already running in another program");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,7 @@
|
|||||||
<Compile Include="Bridges\GenericRelayDeviceBridge.cs" />
|
<Compile Include="Bridges\GenericRelayDeviceBridge.cs" />
|
||||||
<Compile Include="Bridges\IBasicCommunicationBridge.cs" />
|
<Compile Include="Bridges\IBasicCommunicationBridge.cs" />
|
||||||
<Compile Include="Bridges\DmRmcControllerBridge.cs" />
|
<Compile Include="Bridges\DmRmcControllerBridge.cs" />
|
||||||
|
<Compile Include="Bridges\IBridge.cs" />
|
||||||
<Compile Include="Bridges\IDigitalInputBridge.cs" />
|
<Compile Include="Bridges\IDigitalInputBridge.cs" />
|
||||||
<Compile Include="Bridges\JoinMapBase.cs" />
|
<Compile Include="Bridges\JoinMapBase.cs" />
|
||||||
<Compile Include="Bridges\SystemMonitorBridge.cs" />
|
<Compile Include="Bridges\SystemMonitorBridge.cs" />
|
||||||
|
|||||||
@@ -712,10 +712,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
void SetupLayoutControls()
|
void SetupLayoutControls()
|
||||||
{
|
{
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCStagingSelfViewLayoutPress, this.ShowSelfViewLayout);
|
TriList.SetSigFalseAction(UIBoolJoin.VCStagingSelfViewLayoutPress, this.ShowSelfViewLayout);
|
||||||
var svc = Codec as IHasCodecSelfview;
|
var svc = Codec as IHasCodecSelfView;
|
||||||
if (svc != null)
|
if (svc != null)
|
||||||
{
|
{
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VCSelfViewTogglePress, svc.SelfviewModeToggle);
|
TriList.SetSigFalseAction(UIBoolJoin.VCSelfViewTogglePress, svc.SelfViewModeToggle);
|
||||||
svc.SelfviewIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCSelfViewTogglePress]);
|
svc.SelfviewIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCSelfViewTogglePress]);
|
||||||
}
|
}
|
||||||
var lc = Codec as IHasCodecLayouts;
|
var lc = Codec as IHasCodecLayouts;
|
||||||
|
|||||||
Reference in New Issue
Block a user