From 016becd1f56f8c20b067b814dbb3fb55393f4ac1 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Wed, 17 Jun 2020 22:32:02 -0600 Subject: [PATCH 1/7] Adds latest release link to readme --- Readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Readme.md b/Readme.md index bf8facf..ab3ecf9 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,7 @@ # PepperDash Core (c) 2020 +## [Latest Release](https://github.com/PepperDash/PepperDashCore/releases/latest) + ## License Provided under MIT license From a67baaa9c8589b9f6ff0fa030363ce40e0bc94a7 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Wed, 24 Jun 2020 13:05:55 -0600 Subject: [PATCH 2/7] Change buffer size back to 65534 for GenericSshClient --- Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs index 69fa3be..f782de2 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs @@ -243,7 +243,7 @@ namespace PepperDash.Core try { Client.Connect(); - TheStream = Client.CreateShellStream("PDTShell", 100, 80, 100, 200, 100000); + TheStream = Client.CreateShellStream("PDTShell", 100, 80, 100, 200, 65534); TheStream.DataReceived += Stream_DataReceived; //TheStream.ErrorOccurred += TheStream_ErrorOccurred; Debug.Console(1, this, "Connected"); From cf21ae888aff8a4b86168fe5598ebfdcecd5929e Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 23 Jul 2020 10:59:57 -0600 Subject: [PATCH 3/7] adding nuget.org publishing --- .github/workflows/docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index bf0a9d4..d0ee7a2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -144,10 +144,14 @@ jobs: uses: nuget/setup-nuget@v1 - name: Add Github Packages source run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} + - name: Add nuget.org source + run: nuget sources add -name nuget -source https://api.nuget.org/v3/index.json -key ${{ secrets.NUGET_API_KEY }} - name: Create nuget package run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry run: nuget push **/*.nupkg -source github + - name: Publish nuget package to nuget.org + run: nuget push **/*.nupkg -source nuget # This step always runs and pushes the build to the internal build rep Internal_Push_Output: needs: Build_Project From 082c24882dcd564780595681e635542b46ccbdaf Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 23 Jul 2020 11:18:58 -0600 Subject: [PATCH 4/7] fix for nuget source command --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d0ee7a2..8d60ca7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -145,7 +145,7 @@ jobs: - name: Add Github Packages source run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} - name: Add nuget.org source - run: nuget sources add -name nuget -source https://api.nuget.org/v3/index.json -key ${{ secrets.NUGET_API_KEY }} + run: nuget sources add -name nuget -source https://api.nuget.org/v3/index.json -username andrew-welker -password ${{ secrets.NUGET_API_KEY }} - name: Create nuget package run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry From 3c6eb034332ada41beea8586dfedac32b4abb907 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 23 Jul 2020 22:33:24 -0600 Subject: [PATCH 5/7] add API Key --- .github/workflows/docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8d60ca7..17fcebf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -144,14 +144,14 @@ jobs: uses: nuget/setup-nuget@v1 - name: Add Github Packages source run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} - - name: Add nuget.org source - run: nuget sources add -name nuget -source https://api.nuget.org/v3/index.json -username andrew-welker -password ${{ secrets.NUGET_API_KEY }} + - name: Add nuget.org API Key + run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry run: nuget push **/*.nupkg -source github - name: Publish nuget package to nuget.org - run: nuget push **/*.nupkg -source nuget + run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json # This step always runs and pushes the build to the internal build rep Internal_Push_Output: needs: Build_Project From 25048448762aa1be76218f3f18c12684548eab28 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Thu, 23 Jul 2020 23:00:14 -0600 Subject: [PATCH 6/7] rename master -> main & add nuget push --- .github/workflows/{master.yml => main.yml} | 4 ++++ 1 file changed, 4 insertions(+) rename .github/workflows/{master.yml => main.yml} (97%) diff --git a/.github/workflows/master.yml b/.github/workflows/main.yml similarity index 97% rename from .github/workflows/master.yml rename to .github/workflows/main.yml index eefdcde..b41e08c 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/main.yml @@ -119,10 +119,14 @@ jobs: uses: nuget/setup-nuget@v1 - name: Add Github Packages source run: nuget sources add -name github -source https://nuget.pkg.github.com/pepperdash/index.json -username Pepperdash -password ${{ secrets.GITHUB_TOKEN }} + - name: Add nuget.org API Key + run: nuget setApiKey ${{ secrets.NUGET_API_KEY }} - name: Create nuget package run: nuget pack "./PepperDash_Core.nuspec" -version ${{ env.VERSION }} - name: Publish nuget package to Github registry run: nuget push **/*.nupkg -source github + - name: Publish nuget package to nuget.org + run: nuget push **/*.nupkg -Source https://api.nuget.org/v3/index.json Internal_Push_Output: needs: Build_Project runs-on: windows-latest From 6133df971d1362de640326571f6bdb9a19c98243 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 14 Aug 2020 10:51:49 -0600 Subject: [PATCH 7/7] Initialize `StreamDebugging` from S+ constructors --- Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs | 9 +++++++-- .../Pepperdash Core/Comm/GenericTcpIpClient.cs | 6 ++++-- Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs | 4 +++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs index f782de2..3bc7c21 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericSshClient.cs @@ -13,6 +13,7 @@ namespace PepperDash.Core /// public class GenericSshClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect { + private const string SPlusKey = "Uninitialized SshClient"; public CommunicationStreamDebugging StreamDebugging { get; private set; } /// @@ -155,8 +156,9 @@ namespace PepperDash.Core /// S+ Constructor - Must set all properties before calling Connect /// public GenericSshClient() - : base("Uninitialized SshClient") + : base(SPlusKey) { + StreamDebugging = new CommunicationStreamDebugging(SPlusKey); CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler); AutoReconnectIntervalMs = 5000; } @@ -437,8 +439,11 @@ namespace PepperDash.Core } } - catch + catch (Exception ex) { + Debug.Console(0, "Exception: {0}", ex.Message); + Debug.Console(0, "Stack Trace: {0}", ex.StackTrace); + Debug.Console(1, this, "Stream write failed. Disconnected, closing"); ClientStatus = SocketStatus.SOCKET_STATUS_BROKEN_REMOTELY; HandleConnectionFailure(); diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs index 3d77ad1..7303d01 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericTcpIpClient.cs @@ -15,7 +15,8 @@ namespace PepperDash.Core /// A class to handle basic TCP/IP communications with a server /// public class GenericTcpIpClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect - { + { + private const string SplusKey = "Uninitialized TcpIpClient"; public CommunicationStreamDebugging StreamDebugging { get; private set; } /// @@ -204,8 +205,9 @@ namespace PepperDash.Core /// Default constructor for S+ /// public GenericTcpIpClient() - : base("Uninitialized TcpIpClient") + : base(SplusKey) { + StreamDebugging = new CommunicationStreamDebugging(SplusKey); CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler); AutoReconnectIntervalMs = 5000; BufferSize = 2000; diff --git a/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs b/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs index 1e9dddd..1ed3d68 100644 --- a/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs +++ b/Pepperdash Core/Pepperdash Core/Comm/GenericUdpServer.cs @@ -17,6 +17,7 @@ namespace PepperDash.Core { public class GenericUdpServer : Device, ISocketStatusWithStreamDebugging { + private const string SplusKey = "Uninitialized Udp Server"; public CommunicationStreamDebugging StreamDebugging { get; private set; } /// /// @@ -119,8 +120,9 @@ namespace PepperDash.Core /// Constructor for S+. Make sure to set key, address, port, and buffersize using init method /// public GenericUdpServer() - : base("Uninitialized Udp Server") + : base(SplusKey) { + StreamDebugging = new CommunicationStreamDebugging(SplusKey); BufferSize = 5000; DequeueLock = new CCriticalSection(); MessageQueue = new CrestronQueue();