mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
Compare commits
1 Commits
v2.24.4-fu
...
2.0.0-alph
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37c1a6c7dd |
@@ -15,11 +15,15 @@
|
||||
<MakeDir Directories="$(PackageOutputPath)\$(AssemblyName)" Condition="!Exists('$(PackageOutputPath)\$(AssemblyName)')" />
|
||||
<ZipDirectory SourceDirectory="$(TargetDir)" DestinationFile="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cplz" Overwrite="true"/>
|
||||
</Target>
|
||||
<Target Name="Copy CPZ NET6" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' == 'net6.0' ) Or ( '$(TargetFramework)' == 'net8.0' ))">
|
||||
<Target Name="Copy CPZ NET6" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' == 'net6.0' ))">
|
||||
<Message Text="Copying CPZ"></Message>
|
||||
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
||||
</Target>
|
||||
<Target Name="Copy CPZ NET47" AfterTargets="SimplSharpPostProcess47" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' != 'net6.0' ) And ( '$(TargetFramework)' != 'net8.0' ))">
|
||||
<Target Name="Copy CPZ NET8" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' == 'net8.0' ))">
|
||||
<Message Text="Copying CPZ"></Message>
|
||||
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
||||
</Target>
|
||||
<Target Name="Copy CPZ NET47" AfterTargets="SimplSharpPostProcess" Condition="($(ProjectType) == 'Program' And ( '$(TargetFramework)' == 'net472' ))">
|
||||
<Message Text="Copying CPZ"></Message>
|
||||
<Move SourceFiles="$(TargetDir)$(TargetName).cpz" DestinationFiles="$(PackageOutputPath)\$(AssemblyName)\$(TargetName).$(Version).$(TargetFramework).cpz" />
|
||||
</Target>
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogMessage(e, "Error invoking method {methodName} on device {deviceKey}", null, method.Name, action.DeviceKey);
|
||||
Debug.LogError(e, "Error invoking method {methodName} on device {deviceKey}", null, method.Name, action.DeviceKey);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace PepperDash.Essentials.Core
|
||||
var obj = FindObjectOnPath(key);
|
||||
if (obj == null)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Warning, "Unable to find object at path {deviceKey}", null, key);
|
||||
Debug.LogMessage(LogEventLevel.Warning, "Unable to find object at path {deviceKey}", key);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -130,9 +130,7 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
if (method == null)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Warning,
|
||||
"Unable to find method with name {methodName} and that matches parameters {@parameters}", null, action.MethodName,
|
||||
action.Params);
|
||||
Debug.LogMessage(LogEventLevel.Warning, "Unable to find method with name {methodName} and that matches parameters {@parameters}", action.MethodName, action.Params);
|
||||
return;
|
||||
}
|
||||
var mParams = method.GetParameters();
|
||||
@@ -145,18 +143,18 @@ namespace PepperDash.Essentials.Core
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Calling method {methodName} on device {deviceKey} with {@params}", null, method.Name, action.DeviceKey, action.Params);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Calling method {methodName} on device {deviceKey} with {@params}", method.Name, action.DeviceKey, action.Params);
|
||||
method.Invoke(obj, convertedParams);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogMessage(e, "Error invoking method {methodName} on device {deviceKey}", null, method.Name, action.DeviceKey);
|
||||
Debug.LogError(e, "Error invoking method {methodName} on device {deviceKey}", method.Name, action.DeviceKey);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Unable to call method with name {methodName} with {@parameters}", null, action.MethodName, action.Params);
|
||||
Debug.LogError(ex, "Unable to call method with name {methodName} with {@parameters}", action.MethodName, action.Params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Exception occurred while creating device {0}: {1}", null, dc.Key, ex.Message);
|
||||
Debug.LogError(ex, "Exception occurred while creating device {0}: {1}", dc.Key, ex.Message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1040,21 +1040,18 @@ namespace PepperDash.Essentials.Core.Fusion
|
||||
/// </summary>
|
||||
private void PrintTodaysSchedule()
|
||||
{
|
||||
if (Debug.Level > 1)
|
||||
if (_currentSchedule.Meetings.Count > 0)
|
||||
{
|
||||
if (_currentSchedule.Meetings.Count > 0)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Today's Schedule for '{0}'\n", Room.Name);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Today's Schedule for '{0}'\n", Room.Name);
|
||||
|
||||
foreach (var e in _currentSchedule.Meetings)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Subject: {0}", e.Subject);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Organizer: {0}", e.Organizer);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "MeetingID: {0}", e.MeetingID);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Start Time: {0}", e.dtStart);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "End Time: {0}", e.dtEnd);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Duration: {0}\n", e.DurationInMinutes);
|
||||
}
|
||||
foreach (var e in _currentSchedule.Meetings)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Subject: {0}", e.Subject);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Organizer: {0}", e.Organizer);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "MeetingID: {0}", e.MeetingID);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Start Time: {0}", e.dtStart);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "End Time: {0}", e.dtEnd);
|
||||
Debug.LogMessage(LogEventLevel.Debug, this, "Duration: {0}\n", e.DurationInMinutes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace PepperDash.Essentials.Core
|
||||
public static eCrestronSeries ProcessorSeries { get { return CrestronEnvironment.ProgramCompatibility; } }
|
||||
|
||||
// TODO: consider making this configurable later
|
||||
public static IFormatProvider Culture = CultureInfo.CreateSpecificCulture("en-US");
|
||||
public static IFormatProvider Culture = CultureInfo.InvariantCulture;
|
||||
|
||||
/// <summary>
|
||||
/// True when the processor type is a DMPS variant
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
using Crestron.SimplSharp.Scheduler;
|
||||
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Fusion;
|
||||
using PepperDash.Essentials.Room.Config;
|
||||
using Serilog.Events;
|
||||
using Activator = System.Activator;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
|
||||
@@ -134,12 +134,6 @@ namespace PepperDash.Essentials.Core
|
||||
|
||||
Joins.Add(joinName, value);
|
||||
}
|
||||
|
||||
|
||||
if (Debug.Level > 0)
|
||||
{
|
||||
PrintJoinMapInfo();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.20.66" />
|
||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-424" />
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.Program" Version="2.21.65" />
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.21.65" />
|
||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-439" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Crestron\CrestronGenericBaseDevice.cs.orig" />
|
||||
|
||||
@@ -102,14 +102,11 @@ namespace PepperDash.Essentials
|
||||
LoadedAssemblies.Add(new LoadedAssembly(fi.Name, version, assembly));
|
||||
}
|
||||
|
||||
if (Debug.Level > 1)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Loaded Assemblies:");
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Loaded Assemblies:");
|
||||
|
||||
foreach (var assembly in LoadedAssemblies)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Assembly: {0}", assembly.Name);
|
||||
}
|
||||
foreach (var assembly in LoadedAssemblies)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Assembly: {0}", assembly.Name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +148,7 @@ namespace PepperDash.Essentials
|
||||
return null;
|
||||
} catch(Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error loading assembly from {path}", null, filePath);
|
||||
Debug.LogError(ex, "Error loading assembly from {path}", filePath);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -360,8 +357,8 @@ namespace PepperDash.Essentials
|
||||
foreach (var pluginFile in pluginFiles)
|
||||
{
|
||||
var loadedAssembly = LoadAssembly(pluginFile.FullName);
|
||||
|
||||
LoadedPluginFolderAssemblies.Add(loadedAssembly);
|
||||
if (loadedAssembly != null)
|
||||
LoadedPluginFolderAssemblies.Add(loadedAssembly);
|
||||
}
|
||||
|
||||
Debug.LogMessage(LogEventLevel.Information, "All Plugins Loaded.");
|
||||
@@ -379,50 +376,44 @@ namespace PepperDash.Essentials
|
||||
try
|
||||
{
|
||||
var assy = loadedAssembly.Assembly;
|
||||
Type[] types = {};
|
||||
try
|
||||
{
|
||||
types = assy.GetTypes();
|
||||
var types = assy.GetTypes().ToList();
|
||||
Debug.LogMessage(LogEventLevel.Debug, $"Got types for assembly {assy.GetName().Name}");
|
||||
|
||||
foreach (var type in types)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (typeof(IPluginDeviceFactory).IsAssignableFrom(type) && !type.IsAbstract)
|
||||
{
|
||||
var plugin = (IPluginDeviceFactory)Activator.CreateInstance(type);
|
||||
LoadCustomPlugin(plugin, loadedAssembly);
|
||||
}
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
//this happens for dlls that aren't PD dlls, like ports of Mono classes into S#. Swallowing.
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError(e, "Error loading plugin type: {Type}", type.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (TypeLoadException e)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Error, "Unable to get types for assembly {0}: {1}",
|
||||
loadedAssembly.Name, e.Message);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, e.StackTrace);
|
||||
continue;
|
||||
Debug.LogError(e, "Unable to get types for assembly {0}", loadedAssembly.Name);
|
||||
}
|
||||
|
||||
foreach (var type in types)
|
||||
catch (Exception e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (typeof (IPluginDeviceFactory).IsAssignableFrom(type) && !type.IsAbstract)
|
||||
{
|
||||
var plugin =
|
||||
(IPluginDeviceFactory)Activator.CreateInstance(type);
|
||||
LoadCustomPlugin(plugin, loadedAssembly);
|
||||
}
|
||||
}
|
||||
catch (NotSupportedException)
|
||||
{
|
||||
//this happens for dlls that aren't PD dlls, like ports of Mono classes into S#. Swallowing.
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Error, "Load Plugin not found. {0}.{2} is not a plugin factory. Exception: {1}",
|
||||
loadedAssembly.Name, e.Message, type.Name);
|
||||
continue;
|
||||
}
|
||||
|
||||
Debug.LogError(e, "Unable to get types for assembly {0}", loadedAssembly.Name);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, "Error Loading assembly {0}: {1}",
|
||||
loadedAssembly.Name, e.Message);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "{0}", e.StackTrace);
|
||||
continue;
|
||||
Debug.LogError(e, "Error loading plugin assembly:{Assembly}", loadedAssembly);
|
||||
}
|
||||
}
|
||||
// plugin dll will be loaded. Any classes in plugin should have a static constructor
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace PepperDash.Essentials.Core.Routing
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error handling midpoint update from {midpointKey}:{Exception}", this, midpoint.Key, ex);
|
||||
Debug.LogError<RoutingFeedbackManager>(ex, "Error handling midpoint update from {midpointKey}:{Exception}", this, midpoint.Key, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace PepperDash.Essentials.Core.Routing
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error handling Sink update from {senderKey}:{Exception}", this, sender.Key, ex);
|
||||
Debug.LogError<RoutingFeedbackManager>(ex, "Error handling Sink update from {senderKey}:{Exception}", this, sender.Key, ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace PepperDash.Essentials.Core.Routing
|
||||
}
|
||||
} catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error getting first tieline: {Exception}", this, ex);
|
||||
Debug.LogError<RoutingFeedbackManager>(this, ex, "Error getting first tieline: {Exception}", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace PepperDash.Essentials.Core.Routing
|
||||
}
|
||||
} catch(Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error getting sourceTieLine: {Exception}", this, ex);
|
||||
Debug.LogError<RoutingFeedbackManager>(this, ex, "Error getting sourceTieLine: {Exception}", ex);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace PepperDash.Essentials.Core.Routing
|
||||
}
|
||||
} catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error walking tieLines: {Exception}", this, ex);
|
||||
Debug.LogError(this, ex, "Error walking tieLines: {Exception}", ex);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using Newtonsoft.Json;
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Core.Web.RequestHandlers;
|
||||
using System;
|
||||
using Serilog.Events;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
@@ -27,7 +26,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// <param name="context"></param>
|
||||
protected override void HandleGet(HttpCwsContext context)
|
||||
{
|
||||
var appDebug = new AppDebug { MinimumLevel = Debug.WebsocketMinimumLogLevel };
|
||||
var appDebug = new AppDebug { MinimumLevel = Debug.WebsocketMinimumLevel };
|
||||
|
||||
var body = JsonConvert.SerializeObject(appDebug, Formatting.Indented);
|
||||
|
||||
@@ -67,7 +66,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
|
||||
Debug.SetWebSocketMinimumDebugLevel(requestBody.MinimumLevel);
|
||||
|
||||
appDebug.MinimumLevel = Debug.WebsocketMinimumLogLevel;
|
||||
appDebug.MinimumLevel = Debug.WebsocketMinimumLevel;
|
||||
var responseBody = JsonConvert.SerializeObject(appDebug, Formatting.Indented);
|
||||
|
||||
context.Response.StatusCode = 200;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// Gets details for a debug session
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
protected override void HandleGet(Crestron.SimplSharp.WebScripting.HttpCwsContext context)
|
||||
protected override void HandleGet(HttpCwsContext context)
|
||||
{
|
||||
var routeData = context.Request.RouteData;
|
||||
if (routeData == null)
|
||||
@@ -38,29 +38,12 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
|
||||
try
|
||||
{
|
||||
var ip = CrestronEthernetHelper.GetEthernetParameter(
|
||||
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0);
|
||||
|
||||
var port = 0;
|
||||
|
||||
if (!Debug.WebsocketSink.IsRunning)
|
||||
var data = new
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Information, "Starting WS Server");
|
||||
// Generate a random port within a specified range
|
||||
port = new Random().Next(65435, 65535);
|
||||
// Start the WS Server
|
||||
Debug.WebsocketSink.StartServerAndSetPort(port);
|
||||
Debug.SetWebSocketMinimumDebugLevel(Serilog.Events.LogEventLevel.Verbose);
|
||||
}
|
||||
|
||||
var url = Debug.WebsocketSink.Url;
|
||||
|
||||
object data = new
|
||||
{
|
||||
url = Debug.WebsocketSink.Url
|
||||
url = "" // TODO: Add the URL of the websocket server
|
||||
};
|
||||
|
||||
Debug.LogMessage(LogEventLevel.Information, "Debug Session URL: {0}", url);
|
||||
Debug.LogMessage(LogEventLevel.Information, "Debug Session URL: {0}", data.url);
|
||||
|
||||
// Return the port number with the full url of the WS Server
|
||||
var res = JsonConvert.SerializeObject(data);
|
||||
@@ -84,8 +67,6 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
/// <param name="context"></param>
|
||||
protected override void HandlePost(HttpCwsContext context)
|
||||
{
|
||||
Debug.WebsocketSink.StopServer();
|
||||
|
||||
context.Response.StatusCode = 200;
|
||||
context.Response.StatusDescription = "OK";
|
||||
context.Response.End();
|
||||
|
||||
@@ -71,8 +71,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
var daw = new DeviceActionWrapper { DeviceKey = (string) deviceKey};
|
||||
|
||||
JsonConvert.PopulateObject(data, daw);
|
||||
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Device Action Wrapper: {@wrapper}", null, daw);
|
||||
Debug.LogMessage<DevJsonRequestHandler>(LogEventLevel.Verbose, "Device Action Wrapper: {@wrapper}", null, daw);
|
||||
|
||||
DeviceJsonApi.DoDeviceAction(daw);
|
||||
|
||||
@@ -82,7 +81,7 @@ namespace PepperDash.Essentials.Core.Web.RequestHandlers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error handling device command: {Exception}");
|
||||
Debug.LogError<DevJsonRequestHandler>(ex, "Error handling device command: {Exception}");
|
||||
|
||||
context.Response.StatusCode = 400;
|
||||
context.Response.StatusDescription = "Bad Request";
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
void SendBytes(byte[] b)
|
||||
{
|
||||
|
||||
if (Debug.Level == 2) // This check is here to prevent following string format from building unnecessarily on level 0 or 1
|
||||
if (Debug.ConsoleMinimumLevel == LogEventLevel.Verbose) // This check is here to prevent following string format from building unnecessarily on level 0 or 1
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Sending:{0}", ComTextHelper.GetEscapedText(b));
|
||||
|
||||
Communication.SendBytes(b);
|
||||
@@ -209,7 +209,7 @@ namespace PepperDash.Essentials.Devices.Common.Cameras
|
||||
// Append the incoming bytes with whatever is in the buffer
|
||||
IncomingBuffer.CopyTo(newBytes, 0);
|
||||
e.Bytes.CopyTo(newBytes, IncomingBuffer.Length);
|
||||
if (Debug.Level == 2) // This check is here to prevent following string format from building unnecessarily on level 0 or 1
|
||||
if (Debug.ConsoleMinimumLevel == LogEventLevel.Verbose) // This check is here to prevent following string format from building unnecessarily on level 0 or 1
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Received:{0}", ComTextHelper.GetEscapedText(newBytes));
|
||||
|
||||
byte[] message = new byte[] { };
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace PepperDash.Essentials.Devices.Common.Displays
|
||||
// Fake cool-down cycle
|
||||
CooldownTimer = new CTimer(o =>
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Cooldown timer ending", this);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Cooldown timer ending");
|
||||
_IsCoolingDown = false;
|
||||
IsCoolingDownFeedback.InvokeFireUpdate();
|
||||
_PowerIsOn = false;
|
||||
@@ -141,7 +141,7 @@ namespace PepperDash.Essentials.Devices.Common.Displays
|
||||
{
|
||||
try
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "ExecuteSwitch: {0}", this, selector);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "ExecuteSwitch: {0}", selector);
|
||||
|
||||
if (!_PowerIsOn)
|
||||
{
|
||||
@@ -156,21 +156,21 @@ namespace PepperDash.Essentials.Devices.Common.Displays
|
||||
|
||||
var inputPort = InputPorts.FirstOrDefault(port =>
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Checking input port {inputPort} with selector {portSelector} against {selector}", this, port, port.Selector, selector);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Checking input port {inputPort} with selector {portSelector} against {selector}", port, port.Selector, selector);
|
||||
return port.Selector.ToString() == selector.ToString();
|
||||
});
|
||||
|
||||
if (inputPort == null)
|
||||
{
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Unable to find input port for selector {selector}", this, selector);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Unable to find input port for selector {selector}", selector);
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.LogMessage(LogEventLevel.Verbose, "Setting current input port to {inputPort}", this, inputPort);
|
||||
Debug.LogMessage(LogEventLevel.Verbose, this, "Setting current input port to {inputPort}", inputPort);
|
||||
CurrentInputPort = inputPort;
|
||||
} catch (Exception ex)
|
||||
{
|
||||
Debug.LogMessage(ex, "Error making switch: {Exception}", this, ex);
|
||||
Debug.LogError<MockDisplay>(this, ex, "Error making switch");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.20.66" />
|
||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-424" />
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.Program" Version="2.21.65" />
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.21.65" />
|
||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-439" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp.CrestronIO;
|
||||
using Crestron.SimplSharp.Reflection;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using Crestron.SimplSharp;
|
||||
using PepperDash.Core;
|
||||
|
||||
@@ -92,7 +92,6 @@ namespace PepperDash.Essentials
|
||||
|
||||
private void StartSystem(object preventInitialization)
|
||||
{
|
||||
Debug.SetErrorLogMinimumDebugLevel(Serilog.Events.LogEventLevel.Verbose);
|
||||
|
||||
DeterminePlatform();
|
||||
|
||||
@@ -241,7 +240,7 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogMessage(e, "Unable to determine platform due to exception");
|
||||
Debug.LogError(e, "Unable to determine platform due to exception");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +296,7 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogMessage(e, "FATAL INITIALIZE ERROR. System is in an inconsistent state");
|
||||
Debug.LogFatal(e, "FATAL INITIALIZE ERROR. System is in an inconsistent state");
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -431,7 +430,7 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogMessage(e, "ERROR: Creating device {deviceKey:l}. Skipping device.",args: new[] { devConf.Key });
|
||||
Debug.LogError(e, "ERROR: Creating device {deviceKey:l}. Skipping device.",args: new[] { devConf.Key });
|
||||
}
|
||||
}
|
||||
Debug.LogMessage(LogEventLevel.Information, "All Devices Loaded.");
|
||||
|
||||
@@ -1,58 +1,60 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Program</ProjectType>
|
||||
<Configurations>Debug;Release;Debug 4.7.2</Configurations>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RootNamespace>PepperDash.Essentials</RootNamespace>
|
||||
<AssemblyName>PepperDashEssentials</AssemblyName>
|
||||
<TargetFrameworks>net472;net6</TargetFrameworks>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<Title>PepperDash Essentials</Title>
|
||||
<PackageId>PepperDashEssentials</PackageId>
|
||||
<Version>2.0.0-local</Version>
|
||||
<InformationalVersion>$(Version)</InformationalVersion>
|
||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug 4.7.2|AnyCPU'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Example Configuration\EssentialsHuddleVtc1Room\configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Example Configuration\SIMPLBridging\configurationFile-dmps3300c-avRouting.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Example Configuration\SIMPLBridging\SIMPLBridgeExample_configurationFile.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="SGD\PepperDash Essentials iPad.sgd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="SGD\PepperDash Essentials TSW-560.sgd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="SGD\PepperDash Essentials TSW-760.sgd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.Program" Version="2.20.66" />
|
||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-424" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />
|
||||
<ProjectReference Include="..\PepperDash.Essentials.Devices.Common\PepperDash.Essentials.Devices.Common.csproj" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<ProjectType>Program</ProjectType>
|
||||
<Configurations>Debug;Release</Configurations>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RootNamespace>PepperDash.Essentials</RootNamespace>
|
||||
<AssemblyName>PepperDashEssentials</AssemblyName>
|
||||
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<OutputPath>bin\$(Configuration)\</OutputPath>
|
||||
<Title>PepperDash Essentials</Title>
|
||||
<PackageId>PepperDashEssentials</PackageId>
|
||||
<Version>2.0.0-local</Version>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
<InformationalVersion>$(Version)</InformationalVersion>
|
||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug 4.7.2|AnyCPU'">
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Example Configuration\EssentialsHuddleSpaceRoom\configurationFile-HuddleSpace-2-Source.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Example Configuration\EssentialsHuddleVtc1Room\configurationFile-mockVideoCodec_din-ap3_-_dm4x1.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Example Configuration\SIMPLBridging\configurationFile-dmps3300c-avRouting.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="Example Configuration\SIMPLBridging\SIMPLBridgeExample_configurationFile.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="SGD\PepperDash Essentials iPad.sgd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="SGD\PepperDash Essentials TSW-560.sgd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="SGD\PepperDash Essentials TSW-760.sgd">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.Program" Version="2.21.65" />
|
||||
<PackageReference Include="Crestron.SimplSharp.SDK.ProgramLibrary" Version="2.21.65" />
|
||||
<PackageReference Include="PepperDashCore" Version="2.0.0-alpha-439" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PepperDash.Essentials.Core\PepperDash.Essentials.Core.csproj" />
|
||||
<ProjectReference Include="..\PepperDash.Essentials.Devices.Common\PepperDash.Essentials.Devices.Common.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user