DGI.Framework.Communications.Generic.SSHClient 1.0.0-rc1
SSH Client for DGI AV Framework
Provides an SSH client communications with servers with connection retries when connection is not successful. Connection retry interval is fast in the beginning and (500ms 3 times) to long intervals (10s after 11 times) . The timing is ideal for applications when the device might not always be online. This way the network is not task with constant SSH connection traffic.
The driver implements ICommunications for easy interfacing with Devices Drivers.
The constructor takes a configuration file that can be created in the program, or loaded from a JSON file. Loading it from a file needs to be handled by the host application.
It relies entirely on .Net standard libraries.
Structured Logging
This driver accepts a Property of type ILogger to add Serilog as a Dependency Injection. If no property is assigned, the class will log to the Global Logger. If no Global Logger is created, no logging will take place.
This class takes advantage of Serilog's SourceContext, which will Enrich the log with the Class Name. To display it, make sure to add the SouceContext property to your message template.
Logs generated in this class are Verbose, and Debug and Warning. All exceptions have been caught.
A typical Global Logger assigned in the ControlSystem main block will look like this
Log.Logger = new LoggerConfiguration()
.WriteTo.CrestronConsole(outputTemplate:"[{SourceContext} - {Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}" )
.WriteTo.CrestronErrorLog(outputTemplate:"[{SourceContext} - {Level:u3}] {Message:lj}{NewLine}{Exception}")
.CreateLogger();
Showing the top 20 packages that depend on DGI.Framework.Communications.Generic.SSHClient.
| Packages | Downloads |
|---|---|
|
DGI.Framework.Core.RemoteDeviceFactory
Creates Remote Drivers for Remote Devices
|
6 |
.NET Framework 4.7
- Core.Renci.SshNet (>= 2021.10.2)
- DGI.Framework.Core (>= 1.0.0-rc1)
.NET 5.0
- Core.Renci.SshNet (>= 2021.10.2)
- DGI.Framework.Core (>= 1.0.0-rc1)
.NET 6.0
- Core.Renci.SshNet (>= 2021.10.2)
- DGI.Framework.Core (>= 1.0.0-rc1)
.NET 7.0
- Core.Renci.SshNet (>= 2021.10.2)
- DGI.Framework.Core (>= 1.0.0-rc1)