Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update debugging and add web stuff #169

Merged
merged 37 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
6174400
Updates merge to ignore uid and merge on key only for devices
ndorin Oct 27, 2023
2f11805
feat: Initial implementation of DebugWebsocketSink
ndorin Oct 30, 2023
d43965b
Adds log methods
ndorin Oct 31, 2023
90e1dc7
Adds webserver classes from development branch into 2.0 branch
ndorin Oct 31, 2023
c9f3d77
Adds back in crestron console print statements when running on appliance
ndorin Nov 1, 2023
baa54e4
Gets rid of CloseAndFlush temporarily
ndorin Nov 1, 2023
0266edd
feat: exposes methods to control wssv
ndorin Nov 6, 2023
93c7dbe
fix: fixes accessiblity level
ndorin Nov 7, 2023
95312a8
feat: exposes Port and IsListening properties
ndorin Nov 7, 2023
a876de7
fix: fixes Port issue
ndorin Nov 7, 2023
b845e42
fix: adds null checks
ndorin Nov 7, 2023
12ef858
feat: adds status messages for wssv
ndorin Nov 7, 2023
2223e09
fix: Assigns a value to the sink local var
ndorin Nov 7, 2023
7517666
fix: better way to instantiate websocket sink
ndorin Nov 7, 2023
a82e53c
feat: Adds WebSocketBehaviour
ndorin Nov 7, 2023
072d77a
feat: adds BouncyCertificate
ndorin Nov 8, 2023
846abe2
fix: fixed debug message formatting
ndorin Nov 15, 2023
7872468
fix: more string formatting updates
ndorin Nov 16, 2023
0e7672d
fix: swaps debug statements in CreateCert method for printlines as lo…
ndorin Nov 16, 2023
3ce2847
fix: updates path on service
ndorin Nov 16, 2023
eece4de
fix: adds debug statement to log output
ndorin Nov 20, 2023
40f540e
fix: fix rootPath for wss server
ndorin Nov 20, 2023
19032a0
fix: Adds url property and utilizes private _path for consistency
ndorin Nov 20, 2023
6c51ce5
fix: adds IP from ethernet helper class
ndorin Nov 20, 2023
29c3fe2
fix: adds text formatter
ndorin Nov 20, 2023
fac2106
fix: switches formatters
ndorin Nov 20, 2023
6c32f37
fix: makes logging format consistent
ndorin Nov 20, 2023
15024b5
feat: adds console sink for Serilog
ndorin Nov 22, 2023
3debb30
fix: consolidates log messages
ndorin Nov 22, 2023
6580019
feat: adds methods to get/set websocket min log level
ndorin Nov 23, 2023
5b2453c
feat: improments to setting debug level from console
ndorin Nov 23, 2023
1abffd8
fix: reworks how the console debug level is set
ndorin Nov 23, 2023
5931c1f
fix: fixes setting log level in LogMessage
ndorin Nov 23, 2023
58fcd91
fix: minor adjustments to debug statement levels
ndorin Nov 23, 2023
9001c6c
feat: sets debug level on output log messages from websocket server
ndorin Nov 24, 2023
def22cf
fix: sets overall min log level in logger config
ndorin Nov 29, 2023
b13a178
Merge dev-2
andrew-welker Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Pepperdash Core/Config/PortalConfigReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static JObject MergeConfigs(JObject doubleConfig)
merged.Add("info", template["info"]);

merged.Add("devices", MergeArraysOnTopLevelProperty(template["devices"] as JArray,
system["devices"] as JArray, "uid", "devices"));
system["devices"] as JArray, "key", "devices"));

if (system["rooms"] == null)
merged.Add("rooms", template["rooms"]);
Expand Down Expand Up @@ -123,7 +123,7 @@ public static JObject MergeConfigs(JObject doubleConfig)
else
merged.Add("global", template["global"]);

Debug.Console(2, "MERGED CONFIG RESULT: \x0d\x0a{0}", merged);
//Debug.Console(2, "MERGED CONFIG RESULT: \x0d\x0a{0}", merged);
return merged;
}

Expand Down
10 changes: 6 additions & 4 deletions src/Pepperdash Core/CoreInterfaces.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Serilog;

namespace PepperDash.Core
{
Expand All @@ -15,16 +16,17 @@ public interface IKeyed
/// Unique Key
/// </summary>
string Key { get; }
}
}

/// <summary>
/// Named Keyed device interface. Forces the devie to have a Unique Key and a name.
/// Named Keyed device interface. Forces the device to have a Unique Key and a name.
/// </summary>
public interface IKeyName : IKeyed
{
{
/// <summary>
/// Isn't it obvious :)
/// </summary>
string Name { get; }
}
}

}
5 changes: 4 additions & 1 deletion src/Pepperdash Core/Device.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Serilog;
using Serilog.Core;
using Serilog.Sinks.SystemConsole;

namespace PepperDash.Core
{
Expand All @@ -10,6 +13,7 @@ namespace PepperDash.Core
/// </summary>
public class Device : IKeyName
{

/// <summary>
/// Unique Key
/// </summary>
Expand Down Expand Up @@ -51,7 +55,6 @@ public Device(string key)
Key = key;
if (key.Contains('.')) Debug.Console(0, this, "WARNING: Device name's should not include '.'");
Name = "";

}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Pepperdash Core/JsonToSimpl/JsonToSimplFileMaster.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void EvaluateFile(string filepath)
/// Sets the debug level
/// </summary>
/// <param name="level"></param>
public void setDebugLevel(int level)
public void setDebugLevel(uint level)
{
Debug.SetDebugLevel(level);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ FileInfo GetActualFileInfoFromPath(string path)
///
/// </summary>
/// <param name="level"></param>
public void setDebugLevel(int level)
public void setDebugLevel(uint level)
{
Debug.SetDebugLevel(level);
}
Expand Down
Loading