diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs
index 736a250f..e40cce4e 100644
--- a/PepperDashEssentials/ControlSystem.cs
+++ b/PepperDashEssentials/ControlSystem.cs
@@ -80,7 +80,7 @@ namespace PepperDash.Essentials
CrestronConsole.AddNewConsoleCommand(PluginLoader.ReportAssemblyVersions, "reportversions", "Reports the versions of the loaded assemblies", ConsoleAccessLevelEnum.AccessOperator);
- CrestronConsole.AddNewConsoleCommand(PepperDash.Essentials.Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
+ CrestronConsole.AddNewConsoleCommand(Core.DeviceFactory.GetDeviceFactoryTypes, "gettypes", "Gets the device types that can be built. Accepts a filter string.", ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(BridgeHelper.PrintJoinMap, "getjoinmap", "map(s) for bridge or device on bridge [brKey [devKey]]", ConsoleAccessLevelEnum.AccessOperator);
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs
index 57bf2287..65efd0b9 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/DeviceManager.cs
@@ -388,20 +388,18 @@ namespace PepperDash.Essentials.Core
var outputPorts = ((device as IRoutingOutputs) != null) ? (device as IRoutingOutputs).OutputPorts : null;
if (inputPorts != null)
{
- Debug.Console(0, "Device {0} has {1} Input Ports:", s, inputPorts.Count);
+ CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Input Ports:", s, inputPorts.Count);
foreach (var routingInputPort in inputPorts)
{
- Debug.Console(0, "{0}", routingInputPort.Key);
- }
- }
- if (outputPorts != null)
- {
- Debug.Console(0, "Device {0} has {1} Output Ports:", s, outputPorts.Count);
- foreach (var routingOutputPort in outputPorts)
- {
- Debug.Console(0, "{0}", routingOutputPort.Key);
+ CrestronConsole.ConsoleCommandResponse("{0}", routingInputPort.Key);
}
}
+ if (outputPorts == null) return;
+ CrestronConsole.ConsoleCommandResponse("Device {0} has {1} Output Ports:", s, outputPorts.Count);
+ foreach (var routingOutputPort in outputPorts)
+ {
+ CrestronConsole.ConsoleCommandResponse("{0}", routingOutputPort.Key);
+ }
}
///
@@ -435,7 +433,7 @@ namespace PepperDash.Essentials.Core
if (device == null)
{
- Debug.Console(0, "Unable to get device with key: {0}", deviceKey);
+ CrestronConsole.ConsoleCommandResponse("Unable to get device with key: {0}", deviceKey);
return;
}
@@ -447,7 +445,7 @@ namespace PepperDash.Essentials.Core
}
catch
{
- Debug.Console(0, "Unable to convert setting value. Please use off/rx/tx/both");
+ CrestronConsole.ConsoleCommandResponse("Unable to convert setting value. Please use off/rx/tx/both");
return;
}
@@ -458,18 +456,18 @@ namespace PepperDash.Essentials.Core
var min = Convert.ToUInt32(timeout);
device.StreamDebugging.SetDebuggingWithSpecificTimeout(debugSetting, min);
- Debug.Console(0, "Device: '{0}' debug level set to {1} for {2} minutes", deviceKey, debugSetting, min);
+ CrestronConsole.ConsoleCommandResponse("Device: '{0}' debug level set to {1} for {2} minutes", deviceKey, debugSetting, min);
}
catch (Exception e)
{
- Debug.Console(0, "Unable to convert minutes or settings value. Please use an integer value for minutes. Errro: {0}", e);
+ CrestronConsole.ConsoleCommandResponse("Unable to convert minutes or settings value. Please use an integer value for minutes. Error: {0}", e);
}
}
else
{
device.StreamDebugging.SetDebuggingWithDefaultTimeout(debugSetting);
- Debug.Console(0, "Device: '{0}' debug level set to {1} for default time (30 minutes)", deviceKey, debugSetting);
+ CrestronConsole.ConsoleCommandResponse("Device: '{0}' debug level set to {1} for default time (30 minutes)", deviceKey, debugSetting);
}
}
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
index bad3e531..793ff34a 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Factory/DeviceFactory.cs
@@ -172,21 +172,14 @@ namespace PepperDash.Essentials.Core
///
/// Prints the type names and associated metadata from the FactoryMethods collection.
///
- ///
+ ///
public static void GetDeviceFactoryTypes(string filter)
{
- Dictionary types = new Dictionary();
+ var types = !string.IsNullOrEmpty(filter)
+ ? FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value)
+ : FactoryMethods;
- if (!string.IsNullOrEmpty(filter))
- {
- types = FactoryMethods.Where(k => k.Key.Contains(filter)).ToDictionary(k => k.Key, k => k.Value);
- }
- else
- {
- types = FactoryMethods;
- }
-
- Debug.Console(0, "Device Types:");
+ CrestronConsole.ConsoleCommandResponse("Device Types:");
foreach (var type in types.OrderBy(t => t.Key))
{
@@ -198,7 +191,7 @@ namespace PepperDash.Essentials.Core
cType = type.Value.CType.FullName;
}
- Debug.Console(0,
+ CrestronConsole.ConsoleCommandResponse(
@"Type: '{0}'
CType: '{1}'
Description: {2}", type.Key, cType, description);
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs
index 8f484121..60aa6275 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/JoinMaps/JoinMapBase.cs
@@ -101,22 +101,22 @@ namespace PepperDash.Essentials.Core
///
public void PrintJoinMapInfo()
{
- Debug.Console(0, "{0}:\n", GetType().Name);
+ CrestronConsole.ConsoleCommandResponse("{0}:\n", GetType().Name);
// Get the joins of each type and print them
- Debug.Console(0, "Digitals:");
+ CrestronConsole.ConsoleCommandResponse("Digitals:");
var digitals = Joins.Where(j => (j.Value.JoinType & eJoinType.Digital) == eJoinType.Digital).ToDictionary(j => j.Key, j => j.Value);
- Debug.Console(2, "Found {0} Digital Joins", digitals.Count);
+ CrestronConsole.ConsoleCommandResponse("Found {0} Digital Joins", digitals.Count);
PrintJoinList(GetSortedJoins(digitals));
- Debug.Console(0, "Analogs:");
+ CrestronConsole.ConsoleCommandResponse("Analogs:");
var analogs = Joins.Where(j => (j.Value.JoinType & eJoinType.Analog) == eJoinType.Analog).ToDictionary(j => j.Key, j => j.Value);
- Debug.Console(2, "Found {0} Analog Joins", analogs.Count);
+ CrestronConsole.ConsoleCommandResponse("Found {0} Analog Joins", analogs.Count);
PrintJoinList(GetSortedJoins(analogs));
- Debug.Console(0, "Serials:");
+ CrestronConsole.ConsoleCommandResponse("Serials:");
var serials = Joins.Where(j => (j.Value.JoinType & eJoinType.Serial) == eJoinType.Serial).ToDictionary(j => j.Key, j => j.Value);
- Debug.Console(2, "Found {0} Serial Joins", serials.Count);
+ CrestronConsole.ConsoleCommandResponse("Found {0} Serial Joins", serials.Count);
PrintJoinList(GetSortedJoins(serials));
}
@@ -139,7 +139,7 @@ namespace PepperDash.Essentials.Core
{
foreach (var join in joins)
{
- Debug.Console(0,
+ CrestronConsole.ConsoleCommandResponse(
@"Join Number: {0} | Label: '{1}' | JoinSpan: '{2}' | Type: '{3}' | Capabilities: '{4}'",
join.Value.JoinNumber,
join.Value.Label,
@@ -280,7 +280,7 @@ namespace PepperDash.Essentials.Core
{
var pluginType = GetType().Name;
- Debug.Console(0, "{0}:\n", pluginType);
+ CrestronConsole.ConsoleCommandResponse("{0}:\n", pluginType);
@@ -295,7 +295,7 @@ namespace PepperDash.Essentials.Core
using (var sw = new StreamWriter(fileName))
{
sw.WriteLine(stringBuilder.ToString());
- Debug.Console(0, "Joinmap Readme generated and written to {0}", fileName);
+ CrestronConsole.ConsoleCommandResponse("Joinmap Readme generated and written to {0}", fileName);
}
}
@@ -314,20 +314,6 @@ namespace PepperDash.Essentials.Core
return sortedJoins;
}
- void PrintJoinList(IEnumerable> joins)
- {
- foreach (var join in joins)
- {
- Debug.Console(0,
- @"Join Number: {0} | JoinSpan: '{1}' | JoinName: {2} | Description: '{3}' | Type: '{4}' | Capabilities: '{5}'",
- join.Value.JoinNumber,
- join.Value.JoinSpan,
- join.Key,
- String.IsNullOrEmpty(join.Value.AttributeName) ? join.Value.Metadata.Label : join.Value.AttributeName,
- join.Value.Metadata.JoinType.ToString(),
- join.Value.Metadata.JoinCapabilities.ToString());
- }
- }
static StringBuilder AppendJoinList(List> joins)
{
diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs
index 9da843b8..f69d35d0 100644
--- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs
+++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginLoader.cs
@@ -194,10 +194,11 @@ namespace PepperDash.Essentials
///
public static void ReportAssemblyVersions(string command)
{
- Debug.Console(0, "Loaded Assemblies:");
+
+ CrestronConsole.ConsoleCommandResponse("Loaded Assemblies:");
foreach (var assembly in LoadedAssemblies)
{
- Debug.Console(0, "{0} Version: {1}", assembly.Name, assembly.Version);
+ CrestronConsole.ConsoleCommandResponse("{0} Version: {1}", assembly.Name, assembly.Version);
}
}