diff --git a/RSTP_DSLink/.vs/ProjectSettings.json b/RSTP_DSLink/.vs/ProjectSettings.json
new file mode 100644
index 0000000..f8b4888
--- /dev/null
+++ b/RSTP_DSLink/.vs/ProjectSettings.json
@@ -0,0 +1,3 @@
+{
+ "CurrentProjectSetting": null
+}
\ No newline at end of file
diff --git a/RSTP_DSLink/.vs/RSTP_DSLink/DesignTimeBuild/.dtbcache.v2 b/RSTP_DSLink/.vs/RSTP_DSLink/DesignTimeBuild/.dtbcache.v2
new file mode 100644
index 0000000..b29735c
Binary files /dev/null and b/RSTP_DSLink/.vs/RSTP_DSLink/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/RSTP_DSLink/.vs/RSTP_DSLink/v16/.suo b/RSTP_DSLink/.vs/RSTP_DSLink/v16/.suo
index a46838e..07e8ebf 100644
Binary files a/RSTP_DSLink/.vs/RSTP_DSLink/v16/.suo and b/RSTP_DSLink/.vs/RSTP_DSLink/v16/.suo differ
diff --git a/RSTP_DSLink/.vs/VSWorkspaceState.json b/RSTP_DSLink/.vs/VSWorkspaceState.json
new file mode 100644
index 0000000..523ebe2
--- /dev/null
+++ b/RSTP_DSLink/.vs/VSWorkspaceState.json
@@ -0,0 +1,7 @@
+{
+ "ExpandedNodes": [
+ ""
+ ],
+ "SelectedNode": "\\RSTP_DSLink.sln",
+ "PreviewInSolutionExplorer": false
+}
\ No newline at end of file
diff --git a/RSTP_DSLink/.vs/slnx.sqlite b/RSTP_DSLink/.vs/slnx.sqlite
new file mode 100644
index 0000000..114cefd
Binary files /dev/null and b/RSTP_DSLink/.vs/slnx.sqlite differ
diff --git a/RSTP_DSLink/RSTP_DSLink/Driver.cs b/RSTP_DSLink/RSTP_DSLink/Driver.cs
new file mode 100644
index 0000000..f7e1682
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/Driver.cs
@@ -0,0 +1,170 @@
+using System;
+using System.Collections.Generic;
+using System.Device.Gpio;
+using System.Net;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Iot.Device.Pigpio
+{
+ ///
+ ///
+ ///
+ public class Driver : GpioDriver
+ {
+ private readonly IPEndPoint _endpoint;
+ private readonly PigpiodIf _proxy;
+ private readonly List _openPins;
+
+ ///
+ ///
+ ///
+ ///
+ public Driver(IPEndPoint endpoint)
+ {
+ _endpoint = endpoint;
+ _proxy = new PigpiodIf();
+
+ _openPins = new List();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ public Task ConnectAsync()
+ {
+ _proxy.pigpio_start(_endpoint.Address.ToString(), _endpoint.Port.ToString());
+
+ return Task.CompletedTask;
+ }
+
+ ///
+ protected override int PinCount => PigpiodIf.PI_MAX_USER_GPIO;
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected override void AddCallbackForPinValueChangedEvent(int pinNumber, PinEventTypes eventTypes, PinChangeEventHandler callback)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ protected override void ClosePin(int pinNumber)
+ {
+ if (_openPins.Contains(pinNumber))
+ {
+ _openPins.Remove(pinNumber);
+ }
+ else
+ {
+ throw new InvalidOperationException($"Pin '{pinNumber}' hasn't been opened");
+ }
+ }
+
+ ///
+ protected override int ConvertPinNumberToLogicalNumberingScheme(int pinNumber)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ protected override PinMode GetPinMode(int pinNumber)
+ {
+ var mode = _proxy.get_mode((uint)pinNumber);
+
+ switch (mode)
+ {
+ case PigpiodIf.PI_INPUT: return PinMode.Input;
+ case PigpiodIf.PI_OUTPUT: return PinMode.Output;
+ default: throw new ArgumentException($"Unknown PinMode value '{mode}'");
+ }
+ }
+
+ ///
+ protected override bool IsPinModeSupported(int pinNumber, PinMode mode)
+ {
+ switch (mode)
+ {
+ case PinMode.Input: return true;
+ case PinMode.InputPullUp: return true;
+ case PinMode.InputPullDown: return true;
+ case PinMode.Output: return true;
+ default: return false; // Only input & output supported ATM. Should be increased to support input-pullup/pulldown
+ }
+ }
+
+ ///
+ protected override void OpenPin(int pinNumber)
+ {
+ if (!_openPins.Contains(pinNumber))
+ {
+ _openPins.Add(pinNumber);
+ }
+ else
+ {
+ throw new InvalidOperationException($"Pin '{pinNumber}' is already been open");
+ }
+ }
+
+ ///
+ protected override PinValue Read(int pinNumber)
+ {
+ return _proxy.gpio_read((uint)pinNumber);
+ }
+
+ ///
+ protected override void RemoveCallbackForPinValueChangedEvent(int pinNumber, PinChangeEventHandler callback)
+ {
+ throw new NotImplementedException();
+ }
+
+ ///
+ protected override void SetPinMode(int pinNumber, PinMode pinMode)
+ {
+ var mode = pinMode.AsMode();
+ var pud = pinMode.AsPullUpDown();
+
+ _proxy.set_mode((uint)pinNumber, mode);
+ _proxy.set_pull_up_down((uint)pinNumber, pud);
+ }
+
+ ///
+ protected override WaitForEventResult WaitForEvent(int pinNumber, PinEventTypes eventTypes, CancellationToken cancellationToken)
+ {
+ bool eventDetected = false;
+ int oldValue = _proxy.gpio_read((uint)pinNumber);
+ int newValue;
+ while (!eventDetected && !cancellationToken.IsCancellationRequested)
+ {
+ newValue = _proxy.gpio_read ((uint)pinNumber);
+ //Console.WriteLine(newValue);
+
+ if ((eventTypes == PinEventTypes.Rising && newValue == 1 && oldValue == 0)
+ || (eventTypes == PinEventTypes.Falling && newValue == 0 && oldValue == 1))
+ eventDetected = true;
+
+ oldValue = newValue;
+ //System.Threading.Thread.Sleep(500);
+ }
+
+ WaitForEventResult result;
+ result.EventTypes = cancellationToken.IsCancellationRequested?PinEventTypes.None:eventTypes;
+ //If the task was cancelled, the event type is none
+ result.TimedOut = false;
+ return result;
+ }
+
+ ///
+ protected override void Write(int pinNumber, PinValue pinValue)
+ {
+ var value = pinValue.AsValue();
+
+ _proxy.gpio_write((uint)pinNumber, value);
+ }
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/Helpers.cs b/RSTP_DSLink/RSTP_DSLink/Helpers.cs
new file mode 100644
index 0000000..1e5fb30
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/Helpers.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Device.Gpio;
+
+namespace Iot.Device.Pigpio
+{
+ internal static class Helpers
+ {
+ public static uint AsMode(this PinMode mode)
+ {
+ switch (mode)
+ {
+ case PinMode.Input: return PigpiodIf.PI_INPUT;
+ case PinMode.InputPullUp: return PigpiodIf.PI_INPUT;
+ case PinMode.InputPullDown: return PigpiodIf.PI_INPUT;
+ case PinMode.Output: return PigpiodIf.PI_OUTPUT;
+ default: throw new ArgumentException($"PinMode value of '{mode}' is not valid");
+ }
+ }
+
+ public static uint AsPullUpDown(this PinMode mode)
+ {
+ switch (mode)
+ {
+ case PinMode.InputPullUp: return PigpiodIf.PI_PUD_UP;
+ case PinMode.InputPullDown: return PigpiodIf.PI_PUD_DOWN;
+ default: return PigpiodIf.PI_PUD_OFF;
+ }
+ }
+
+
+ public static uint AsValue(this PinValue value)
+ {
+ return (uint)(int)value;
+ }
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/PigpiodIf.cs b/RSTP_DSLink/RSTP_DSLink/PigpiodIf.cs
new file mode 100644
index 0000000..603e6b5
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/PigpiodIf.cs
@@ -0,0 +1,2789 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Net.Sockets;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+// Disable all XML Comment warnings in this file as copied from elsewhere //
+#pragma warning disable 1591
+
+namespace Iot.Device.Pigpio
+{
+ ///
+ /// Pigpiod C# Interface for debugging in Visual Studio using GPIO of Raspberry Pi
+ ///
+ ///
+ /// From here: https://github.com/Rapidnack/PigpiodIfTest
+ ///
+ public class PigpiodIf : IDisposable
+ {
+ private class GpioExtent
+ {
+ public byte[] Contents { get; set; }
+ }
+
+ public class GpioReport
+ {
+ public UInt16 seqno { get; set; }
+ public UInt16 flags { get; set; }
+ public UInt32 tick { get; set; }
+ public UInt32 level { get; set; }
+ }
+
+
+ public class Callback
+ {
+ public int gpio { get; set; }
+ public int edge { get; set; }
+ public Action f { get; set; }
+ public object user { get; set; }
+ public int ex { get; set; }
+ }
+
+
+ public class EvtCallback
+ {
+ public int evt { get; set; }
+ public Action f { get; set; }
+ public object user { get; set; }
+ public int ex { get; set; }
+ }
+
+
+ public class GpioPulse
+ {
+ public UInt32 gpioOn { get; set; }
+ public UInt32 gpioOff { get; set; }
+ public UInt32 usDelay { get; set; }
+ }
+
+
+ #region # public enum
+
+ public enum EError
+ {
+ pigif_bad_send = -2000,
+ pigif_bad_recv = -2001,
+ pigif_bad_getaddrinfo = -2002,
+ pigif_bad_connect = -2003,
+ pigif_bad_socket = -2004,
+ pigif_bad_noib = -2005,
+ pigif_duplicate_callback = -2006,
+ pigif_bad_malloc = -2007,
+ pigif_bad_callback = -2008,
+ pigif_notify_failed = -2009,
+ pigif_callback_not_found = -2010,
+ pigif_unconnected_pi = -2011,
+ pigif_too_many_pis = -2012,
+ }
+
+ #endregion
+
+
+ #region # event
+
+ public event EventHandler CommandStreamChanged;
+ public event EventHandler NotifyStreamChanged;
+ public event EventHandler StreamChanged;
+ public event EventHandler StreamConnected;
+
+ #endregion
+
+
+ #region # private const
+
+ private const string PI_DEFAULT_SOCKET_PORT_STR = "8888";
+ private const string PI_DEFAULT_SOCKET_ADDR_STR = "127.0.0.1";
+
+ private const int PI_MAX_REPORTS_PER_READ = 4096;
+
+ private const int PIGPIOD_IF2_VERSION = 13;
+
+ /*DEF_S Socket Command Codes*/
+
+ private const int PI_CMD_MODES = 0;
+ private const int PI_CMD_MODEG = 1;
+ private const int PI_CMD_PUD = 2;
+ private const int PI_CMD_READ = 3;
+ private const int PI_CMD_WRITE = 4;
+ private const int PI_CMD_PWM = 5;
+ private const int PI_CMD_PRS = 6;
+ private const int PI_CMD_PFS = 7;
+ private const int PI_CMD_SERVO = 8;
+ private const int PI_CMD_WDOG = 9;
+ private const int PI_CMD_BR1 = 10;
+ private const int PI_CMD_BR2 = 11;
+ private const int PI_CMD_BC1 = 12;
+ private const int PI_CMD_BC2 = 13;
+ private const int PI_CMD_BS1 = 14;
+ private const int PI_CMD_BS2 = 15;
+ private const int PI_CMD_TICK = 16;
+ private const int PI_CMD_HWVER = 17;
+ private const int PI_CMD_NO = 18;
+ private const int PI_CMD_NB = 19;
+ private const int PI_CMD_NP = 20;
+ private const int PI_CMD_NC = 21;
+ private const int PI_CMD_PRG = 22;
+ private const int PI_CMD_PFG = 23;
+ private const int PI_CMD_PRRG = 24;
+ private const int PI_CMD_HELP = 25;
+ private const int PI_CMD_PIGPV = 26;
+ private const int PI_CMD_WVCLR = 27;
+ private const int PI_CMD_WVAG = 28;
+ private const int PI_CMD_WVAS = 29;
+ private const int PI_CMD_WVGO = 30;
+ private const int PI_CMD_WVGOR = 31;
+ private const int PI_CMD_WVBSY = 32;
+ private const int PI_CMD_WVHLT = 33;
+ private const int PI_CMD_WVSM = 34;
+ private const int PI_CMD_WVSP = 35;
+ private const int PI_CMD_WVSC = 36;
+ private const int PI_CMD_TRIG = 37;
+ private const int PI_CMD_PROC = 38;
+ private const int PI_CMD_PROCD = 39;
+ private const int PI_CMD_PROCR = 40;
+ private const int PI_CMD_PROCS = 41;
+ private const int PI_CMD_SLRO = 42;
+ private const int PI_CMD_SLR = 43;
+ private const int PI_CMD_SLRC = 44;
+ private const int PI_CMD_PROCP = 45;
+ private const int PI_CMD_MICS = 46;
+ private const int PI_CMD_MILS = 47;
+ private const int PI_CMD_PARSE = 48;
+ private const int PI_CMD_WVCRE = 49;
+ private const int PI_CMD_WVDEL = 50;
+ private const int PI_CMD_WVTX = 51;
+ private const int PI_CMD_WVTXR = 52;
+ private const int PI_CMD_WVNEW = 53;
+
+ private const int PI_CMD_I2CO = 54;
+ private const int PI_CMD_I2CC = 55;
+ private const int PI_CMD_I2CRD = 56;
+ private const int PI_CMD_I2CWD = 57;
+ private const int PI_CMD_I2CWQ = 58;
+ private const int PI_CMD_I2CRS = 59;
+ private const int PI_CMD_I2CWS = 60;
+ private const int PI_CMD_I2CRB = 61;
+ private const int PI_CMD_I2CWB = 62;
+ private const int PI_CMD_I2CRW = 63;
+ private const int PI_CMD_I2CWW = 64;
+ private const int PI_CMD_I2CRK = 65;
+ private const int PI_CMD_I2CWK = 66;
+ private const int PI_CMD_I2CRI = 67;
+ private const int PI_CMD_I2CWI = 68;
+ private const int PI_CMD_I2CPC = 69;
+ private const int PI_CMD_I2CPK = 70;
+
+ private const int PI_CMD_SPIO = 71;
+ private const int PI_CMD_SPIC = 72;
+ private const int PI_CMD_SPIR = 73;
+ private const int PI_CMD_SPIW = 74;
+ private const int PI_CMD_SPIX = 75;
+
+ private const int PI_CMD_SERO = 76;
+ private const int PI_CMD_SERC = 77;
+ private const int PI_CMD_SERRB = 78;
+ private const int PI_CMD_SERWB = 79;
+ private const int PI_CMD_SERR = 80;
+ private const int PI_CMD_SERW = 81;
+ private const int PI_CMD_SERDA = 82;
+
+ private const int PI_CMD_GDC = 83;
+ private const int PI_CMD_GPW = 84;
+
+ private const int PI_CMD_HC = 85;
+ private const int PI_CMD_HP = 86;
+
+ private const int PI_CMD_CF1 = 87;
+ private const int PI_CMD_CF2 = 88;
+
+ private const int PI_CMD_BI2CC = 89;
+ private const int PI_CMD_BI2CO = 90;
+ private const int PI_CMD_BI2CZ = 91;
+
+ private const int PI_CMD_I2CZ = 92;
+
+ private const int PI_CMD_WVCHA = 93;
+
+ private const int PI_CMD_SLRI = 94;
+
+ private const int PI_CMD_CGI = 95;
+ private const int PI_CMD_CSI = 96;
+
+ private const int PI_CMD_FG = 97;
+ private const int PI_CMD_FN = 98;
+
+ private const int PI_CMD_NOIB = 99;
+
+ private const int PI_CMD_WVTXM = 100;
+ private const int PI_CMD_WVTAT = 101;
+
+ private const int PI_CMD_PADS = 102;
+ private const int PI_CMD_PADG = 103;
+
+ private const int PI_CMD_FO = 104;
+ private const int PI_CMD_FC = 105;
+ private const int PI_CMD_FR = 106;
+ private const int PI_CMD_FW = 107;
+ private const int PI_CMD_FS = 108;
+ private const int PI_CMD_FL = 109;
+
+ private const int PI_CMD_SHELL = 110;
+
+ private const int PI_CMD_BSPIC = 111;
+ private const int PI_CMD_BSPIO = 112;
+ private const int PI_CMD_BSPIX = 113;
+
+ private const int PI_CMD_BSCX = 114;
+
+ private const int PI_CMD_EVM = 115;
+ private const int PI_CMD_EVT = 116;
+
+ private const int PI_CMD_PROCU = 117;
+
+ /*DEF_E*/
+
+ /* pseudo commands */
+
+ private const int PI_CMD_SCRIPT = 800;
+
+ private const int PI_CMD_ADD = 800;
+ private const int PI_CMD_AND = 801;
+ private const int PI_CMD_CALL = 802;
+ private const int PI_CMD_CMDR = 803;
+ private const int PI_CMD_CMDW = 804;
+ private const int PI_CMD_CMP = 805;
+ private const int PI_CMD_DCR = 806;
+ private const int PI_CMD_DCRA = 807;
+ private const int PI_CMD_DIV = 808;
+ private const int PI_CMD_HALT = 809;
+ private const int PI_CMD_INR = 810;
+ private const int PI_CMD_INRA = 811;
+ private const int PI_CMD_JM = 812;
+ private const int PI_CMD_JMP = 813;
+ private const int PI_CMD_JNZ = 814;
+ private const int PI_CMD_JP = 815;
+ private const int PI_CMD_JZ = 816;
+ private const int PI_CMD_TAG = 817;
+ private const int PI_CMD_LD = 818;
+ private const int PI_CMD_LDA = 819;
+ private const int PI_CMD_LDAB = 820;
+ private const int PI_CMD_MLT = 821;
+ private const int PI_CMD_MOD = 822;
+ private const int PI_CMD_NOP = 823;
+ private const int PI_CMD_OR = 824;
+ private const int PI_CMD_POP = 825;
+ private const int PI_CMD_POPA = 826;
+ private const int PI_CMD_PUSH = 827;
+ private const int PI_CMD_PUSHA = 828;
+ private const int PI_CMD_RET = 829;
+ private const int PI_CMD_RL = 830;
+ private const int PI_CMD_RLA = 831;
+ private const int PI_CMD_RR = 832;
+ private const int PI_CMD_RRA = 833;
+ private const int PI_CMD_STA = 834;
+ private const int PI_CMD_STAB = 835;
+ private const int PI_CMD_SUB = 836;
+ private const int PI_CMD_SYS = 837;
+ private const int PI_CMD_WAIT = 838;
+ private const int PI_CMD_X = 839;
+ private const int PI_CMD_XA = 840;
+ private const int PI_CMD_XOR = 841;
+ private const int PI_CMD_EVTWT = 842;
+
+ #endregion
+
+
+ #region # public const
+
+ /* gpio: 0-53 */
+
+ public const int PI_MIN_GPIO = 0;
+ public const int PI_MAX_GPIO = 53;
+
+ /* user_gpio: 0-31 */
+
+ public const int PI_MAX_USER_GPIO = 31;
+
+ /* level: 0-1 */
+
+ public const int PI_OFF = 0;
+ public const int PI_ON = 1;
+
+ public const int PI_CLEAR = 0;
+ public const int PI_SET = 1;
+
+ public const int PI_LOW = 0;
+ public const int PI_HIGH = 1;
+
+ /* level: only reported for GPIO time-out, see gpioSetWatchdog */
+
+ public const int PI_TIMEOUT = 2;
+
+ /* mode: 0-7 */
+
+ public const int PI_INPUT = 0;
+ public const int PI_OUTPUT = 1;
+ public const int PI_ALT0 = 4;
+ public const int PI_ALT1 = 5;
+ public const int PI_ALT2 = 6;
+ public const int PI_ALT3 = 7;
+ public const int PI_ALT4 = 3;
+ public const int PI_ALT5 = 2;
+
+ /* pud: 0-2 */
+
+ public const int PI_PUD_OFF = 0;
+ public const int PI_PUD_DOWN = 1;
+ public const int PI_PUD_UP = 2;
+
+ /* dutycycle: 0-range */
+
+ public const int PI_DEFAULT_DUTYCYCLE_RANGE = 255;
+
+ /* range: 25-40000 */
+
+ public const int PI_MIN_DUTYCYCLE_RANGE = 25;
+ public const int PI_MAX_DUTYCYCLE_RANGE = 40000;
+
+ /* pulsewidth: 0, 500-2500 */
+
+ public const int PI_SERVO_OFF = 0;
+ public const int PI_MIN_SERVO_PULSEWIDTH = 500;
+ public const int PI_MAX_SERVO_PULSEWIDTH = 2500;
+
+ /* hardware PWM */
+
+ public const int PI_HW_PWM_MIN_FREQ = 1;
+ public const int PI_HW_PWM_MAX_FREQ = 125000000;
+ public const int PI_HW_PWM_RANGE = 1000000;
+
+ /* hardware clock */
+
+ public const int PI_HW_CLK_MIN_FREQ = 4689;
+ public const int PI_HW_CLK_MAX_FREQ = 250000000;
+
+ public const int PI_NOTIFY_SLOTS = 32;
+
+ public const int PI_NTFY_FLAGS_EVENT = (1 << 7);
+ public const int PI_NTFY_FLAGS_ALIVE = (1 << 6);
+ public const int PI_NTFY_FLAGS_WDOG = (1 << 5);
+ public static int PI_NTFY_FLAGS_BIT(int x) { return (((x) << 0) & 31); }
+
+ public const int PI_WAVE_BLOCKS = 4;
+ public const int PI_WAVE_MAX_PULSES = (PI_WAVE_BLOCKS * 3000);
+ public const int PI_WAVE_MAX_CHARS = (PI_WAVE_BLOCKS * 300);
+
+ public const int PI_BB_I2C_MIN_BAUD = 50;
+ public const int PI_BB_I2C_MAX_BAUD = 500000;
+
+ public const int PI_BB_SPI_MIN_BAUD = 50;
+ public const int PI_BB_SPI_MAX_BAUD = 250000;
+
+ public const int PI_BB_SER_MIN_BAUD = 50;
+ public const int PI_BB_SER_MAX_BAUD = 250000;
+
+ public const int PI_BB_SER_NORMAL = 0;
+ public const int PI_BB_SER_INVERT = 1;
+
+ public const int PI_WAVE_MIN_BAUD = 50;
+ public const int PI_WAVE_MAX_BAUD = 1000000;
+
+ public const int PI_SPI_MIN_BAUD = 32000;
+ public const int PI_SPI_MAX_BAUD = 125000000;
+
+ public const int PI_MIN_WAVE_DATABITS = 1;
+ public const int PI_MAX_WAVE_DATABITS = 32;
+
+ public const int PI_MIN_WAVE_HALFSTOPBITS = 2;
+ public const int PI_MAX_WAVE_HALFSTOPBITS = 8;
+
+ public const int PI_WAVE_MAX_MICROS = (30 * 60 * 1000000); /* half an hour */
+
+ public const int PI_MAX_WAVES = 250;
+
+ public const int PI_MAX_WAVE_CYCLES = 65535;
+ public const int PI_MAX_WAVE_DELAY = 65535;
+
+ public const int PI_WAVE_COUNT_PAGES = 10;
+
+ /* wave tx mode */
+
+ public const int PI_WAVE_MODE_ONE_SHOT = 0;
+ public const int PI_WAVE_MODE_REPEAT = 1;
+ public const int PI_WAVE_MODE_ONE_SHOT_SYNC = 2;
+ public const int PI_WAVE_MODE_REPEAT_SYNC = 3;
+
+ /* special wave at return values */
+
+ public const int PI_WAVE_NOT_FOUND = 9998; /* Transmitted wave not found. */
+ public const int PI_NO_TX_WAVE = 9999; /* No wave being transmitted. */
+
+ /* Files, I2C, SPI, SER */
+
+ public const int PI_FILE_SLOTS = 16;
+ public const int PI_I2C_SLOTS = 64;
+ public const int PI_SPI_SLOTS = 32;
+ public const int PI_SER_SLOTS = 16;
+
+ public const int PI_MAX_I2C_ADDR = 0x7F;
+
+ public const int PI_NUM_AUX_SPI_CHANNEL = 3;
+ public const int PI_NUM_STD_SPI_CHANNEL = 2;
+
+ public const int PI_MAX_I2C_DEVICE_COUNT = (1 << 16);
+ public const int PI_MAX_SPI_DEVICE_COUNT = (1 << 16);
+
+ /* max pi_i2c_msg_t per transaction */
+
+ public const int PI_I2C_RDRW_IOCTL_MAX_MSGS = 42;
+
+ /* flags for i2cTransaction, pi_i2c_msg_t */
+
+ public const int PI_I2C_M_WR = 0x0000; /* write data */
+ public const int PI_I2C_M_RD = 0x0001; /* read data */
+ public const int PI_I2C_M_TEN = 0x0010; /* ten bit chip address */
+ public const int PI_I2C_M_RECV_LEN = 0x0400; /* length will be first received byte */
+ public const int PI_I2C_M_NO_RD_ACK = 0x0800; /* if I2C_FUNC_PROTOCOL_MANGLING */
+ public const int PI_I2C_M_IGNORE_NAK = 0x1000; /* if I2C_FUNC_PROTOCOL_MANGLING */
+ public const int PI_I2C_M_REV_DIR_ADDR = 0x2000; /* if I2C_FUNC_PROTOCOL_MANGLING */
+ public const int PI_I2C_M_NOSTART = 0x4000; /* if I2C_FUNC_PROTOCOL_MANGLING */
+
+ /* bbI2CZip and i2cZip commands */
+
+ public const int PI_I2C_END = 0;
+ public const int PI_I2C_ESC = 1;
+ public const int PI_I2C_START = 2;
+ public const int PI_I2C_COMBINED_ON = 2;
+ public const int PI_I2C_STOP = 3;
+ public const int PI_I2C_COMBINED_OFF = 3;
+ public const int PI_I2C_ADDR = 4;
+ public const int PI_I2C_FLAGS = 5;
+ public const int PI_I2C_READ = 6;
+ public const int PI_I2C_WRITE = 7;
+
+ /* SPI */
+
+ public static int PI_SPI_FLAGS_BITLEN(int x) { return ((x & 63) << 16); }
+ public static int PI_SPI_FLAGS_RX_LSB(int x) { return ((x & 1) << 15); }
+ public static int PI_SPI_FLAGS_TX_LSB(int x) { return ((x & 1) << 14); }
+ public static int PI_SPI_FLAGS_3WREN(int x) { return ((x & 15) << 10); }
+ public static int PI_SPI_FLAGS_3WIRE(int x) { return ((x & 1) << 9); }
+ public static int PI_SPI_FLAGS_AUX_SPI(int x) { return ((x & 1) << 8); }
+ public static int PI_SPI_FLAGS_RESVD(int x) { return ((x & 7) << 5); }
+ public static int PI_SPI_FLAGS_CSPOLS(int x) { return ((x & 7) << 2); }
+ public static int PI_SPI_FLAGS_MODE(int x) { return ((x & 3)); }
+
+ /* Longest busy delay */
+
+ public const int PI_MAX_BUSY_DELAY = 100;
+
+ /* timeout: 0-60000 */
+
+ public const int PI_MIN_WDOG_TIMEOUT = 0;
+ public const int PI_MAX_WDOG_TIMEOUT = 60000;
+
+ /* timer: 0-9 */
+
+ public const int PI_MIN_TIMER = 0;
+ public const int PI_MAX_TIMER = 9;
+
+ /* millis: 10-60000 */
+
+ public const int PI_MIN_MS = 10;
+ public const int PI_MAX_MS = 60000;
+
+ public const int PI_MAX_SCRIPTS = 32;
+
+ public const int PI_MAX_SCRIPT_TAGS = 50;
+ public const int PI_MAX_SCRIPT_VARS = 150;
+ public const int PI_MAX_SCRIPT_PARAMS = 10;
+
+ /* script status */
+
+ public const int PI_SCRIPT_INITING = 0;
+ public const int PI_SCRIPT_HALTED = 1;
+ public const int PI_SCRIPT_RUNNING = 2;
+ public const int PI_SCRIPT_WAITING = 3;
+ public const int PI_SCRIPT_FAILED = 4;
+
+ /* signum: 0-63 */
+
+ public const int PI_MIN_SIGNUM = 0;
+ public const int PI_MAX_SIGNUM = 63;
+
+ /* timetype: 0-1 */
+
+ public const int PI_TIME_RELATIVE = 0;
+ public const int PI_TIME_ABSOLUTE = 1;
+
+ public const int PI_MAX_MICS_DELAY = 1000000; /* 1 second */
+ public const int PI_MAX_MILS_DELAY = 60000; /* 60 seconds */
+
+ /* cfgMillis */
+
+ public const int PI_BUF_MILLIS_MIN = 100;
+ public const int PI_BUF_MILLIS_MAX = 10000;
+
+ /* cfgMicros: 1, 2, 4, 5, 8, or 10 */
+
+ /* cfgPeripheral: 0-1 */
+
+ public const int PI_CLOCK_PWM = 0;
+ public const int PI_CLOCK_PCM = 1;
+
+ /* DMA channel: 0-14 */
+
+ public const int PI_MIN_DMA_CHANNEL = 0;
+ public const int PI_MAX_DMA_CHANNEL = 14;
+
+ /* port */
+
+ public const int PI_MIN_SOCKET_PORT = 1024;
+ public const int PI_MAX_SOCKET_PORT = 32000;
+
+ /* ifFlags: */
+
+ public const int PI_DISABLE_FIFO_IF = 1;
+ public const int PI_DISABLE_SOCK_IF = 2;
+ public const int PI_LOCALHOST_SOCK_IF = 4;
+ public const int PI_DISABLE_ALERT = 8;
+
+ /* memAllocMode */
+
+ public const int PI_MEM_ALLOC_AUTO = 0;
+ public const int PI_MEM_ALLOC_PAGEMAP = 1;
+ public const int PI_MEM_ALLOC_MAILBOX = 2;
+
+ /* filters */
+
+ public const int PI_MAX_STEADY = 300000;
+ public const int PI_MAX_ACTIVE = 1000000;
+
+ /* gpioCfgInternals */
+
+ public const int PI_CFG_DBG_LEVEL = 0; /* bits 0-3 */
+ public const int PI_CFG_ALERT_FREQ = 4; /* bits 4-7 */
+ public const int PI_CFG_RT_PRIORITY = (1 << 8);
+ public const int PI_CFG_STATS = (1 << 9);
+ public const int PI_CFG_NOSIGHANDLER = (1 << 10);
+
+ public const int PI_CFG_ILLEGAL_VAL = (1 << 11);
+
+
+ /* gpioISR */
+
+ public const int RISING_EDGE = 0;
+ public const int FALLING_EDGE = 1;
+ public const int EITHER_EDGE = 2;
+
+
+ /* pads */
+
+ public const int PI_MAX_PAD = 2;
+
+ public const int PI_MIN_PAD_STRENGTH = 1;
+ public const int PI_MAX_PAD_STRENGTH = 16;
+
+ /* files */
+
+ public const int PI_FILE_NONE = 0;
+ public const int PI_FILE_MIN = 1;
+ public const int PI_FILE_READ = 1;
+ public const int PI_FILE_WRITE = 2;
+ public const int PI_FILE_RW = 3;
+ public const int PI_FILE_APPEND = 4;
+ public const int PI_FILE_CREATE = 8;
+ public const int PI_FILE_TRUNC = 16;
+ public const int PI_FILE_MAX = 31;
+
+ public const int PI_FROM_START = 0;
+ public const int PI_FROM_CURRENT = 1;
+ public const int PI_FROM_END = 2;
+
+ /* Allowed socket connect addresses */
+
+ public const int MAX_CONNECT_ADDRESSES = 256;
+
+ /* events */
+
+ public const int PI_MAX_EVENT = 31;
+
+ /* Event auto generated on BSC slave activity */
+
+ public const int PI_EVENT_BSC = 31;
+
+ /*DEF_S Error Codes*/
+
+ public const int PI_INIT_FAILED = -1; // gpioInitialise failed
+ public const int PI_BAD_USER_GPIO = -2; // GPIO not 0-31
+ public const int PI_BAD_GPIO = -3; // GPIO not 0-53
+ public const int PI_BAD_MODE = -4; // mode not 0-7
+ public const int PI_BAD_LEVEL = -5; // level not 0-1
+ public const int PI_BAD_PUD = -6; // pud not 0-2
+ public const int PI_BAD_PULSEWIDTH = -7; // pulsewidth not 0 or 500-2500
+ public const int PI_BAD_DUTYCYCLE = -8; // dutycycle outside set range
+ public const int PI_BAD_TIMER = -9; // timer not 0-9
+ public const int PI_BAD_MS = -10; // ms not 10-60000
+ public const int PI_BAD_TIMETYPE = -11; // timetype not 0-1
+ public const int PI_BAD_SECONDS = -12; // seconds < 0
+ public const int PI_BAD_MICROS = -13; // micros not 0-999999
+ public const int PI_TIMER_FAILED = -14; // gpioSetTimerFunc failed
+ public const int PI_BAD_WDOG_TIMEOUT = -15; // timeout not 0-60000
+ public const int PI_NO_ALERT_FUNC = -16; // DEPRECATED
+ public const int PI_BAD_CLK_PERIPH = -17; // clock peripheral not 0-1
+ public const int PI_BAD_CLK_SOURCE = -18; // DEPRECATED
+ public const int PI_BAD_CLK_MICROS = -19; // clock micros not 1, 2, 4, 5, 8, or 10
+ public const int PI_BAD_BUF_MILLIS = -20; // buf millis not 100-10000
+ public const int PI_BAD_DUTYRANGE = -21; // dutycycle range not 25-40000
+ public const int PI_BAD_DUTY_RANGE = -21; // DEPRECATED (use PI_BAD_DUTYRANGE)
+ public const int PI_BAD_SIGNUM = -22; // signum not 0-63
+ public const int PI_BAD_PATHNAME = -23; // can't open pathname
+ public const int PI_NO_HANDLE = -24; // no handle available
+ public const int PI_BAD_HANDLE = -25; // unknown handle
+ public const int PI_BAD_IF_FLAGS = -26; // ifFlags > 4
+ public const int PI_BAD_CHANNEL = -27; // DMA channel not 0-14
+ public const int PI_BAD_PRIM_CHANNEL = -27; // DMA primary channel not 0-14
+ public const int PI_BAD_SOCKET_PORT = -28; // socket port not 1024-32000
+ public const int PI_BAD_FIFO_COMMAND = -29; // unrecognized fifo command
+ public const int PI_BAD_SECO_CHANNEL = -30; // DMA secondary channel not 0-6
+ public const int PI_NOT_INITIALISED = -31; // function called before gpioInitialise
+ public const int PI_INITIALISED = -32; // function called after gpioInitialise
+ public const int PI_BAD_WAVE_MODE = -33; // waveform mode not 0-3
+ public const int PI_BAD_CFG_INTERNAL = -34; // bad parameter in gpioCfgInternals call
+ public const int PI_BAD_WAVE_BAUD = -35; // baud rate not 50-250K(RX)/50-1M(TX)
+ public const int PI_TOO_MANY_PULSES = -36; // waveform has too many pulses
+ public const int PI_TOO_MANY_CHARS = -37; // waveform has too many chars
+ public const int PI_NOT_SERIAL_GPIO = -38; // no bit bang serial read on GPIO
+ public const int PI_BAD_SERIAL_STRUC = -39; // bad (null) serial structure parameter
+ public const int PI_BAD_SERIAL_BUF = -40; // bad (null) serial buf parameter
+ public const int PI_NOT_PERMITTED = -41; // GPIO operation not permitted
+ public const int PI_SOME_PERMITTED = -42; // one or more GPIO not permitted
+ public const int PI_BAD_WVSC_COMMND = -43; // bad WVSC subcommand
+ public const int PI_BAD_WVSM_COMMND = -44; // bad WVSM subcommand
+ public const int PI_BAD_WVSP_COMMND = -45; // bad WVSP subcommand
+ public const int PI_BAD_PULSELEN = -46; // trigger pulse length not 1-100
+ public const int PI_BAD_SCRIPT = -47; // invalid script
+ public const int PI_BAD_SCRIPT_ID = -48; // unknown script id
+ public const int PI_BAD_SER_OFFSET = -49; // add serial data offset > 30 minutes
+ public const int PI_GPIO_IN_USE = -50; // GPIO already in use
+ public const int PI_BAD_SERIAL_COUNT = -51; // must read at least a byte at a time
+ public const int PI_BAD_PARAM_NUM = -52; // script parameter id not 0-9
+ public const int PI_DUP_TAG = -53; // script has duplicate tag
+ public const int PI_TOO_MANY_TAGS = -54; // script has too many tags
+ public const int PI_BAD_SCRIPT_CMD = -55; // illegal script command
+ public const int PI_BAD_VAR_NUM = -56; // script variable id not 0-149
+ public const int PI_NO_SCRIPT_ROOM = -57; // no more room for scripts
+ public const int PI_NO_MEMORY = -58; // can't allocate temporary memory
+ public const int PI_SOCK_READ_FAILED = -59; // socket read failed
+ public const int PI_SOCK_WRIT_FAILED = -60; // socket write failed
+ public const int PI_TOO_MANY_PARAM = -61; // too many script parameters (> 10)
+ public const int PI_NOT_HALTED = -62; // DEPRECATED
+ public const int PI_SCRIPT_NOT_READY = -62; // script initialising
+ public const int PI_BAD_TAG = -63; // script has unresolved tag
+ public const int PI_BAD_MICS_DELAY = -64; // bad MICS delay (too large)
+ public const int PI_BAD_MILS_DELAY = -65; // bad MILS delay (too large)
+ public const int PI_BAD_WAVE_ID = -66; // non existent wave id
+ public const int PI_TOO_MANY_CBS = -67; // No more CBs for waveform
+ public const int PI_TOO_MANY_OOL = -68; // No more OOL for waveform
+ public const int PI_EMPTY_WAVEFORM = -69; // attempt to create an empty waveform
+ public const int PI_NO_WAVEFORM_ID = -70; // no more waveforms
+ public const int PI_I2C_OPEN_FAILED = -71; // can't open I2C device
+ public const int PI_SER_OPEN_FAILED = -72; // can't open serial device
+ public const int PI_SPI_OPEN_FAILED = -73; // can't open SPI device
+ public const int PI_BAD_I2C_BUS = -74; // bad I2C bus
+ public const int PI_BAD_I2C_ADDR = -75; // bad I2C address
+ public const int PI_BAD_SPI_CHANNEL = -76; // bad SPI channel
+ public const int PI_BAD_FLAGS = -77; // bad i2c/spi/ser open flags
+ public const int PI_BAD_SPI_SPEED = -78; // bad SPI speed
+ public const int PI_BAD_SER_DEVICE = -79; // bad serial device name
+ public const int PI_BAD_SER_SPEED = -80; // bad serial baud rate
+ public const int PI_BAD_PARAM = -81; // bad i2c/spi/ser parameter
+ public const int PI_I2C_WRITE_FAILED = -82; // i2c write failed
+ public const int PI_I2C_READ_FAILED = -83; // i2c read failed
+ public const int PI_BAD_SPI_COUNT = -84; // bad SPI count
+ public const int PI_SER_WRITE_FAILED = -85; // ser write failed
+ public const int PI_SER_READ_FAILED = -86; // ser read failed
+ public const int PI_SER_READ_NO_DATA = -87; // ser read no data available
+ public const int PI_UNKNOWN_COMMAND = -88; // unknown command
+ public const int PI_SPI_XFER_FAILED = -89; // spi xfer/read/write failed
+ public const int PI_BAD_POINTER = -90; // bad (NULL) pointer
+ public const int PI_NO_AUX_SPI = -91; // no auxiliary SPI on Pi A or B
+ public const int PI_NOT_PWM_GPIO = -92; // GPIO is not in use for PWM
+ public const int PI_NOT_SERVO_GPIO = -93; // GPIO is not in use for servo pulses
+ public const int PI_NOT_HCLK_GPIO = -94; // GPIO has no hardware clock
+ public const int PI_NOT_HPWM_GPIO = -95; // GPIO has no hardware PWM
+ public const int PI_BAD_HPWM_FREQ = -96; // hardware PWM frequency not 1-125M
+ public const int PI_BAD_HPWM_DUTY = -97; // hardware PWM dutycycle not 0-1M
+ public const int PI_BAD_HCLK_FREQ = -98; // hardware clock frequency not 4689-250M
+ public const int PI_BAD_HCLK_PASS = -99; // need password to use hardware clock 1
+ public const int PI_HPWM_ILLEGAL = -100; // illegal, PWM in use for main clock
+ public const int PI_BAD_DATABITS = -101; // serial data bits not 1-32
+ public const int PI_BAD_STOPBITS = -102; // serial (half) stop bits not 2-8
+ public const int PI_MSG_TOOBIG = -103; // socket/pipe message too big
+ public const int PI_BAD_MALLOC_MODE = -104; // bad memory allocation mode
+ public const int PI_TOO_MANY_SEGS = -105; // too many I2C transaction segments
+ public const int PI_BAD_I2C_SEG = -106; // an I2C transaction segment failed
+ public const int PI_BAD_SMBUS_CMD = -107; // SMBus command not supported by driver
+ public const int PI_NOT_I2C_GPIO = -108; // no bit bang I2C in progress on GPIO
+ public const int PI_BAD_I2C_WLEN = -109; // bad I2C write length
+ public const int PI_BAD_I2C_RLEN = -110; // bad I2C read length
+ public const int PI_BAD_I2C_CMD = -111; // bad I2C command
+ public const int PI_BAD_I2C_BAUD = -112; // bad I2C baud rate, not 50-500k
+ public const int PI_CHAIN_LOOP_CNT = -113; // bad chain loop count
+ public const int PI_BAD_CHAIN_LOOP = -114; // empty chain loop
+ public const int PI_CHAIN_COUNTER = -115; // too many chain counters
+ public const int PI_BAD_CHAIN_CMD = -116; // bad chain command
+ public const int PI_BAD_CHAIN_DELAY = -117; // bad chain delay micros
+ public const int PI_CHAIN_NESTING = -118; // chain counters nested too deeply
+ public const int PI_CHAIN_TOO_BIG = -119; // chain is too long
+ public const int PI_DEPRECATED = -120; // deprecated function removed
+ public const int PI_BAD_SER_INVERT = -121; // bit bang serial invert not 0 or 1
+ public const int PI_BAD_EDGE = -122; // bad ISR edge value, not 0-2
+ public const int PI_BAD_ISR_INIT = -123; // bad ISR initialisation
+ public const int PI_BAD_FOREVER = -124; // loop forever must be last command
+ public const int PI_BAD_FILTER = -125; // bad filter parameter
+ public const int PI_BAD_PAD = -126; // bad pad number
+ public const int PI_BAD_STRENGTH = -127; // bad pad drive strength
+ public const int PI_FIL_OPEN_FAILED = -128; // file open failed
+ public const int PI_BAD_FILE_MODE = -129; // bad file mode
+ public const int PI_BAD_FILE_FLAG = -130; // bad file flag
+ public const int PI_BAD_FILE_READ = -131; // bad file read
+ public const int PI_BAD_FILE_WRITE = -132; // bad file write
+ public const int PI_FILE_NOT_ROPEN = -133; // file not open for read
+ public const int PI_FILE_NOT_WOPEN = -134; // file not open for write
+ public const int PI_BAD_FILE_SEEK = -135; // bad file seek
+ public const int PI_NO_FILE_MATCH = -136; // no files match pattern
+ public const int PI_NO_FILE_ACCESS = -137; // no permission to access file
+ public const int PI_FILE_IS_A_DIR = -138; // file is a directory
+ public const int PI_BAD_SHELL_STATUS = -139; // bad shell return status
+ public const int PI_BAD_SCRIPT_NAME = -140; // bad script name
+ public const int PI_BAD_SPI_BAUD = -141; // bad SPI baud rate, not 50-500k
+ public const int PI_NOT_SPI_GPIO = -142; // no bit bang SPI in progress on GPIO
+ public const int PI_BAD_EVENT_ID = -143; // bad event id
+ public const int PI_CMD_INTERRUPTED = -144; // Used by Python
+
+ public const int PI_PIGIF_ERR_0 = -2000;
+ public const int PI_PIGIF_ERR_99 = -2099;
+
+ public const int PI_CUSTOM_ERR_0 = -3000;
+ public const int PI_CUSTOM_ERR_999 = -3999;
+
+ /*DEF_E*/
+
+ #endregion
+
+
+ #region # private field
+
+ private bool isConnecting = false;
+
+ private int gPigHandle;
+ private UInt32 gLastLevel;
+ private UInt32 gNotifyBits;
+
+ private CancellationTokenSource cts;
+
+ private Stopwatch sw = new Stopwatch();
+
+ private List gCallBackList = new List();
+ private List geCallBackList = new List();
+
+ private Dictionary errInfo = new Dictionary() {
+ {PI_INIT_FAILED , "pigpio initialisation failed"},
+ {PI_BAD_USER_GPIO , "GPIO not 0-31"},
+ {PI_BAD_GPIO , "GPIO not 0-53"},
+ {PI_BAD_MODE , "mode not 0-7"},
+ {PI_BAD_LEVEL , "level not 0-1"},
+ {PI_BAD_PUD , "pud not 0-2"},
+ {PI_BAD_PULSEWIDTH , "pulsewidth not 0 or 500-2500"},
+ {PI_BAD_DUTYCYCLE , "dutycycle not 0-range (default 255)"},
+ {PI_BAD_TIMER , "timer not 0-9"},
+ {PI_BAD_MS , "ms not 10-60000"},
+ {PI_BAD_TIMETYPE , "timetype not 0-1"},
+ {PI_BAD_SECONDS , "seconds < 0"},
+ {PI_BAD_MICROS , "micros not 0-999999"},
+ {PI_TIMER_FAILED , "gpioSetTimerFunc failed"},
+ {PI_BAD_WDOG_TIMEOUT , "timeout not 0-60000"},
+ {PI_NO_ALERT_FUNC , "DEPRECATED"},
+ {PI_BAD_CLK_PERIPH , "clock peripheral not 0-1"},
+ {PI_BAD_CLK_SOURCE , "DEPRECATED"},
+ {PI_BAD_CLK_MICROS , "clock micros not 1, 2, 4, 5, 8, or 10"},
+ {PI_BAD_BUF_MILLIS , "buf millis not 100-10000"},
+ {PI_BAD_DUTYRANGE , "dutycycle range not 25-40000"},
+ {PI_BAD_SIGNUM , "signum not 0-63"},
+ {PI_BAD_PATHNAME , "can't open pathname"},
+ {PI_NO_HANDLE , "no handle available"},
+ {PI_BAD_HANDLE , "unknown handle"},
+ {PI_BAD_IF_FLAGS , "ifFlags > 4"},
+ {PI_BAD_CHANNEL , "DMA channel not 0-14"},
+ {PI_BAD_SOCKET_PORT , "socket port not 1024-30000"},
+ {PI_BAD_FIFO_COMMAND , "unknown fifo command"},
+ {PI_BAD_SECO_CHANNEL , "DMA secondary channel not 0-14"},
+ {PI_NOT_INITIALISED , "function called before gpioInitialise"},
+ {PI_INITIALISED , "function called after gpioInitialise"},
+ {PI_BAD_WAVE_MODE , "waveform mode not 0-1"},
+ {PI_BAD_CFG_INTERNAL , "bad parameter in gpioCfgInternals call"},
+ {PI_BAD_WAVE_BAUD , "baud rate not 50-250K(RX)/50-1M(TX)"},
+ {PI_TOO_MANY_PULSES , "waveform has too many pulses"},
+ {PI_TOO_MANY_CHARS , "waveform has too many chars"},
+ {PI_NOT_SERIAL_GPIO , "no bit bang serial read in progress on GPIO"},
+ {PI_BAD_SERIAL_STRUC , "bad (null) serial structure parameter"},
+ {PI_BAD_SERIAL_BUF , "bad (null) serial buf parameter"},
+ {PI_NOT_PERMITTED , "no permission to update GPIO"},
+ {PI_SOME_PERMITTED , "no permission to update one or more GPIO"},
+ {PI_BAD_WVSC_COMMND , "bad WVSC subcommand"},
+ {PI_BAD_WVSM_COMMND , "bad WVSM subcommand"},
+ {PI_BAD_WVSP_COMMND , "bad WVSP subcommand"},
+ {PI_BAD_PULSELEN , "trigger pulse length not 1-100"},
+ {PI_BAD_SCRIPT , "invalid script"},
+ {PI_BAD_SCRIPT_ID , "unknown script id"},
+ {PI_BAD_SER_OFFSET , "add serial data offset > 30 minute"},
+ {PI_GPIO_IN_USE , "GPIO already in use"},
+ {PI_BAD_SERIAL_COUNT , "must read at least a byte at a time"},
+ {PI_BAD_PARAM_NUM , "script parameter id not 0-9"},
+ {PI_DUP_TAG , "script has duplicate tag"},
+ {PI_TOO_MANY_TAGS , "script has too many tags"},
+ {PI_BAD_SCRIPT_CMD , "illegal script command"},
+ {PI_BAD_VAR_NUM , "script variable id not 0-149"},
+ {PI_NO_SCRIPT_ROOM , "no more room for scripts"},
+ {PI_NO_MEMORY , "can't allocate temporary memory"},
+ {PI_SOCK_READ_FAILED , "socket read failed"},
+ {PI_SOCK_WRIT_FAILED , "socket write failed"},
+ {PI_TOO_MANY_PARAM , "too many script parameters (> 10)"},
+ {PI_SCRIPT_NOT_READY , "script initialising"},
+ {PI_BAD_TAG , "script has unresolved tag"},
+ {PI_BAD_MICS_DELAY , "bad MICS delay (too large)"},
+ {PI_BAD_MILS_DELAY , "bad MILS delay (too large)"},
+ {PI_BAD_WAVE_ID , "non existent wave id"},
+ {PI_TOO_MANY_CBS , "No more CBs for waveform"},
+ {PI_TOO_MANY_OOL , "No more OOL for waveform"},
+ {PI_EMPTY_WAVEFORM , "attempt to create an empty waveform"},
+ {PI_NO_WAVEFORM_ID , "no more waveform ids"},
+ {PI_I2C_OPEN_FAILED , "can't open I2C device"},
+ {PI_SER_OPEN_FAILED , "can't open serial device"},
+ {PI_SPI_OPEN_FAILED , "can't open SPI device"},
+ {PI_BAD_I2C_BUS , "bad I2C bus"},
+ {PI_BAD_I2C_ADDR , "bad I2C address"},
+ {PI_BAD_SPI_CHANNEL , "bad SPI channel"},
+ {PI_BAD_FLAGS , "bad i2c/spi/ser open flags"},
+ {PI_BAD_SPI_SPEED , "bad SPI speed"},
+ {PI_BAD_SER_DEVICE , "bad serial device name"},
+ {PI_BAD_SER_SPEED , "bad serial baud rate"},
+ {PI_BAD_PARAM , "bad i2c/spi/ser parameter"},
+ {PI_I2C_WRITE_FAILED , "I2C write failed"},
+ {PI_I2C_READ_FAILED , "I2C read failed"},
+ {PI_BAD_SPI_COUNT , "bad SPI count"},
+ {PI_SER_WRITE_FAILED , "ser write failed"},
+ {PI_SER_READ_FAILED , "ser read failed"},
+ {PI_SER_READ_NO_DATA , "ser read no data available"},
+ {PI_UNKNOWN_COMMAND , "unknown command"},
+ {PI_SPI_XFER_FAILED , "spi xfer/read/write failed"},
+ {PI_BAD_POINTER , "bad (NULL) pointer"},
+ {PI_NO_AUX_SPI , "no auxiliary SPI on Pi A or B"},
+ {PI_NOT_PWM_GPIO , "GPIO is not in use for PWM"},
+ {PI_NOT_SERVO_GPIO , "GPIO is not in use for servo pulses"},
+ {PI_NOT_HCLK_GPIO , "GPIO has no hardware clock"},
+ {PI_NOT_HPWM_GPIO , "GPIO has no hardware PWM"},
+ {PI_BAD_HPWM_FREQ , "hardware PWM frequency not 1-125M"},
+ {PI_BAD_HPWM_DUTY , "hardware PWM dutycycle not 0-1M"},
+ {PI_BAD_HCLK_FREQ , "hardware clock frequency not 4689-250M"},
+ {PI_BAD_HCLK_PASS , "need password to use hardware clock 1"},
+ {PI_HPWM_ILLEGAL , "illegal, PWM in use for main clock"},
+ {PI_BAD_DATABITS , "serial data bits not 1-32"},
+ {PI_BAD_STOPBITS , "serial (half) stop bits not 2-8"},
+ {PI_MSG_TOOBIG , "socket/pipe message too big"},
+ {PI_BAD_MALLOC_MODE , "bad memory allocation mode"},
+ {PI_TOO_MANY_SEGS , "too many I2C transaction segments"},
+ {PI_BAD_I2C_SEG , "an I2C transaction segment failed"},
+ {PI_BAD_SMBUS_CMD , "SMBus command not supported by driver"},
+ {PI_NOT_I2C_GPIO , "no bit bang I2C in progress on GPIO"},
+ {PI_BAD_I2C_WLEN , "bad I2C write length"},
+ {PI_BAD_I2C_RLEN , "bad I2C read length"},
+ {PI_BAD_I2C_CMD , "bad I2C command"},
+ {PI_BAD_I2C_BAUD , "bad I2C baud rate, not 50-500k"},
+ {PI_CHAIN_LOOP_CNT , "bad chain loop count"},
+ {PI_BAD_CHAIN_LOOP , "empty chain loop"},
+ {PI_CHAIN_COUNTER , "too many chain counters"},
+ {PI_BAD_CHAIN_CMD , "bad chain command"},
+ {PI_BAD_CHAIN_DELAY , "bad chain delay micros"},
+ {PI_CHAIN_NESTING , "chain counters nested too deeply"},
+ {PI_CHAIN_TOO_BIG , "chain is too long"},
+ {PI_DEPRECATED , "deprecated function removed"},
+ {PI_BAD_SER_INVERT , "bit bang serial invert not 0 or 1"},
+ {PI_BAD_EDGE , "bad ISR edge, not 1, 1, or 2"},
+ {PI_BAD_ISR_INIT , "bad ISR initialisation"},
+ {PI_BAD_FOREVER , "loop forever must be last chain command"},
+ {PI_BAD_FILTER , "bad filter parameter"},
+ {PI_BAD_PAD , "bad pad number"},
+ {PI_BAD_STRENGTH , "bad pad drive strength"},
+ {PI_FIL_OPEN_FAILED , "file open failed"},
+ {PI_BAD_FILE_MODE , "bad file mode"},
+ {PI_BAD_FILE_FLAG , "bad file flag"},
+ {PI_BAD_FILE_READ , "bad file read"},
+ {PI_BAD_FILE_WRITE , "bad file write"},
+ {PI_FILE_NOT_ROPEN , "file not open for read"},
+ {PI_FILE_NOT_WOPEN , "file not open for write"},
+ {PI_BAD_FILE_SEEK , "bad file seek"},
+ {PI_NO_FILE_MATCH , "no files match pattern"},
+ {PI_NO_FILE_ACCESS , "no permission to access file"},
+ {PI_FILE_IS_A_DIR , "file is a directory"},
+ {PI_BAD_SHELL_STATUS , "bad shell return status"},
+ {PI_BAD_SCRIPT_NAME , "bad script name"},
+ {PI_BAD_SPI_BAUD , "bad SPI baud rate, not 50-500k"},
+ {PI_NOT_SPI_GPIO , "no bit bang SPI in progress on GPIO"},
+ {PI_BAD_EVENT_ID , "bad event id"},
+ {PI_CMD_INTERRUPTED , "command interrupted, Python"},
+ };
+
+ #endregion
+
+
+ #region # private property
+
+ private TcpConnection TcpConnection { get; set; }
+
+ private TcpConnection NotifyTcpConnection { get; set; }
+
+ #endregion
+
+
+ #region # public property
+
+ private object _lockObject = new object();
+ public object LockObject
+ {
+ get
+ {
+ return _lockObject;
+ }
+ }
+
+ private NetworkStream _commandStream = null;
+ public NetworkStream CommandStream
+ {
+ get
+ {
+ return _commandStream;
+ }
+ private set
+ {
+ _commandStream = value;
+
+ if (CommandStreamChanged != null)
+ {
+ CommandStreamChanged.Invoke(this, new EventArgs());
+ }
+ if (StreamChanged != null)
+ {
+ StreamChanged.Invoke(this, new EventArgs());
+ }
+
+ if (CommandStream != null && NotifyStream != null && !isConnecting)
+ {
+ isConnecting = true;
+ if (StreamConnected != null)
+ {
+ StreamConnected.Invoke(this, new EventArgs());
+ }
+ }
+ }
+ }
+
+ private NetworkStream _notifyStream = null;
+ public NetworkStream NotifyStream
+ {
+ get
+ {
+ return _notifyStream;
+ }
+ private set
+ {
+ _notifyStream = value;
+
+ if (NotifyStreamChanged != null)
+ {
+ NotifyStreamChanged.Invoke(this, new EventArgs());
+ }
+ if (StreamChanged != null)
+ {
+ StreamChanged.Invoke(this, new EventArgs());
+ }
+
+ if (CommandStream != null && NotifyStream != null && !isConnecting)
+ {
+ isConnecting = true;
+ if (StreamConnected != null)
+ {
+ StreamConnected.Invoke(this, new EventArgs());
+ }
+ }
+ }
+ }
+
+ public bool IsOpened
+ {
+ get
+ {
+ if (this.TcpConnection == null || NotifyTcpConnection == null)
+ return false;
+ return this.TcpConnection.IsOpened && NotifyTcpConnection.IsOpened;
+ }
+ }
+
+ public bool CanRead
+ {
+ get
+ {
+ if (this.TcpConnection.Stream == null || NotifyTcpConnection.Stream == null)
+ return false;
+ return this.TcpConnection.Stream.CanRead && NotifyTcpConnection.Stream.CanRead;
+ }
+ }
+
+ public bool CanWrite
+ {
+ get
+ {
+ if (this.TcpConnection.Stream == null || NotifyTcpConnection.Stream == null)
+ return false;
+ return this.TcpConnection.Stream.CanWrite && NotifyTcpConnection.Stream.CanWrite;
+ }
+ }
+
+ #endregion
+
+
+ #region # constructor
+
+ public PigpiodIf()
+ {
+ this.TcpConnection = new TcpConnection();
+ this.TcpConnection.StreamChanged += (s, evt) =>
+ {
+ this.CommandStream = this.TcpConnection.Stream;
+ };
+
+ NotifyTcpConnection = new TcpConnection();
+ NotifyTcpConnection.StreamChanged += (s, evt) =>
+ {
+ NotifyStream = NotifyTcpConnection.Stream;
+
+ if (NotifyTcpConnection.Stream != null)
+ {
+ NotifyStream.ReadTimeout = Timeout.Infinite;
+
+ gPigHandle = pigpio_notify();
+
+ if (gPigHandle >= 0)
+ {
+ gLastLevel = read_bank_1();
+
+ cts = new CancellationTokenSource();
+ Task.Run(() => NotifyThread(cts.Token));
+ }
+ }
+ };
+ }
+
+ #endregion
+
+
+ #region # Implementation of IDisposable
+
+ bool disposed = false;
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposed)
+ return;
+
+ if (disposing)
+ {
+ // Release managed objects
+ pigpio_stop();
+ }
+
+ // Release unmanaged objects
+
+ disposed = true;
+ }
+ ~PigpiodIf()
+ {
+ Dispose(false);
+ }
+
+ #endregion
+
+
+ #region # public method
+
+ public double time_time()
+ {
+ DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, 0);
+ DateTime targetTime = DateTime.Now.ToUniversalTime();
+ TimeSpan elapsedTime = targetTime - UNIX_EPOCH;
+ return elapsedTime.TotalSeconds;
+ }
+
+ public void time_sleep(double seconds)
+ {
+ Task.Run(async () =>
+ {
+ long milliseconds = (long)(seconds * 1000);
+ sw.Restart();
+
+ int rest = (int)(milliseconds - sw.ElapsedMilliseconds);
+ if (rest > 200)
+ {
+ await Task.Delay(rest - 200);
+ }
+
+ while (sw.ElapsedMilliseconds < milliseconds)
+ {
+ }
+ sw.Stop();
+ }).Wait();
+ }
+
+ public string pigpio_error(int errnum)
+ {
+ if (errnum > -1000)
+ {
+ if (errInfo.ContainsKey(errnum))
+ {
+ return errInfo[errnum];
+ }
+ else
+ {
+ return "unknown error";
+ }
+ }
+ else
+ {
+ switch ((EError)errnum)
+ {
+ case EError.pigif_bad_send:
+ return "failed to send to pigpiod";
+ case EError.pigif_bad_recv:
+ return "failed to receive from pigpiod";
+ case EError.pigif_bad_getaddrinfo:
+ return "failed to find address of pigpiod";
+ case EError.pigif_bad_connect:
+ return "failed to connect to pigpiod";
+ case EError.pigif_bad_socket:
+ return "failed to create socket";
+ case EError.pigif_bad_noib:
+ return "failed to open notification in band";
+ case EError.pigif_duplicate_callback:
+ return "identical callback exists";
+ case EError.pigif_bad_malloc:
+ return "failed to malloc";
+ case EError.pigif_bad_callback:
+ return "bad callback parameter";
+ case EError.pigif_notify_failed:
+ return "failed to create notification thread";
+ case EError.pigif_callback_not_found:
+ return "callback not found";
+ case EError.pigif_unconnected_pi:
+ return "not connected to Pi";
+ case EError.pigif_too_many_pis:
+ return "too many connected Pis";
+
+ default:
+ return "unknown error";
+ }
+ }
+ }
+
+ public UInt32 pigpiod_if_version()
+ {
+ return PIGPIOD_IF2_VERSION;
+ }
+
+ // Do not implement
+ // start_thread() and
+ // stop_thread().
+
+ public int pigpio_start(string addrStr, string portStr)
+ {
+ if (string.IsNullOrWhiteSpace(addrStr))
+ {
+ addrStr = PI_DEFAULT_SOCKET_ADDR_STR;
+ }
+ if (string.IsNullOrWhiteSpace(portStr))
+ {
+ portStr = PI_DEFAULT_SOCKET_PORT_STR;
+ }
+
+ int port;
+ if (int.TryParse(portStr, out port) == false)
+ {
+ return (int)EError.pigif_bad_getaddrinfo;
+ }
+
+ isConnecting = false;
+ this.TcpConnection.Open(addrStr, port);
+ NotifyTcpConnection.Open(addrStr, port);
+
+ return 0;
+ }
+
+ public void pigpio_stop()
+ {
+ if (cts != null)
+ {
+ cts.Cancel();
+ }
+
+ if (gPigHandle >= 0)
+ {
+ pigpio_command(PI_CMD_NC, gPigHandle, 0);
+ gPigHandle = -1;
+ }
+
+ if (this.TcpConnection != null)
+ {
+ // Execute handlers of StreamChanged event, and call Close()
+ this.CommandStream = null;
+ this.TcpConnection.Close();
+ }
+ if (NotifyTcpConnection != null)
+ {
+ // Execute handlers of NotifyStreamChanged event, and call Close()
+ NotifyStream = null;
+ NotifyTcpConnection.Close();
+ }
+ }
+
+ public int set_mode(UInt32 gpio, UInt32 mode)
+ { return pigpio_command(PI_CMD_MODES, (int)gpio, (int)mode); }
+
+ public int get_mode(UInt32 gpio)
+ { return pigpio_command(PI_CMD_MODEG, (int)gpio, 0); }
+
+ public int set_pull_up_down(UInt32 gpio, UInt32 pud)
+ { return pigpio_command(PI_CMD_PUD, (int)gpio, (int)pud); }
+
+ public int gpio_read(UInt32 gpio)
+ { return pigpio_command(PI_CMD_READ, (int)gpio, 0); }
+
+ public int gpio_write(UInt32 gpio, UInt32 level)
+ { return pigpio_command(PI_CMD_WRITE, (int)gpio, (int)level); }
+
+ public int set_PWM_dutycycle(UInt32 user_gpio, UInt32 dutycycle)
+ { return pigpio_command(PI_CMD_PWM, (int)user_gpio, (int)dutycycle); }
+
+ public int get_PWM_dutycycle(UInt32 user_gpio)
+ { return pigpio_command(PI_CMD_GDC, (int)user_gpio, 0); }
+
+ public int set_PWM_range(UInt32 user_gpio, UInt32 range)
+ { return pigpio_command(PI_CMD_PRS, (int)user_gpio, (int)range); }
+
+ public int get_PWM_range(UInt32 user_gpio)
+ { return pigpio_command(PI_CMD_PRG, (int)user_gpio, 0); }
+
+ public int get_PWM_real_range(UInt32 user_gpio)
+ { return pigpio_command(PI_CMD_PRRG, (int)user_gpio, 0); }
+
+ public int set_PWM_frequency(UInt32 user_gpio, UInt32 frequency)
+ { return pigpio_command(PI_CMD_PFS, (int)user_gpio, (int)frequency); }
+
+ public int get_PWM_frequency(UInt32 user_gpio)
+ { return pigpio_command(PI_CMD_PFG, (int)user_gpio, 0); }
+
+ public int set_servo_pulsewidth(UInt32 user_gpio, UInt32 pulsewidth)
+ { return pigpio_command(PI_CMD_SERVO, (int)user_gpio, (int)pulsewidth); }
+
+ public int get_servo_pulsewidth(UInt32 user_gpio)
+ { return pigpio_command(PI_CMD_GPW, (int)user_gpio, 0); }
+
+ public int notify_open()
+ { return pigpio_command(PI_CMD_NO, 0, 0); }
+
+ public int notify_begin(UInt32 handle, UInt32 bits)
+ { return pigpio_command(PI_CMD_NB, (int)handle, (int)bits); }
+
+ public int notify_pause(UInt32 handle)
+ { return pigpio_command(PI_CMD_NB, (int)handle, 0); }
+
+ public int notify_close(UInt32 handle)
+ { return pigpio_command(PI_CMD_NC, (int)handle, 0); }
+
+ public int set_watchdog(UInt32 user_gpio, UInt32 timeout)
+ { return pigpio_command(PI_CMD_WDOG, (int)user_gpio, (int)timeout); }
+
+ public UInt32 read_bank_1()
+ { return (UInt32)pigpio_command(PI_CMD_BR1, 0, 0); }
+
+ public UInt32 read_bank_2()
+ { return (UInt32)pigpio_command(PI_CMD_BR2, 0, 0); }
+
+ public int clear_bank_1(UInt32 levels)
+ { return pigpio_command(PI_CMD_BC1, (int)levels, 0); }
+
+ public int clear_bank_2(UInt32 levels)
+ { return pigpio_command(PI_CMD_BC2, (int)levels, 0); }
+
+ public int set_bank_1(UInt32 levels)
+ { return pigpio_command(PI_CMD_BS1, (int)levels, 0); }
+
+ public int set_bank_2(UInt32 levels)
+ { return pigpio_command(PI_CMD_BS2, (int)levels, 0); }
+
+ public int hardware_clock(UInt32 gpio, UInt32 frequency)
+ { return pigpio_command(PI_CMD_HC, (int)gpio, (int)frequency); }
+
+ public int hardware_PWM(UInt32 gpio, UInt32 frequency, UInt32 dutycycle)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=gpio
+ p2=frequency
+ p3=4
+ ## extension ##
+ uint32_t dutycycle
+ */
+
+ exts[0].Contents = UInt32ToBytes(dutycycle);
+
+ return pigpio_command_ext(PI_CMD_HP, (int)gpio, (int)frequency, exts);
+ }
+
+ public UInt32 get_current_tick()
+ { return (UInt32)pigpio_command(PI_CMD_TICK, 0, 0); }
+
+ public UInt32 get_hardware_revision()
+ { return (UInt32)pigpio_command(PI_CMD_HWVER, 0, 0); }
+
+ public UInt32 get_pigpio_version()
+ { return (UInt32)pigpio_command(PI_CMD_PIGPV, 0, 0); }
+
+ public int wave_clear()
+ { return pigpio_command(PI_CMD_WVCLR, 0, 0); }
+
+ public int wave_add_new()
+ { return pigpio_command(PI_CMD_WVNEW, 0, 0); }
+
+ public int wave_add_generic(GpioPulse[] pulses)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=0
+ p2=0
+ p3=pulses*sizeof(gpioPulse_t)
+ ## extension ##
+ gpioPulse_t[] pulses
+ */
+
+ if (pulses.Length == 0) return 0;
+
+ List list = new List();
+ foreach (var pulse in pulses)
+ {
+ list.Add(pulse.gpioOn);
+ list.Add(pulse.gpioOff);
+ list.Add(pulse.usDelay);
+ }
+ exts[0].Contents = UInt32ArrayToBytes(list.ToArray());
+
+ return pigpio_command_ext(PI_CMD_WVAG, 0, 0, exts);
+ }
+
+ public int wave_add_serial(
+ UInt32 user_gpio, UInt32 baud, UInt32 databits,
+ UInt32 stophalfbits, UInt32 offset, byte[] str)
+ {
+ GpioExtent[] exts = new GpioExtent[] {
+ new GpioExtent(),
+ new GpioExtent()
+ };
+
+ /*
+ p1=user_gpio
+ p2=baud
+ p3=len+12
+ ## extension ##
+ uint32_t databits
+ uint32_t stophalfbits
+ uint32_t offset
+ char[len] str
+ */
+
+ if (str.Length == 0)
+ return 0;
+
+ UInt32[] array = new UInt32[]
+ {
+ databits,
+ stophalfbits,
+ offset
+ };
+ exts[0].Contents = UInt32ArrayToBytes(array);
+
+ exts[1].Contents = str;
+
+ return pigpio_command_ext(PI_CMD_WVAS, (int)user_gpio, (int)baud, exts);
+ }
+
+ public int wave_create()
+ { return pigpio_command(PI_CMD_WVCRE, 0, 0); }
+
+ public int wave_delete(UInt32 wave_id)
+ { return pigpio_command(PI_CMD_WVDEL, (int)wave_id, 0); }
+
+ public int wave_tx_start() /* DEPRECATED */
+ { return pigpio_command(PI_CMD_WVGO, 0, 0); }
+
+ public int wave_tx_repeat() /* DEPRECATED */
+ { return pigpio_command(PI_CMD_WVGOR, 0, 0); }
+
+ public int wave_send_once(UInt32 wave_id)
+ { return pigpio_command(PI_CMD_WVTX, (int)wave_id, 0); }
+
+ public int wave_send_repeat(UInt32 wave_id)
+ { return pigpio_command(PI_CMD_WVTXR, (int)wave_id, 0); }
+
+ public int wave_send_using_mode(UInt32 wave_id, UInt32 mode)
+ { return pigpio_command(PI_CMD_WVTXM, (int)wave_id, (int)mode); }
+
+ public int wave_chain(byte[] buf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=0
+ p2=0
+ p3=bufSize
+ ## extension ##
+ char buf[bufSize]
+ */
+
+ exts[0].Contents = buf;
+
+ return pigpio_command_ext(PI_CMD_WVCHA, 0, 0, exts);
+ }
+
+ public int wave_tx_at()
+ { return pigpio_command(PI_CMD_WVTAT, 0, 0); }
+
+ public int wave_tx_busy()
+ { return pigpio_command(PI_CMD_WVBSY, 0, 0); }
+
+ public int wave_tx_stop()
+ { return pigpio_command(PI_CMD_WVHLT, 0, 0); }
+
+ public int wave_get_micros()
+ { return pigpio_command(PI_CMD_WVSM, 0, 0); }
+
+ public int wave_get_high_micros()
+ { return pigpio_command(PI_CMD_WVSM, 1, 0); }
+
+ public int wave_get_max_micros()
+ { return pigpio_command(PI_CMD_WVSM, 2, 0); }
+
+ public int wave_get_pulses()
+ { return pigpio_command(PI_CMD_WVSP, 0, 0); }
+
+ public int wave_get_high_pulses()
+ { return pigpio_command(PI_CMD_WVSP, 1, 0); }
+
+ public int wave_get_max_pulses()
+ { return pigpio_command(PI_CMD_WVSP, 2, 0); }
+
+ public int wave_get_cbs()
+ { return pigpio_command(PI_CMD_WVSC, 0, 0); }
+
+ public int wave_get_high_cbs()
+ { return pigpio_command(PI_CMD_WVSC, 1, 0); }
+
+ public int wave_get_max_cbs()
+ { return pigpio_command(PI_CMD_WVSC, 2, 0); }
+
+ public int gpio_trigger(UInt32 user_gpio, UInt32 pulseLen, UInt32 level)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=user_gpio
+ p2=pulseLen
+ p3=4
+ ## extension ##
+ unsigned level
+ */
+
+ exts[0].Contents = UInt32ToBytes(level);
+
+ return pigpio_command_ext(PI_CMD_TRIG, (int)user_gpio, (int)pulseLen, exts);
+ }
+
+ public int set_glitch_filter(UInt32 user_gpio, UInt32 steady)
+ { return pigpio_command(PI_CMD_FG, (int)user_gpio, (int)steady); }
+
+ public int set_noise_filter(UInt32 user_gpio, UInt32 steady, UInt32 active)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=user_gpio
+ p2=steady
+ p3=4
+ ## extension ##
+ unsigned active
+ */
+
+ exts[0].Contents = UInt32ToBytes(active);
+
+ return pigpio_command_ext(PI_CMD_FN, (int)user_gpio, (int)steady, exts);
+ }
+
+ public int store_script(byte[] script)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=0
+ p2=0
+ p3=len
+ ## extension ##
+ char[len] script
+ */
+
+ if (script.Length == 0)
+ return 0;
+
+ exts[0].Contents = script;
+
+ return pigpio_command_ext(PI_CMD_PROC, 0, 0, exts);
+ }
+
+ public int run_script(UInt32 script_id, UInt32[] paramArray)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=script id
+ p2=0
+ p3=numPar * 4
+ ## extension ##
+ uint32_t[numPar] pars
+ */
+
+ exts[0].Contents = UInt32ArrayToBytes(paramArray);
+
+ return pigpio_command_ext(PI_CMD_PROCR, (int)script_id, 0, exts);
+ }
+
+ public int update_script(UInt32 script_id, UInt32[] paramArray)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=script id
+ p2=0
+ p3=numPar * 4
+ ## extension ##
+ uint32_t[numPar] pars
+ */
+
+ exts[0].Contents = UInt32ArrayToBytes(paramArray);
+
+ return pigpio_command_ext(PI_CMD_PROCU, (int)script_id, 0, exts);
+ }
+
+ public int script_status(UInt32 script_id, UInt32[] param)
+ {
+ int status;
+ byte[] bytes = new byte[4 * (PI_MAX_SCRIPT_PARAMS + 1)]; /* space for script status */
+
+ lock (LockObject)
+ {
+ status = pigpio_command(PI_CMD_PROCP, (int)script_id, 0);
+
+ if (status > 0)
+ {
+ recvMax(bytes, status);
+
+ // byte[] -> UInt32[]
+ var p = BytesToUInt32Array(bytes);
+
+ status = (int)p[0];
+ for (int i = 0; i < param.Length; i++)
+ {
+ param[i] = p[i + 1];
+ }
+ }
+ }
+
+ return status;
+ }
+
+ public int stop_script(UInt32 script_id)
+ { return pigpio_command(PI_CMD_PROCS, (int)script_id, 0); }
+
+ public int delete_script(UInt32 script_id)
+ { return pigpio_command(PI_CMD_PROCD, (int)script_id, 0); }
+
+ public int bb_serial_read_open(UInt32 user_gpio, UInt32 baud, UInt32 bbBits)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=user_gpio
+ p2=baud
+ p3=4
+ ## extension ##
+ unsigned bbBits
+ */
+
+ exts[0].Contents = UInt32ToBytes(bbBits);
+
+ return pigpio_command_ext(PI_CMD_SLRO, (int)user_gpio, (int)baud, exts);
+ }
+
+ public int bb_serial_read(UInt32 user_gpio, byte[] buf)
+ {
+ int bytes;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command(PI_CMD_SLR, (int)user_gpio, buf.Length);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int bb_serial_read_close(UInt32 user_gpio)
+ { return pigpio_command(PI_CMD_SLRC, (int)user_gpio, 0); }
+
+ public int bb_serial_invert(UInt32 user_gpio, UInt32 invert)
+ { return pigpio_command(PI_CMD_SLRI, (int)user_gpio, (int)invert); }
+
+ public int i2c_open(UInt32 i2c_bus, UInt32 i2c_addr, UInt32 i2c_flags)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=i2c_bus
+ p2=i2c_addr
+ p3=4
+ ## extension ##
+ uint32_t i2c_flags
+ */
+
+ exts[0].Contents = UInt32ToBytes(i2c_flags);
+
+ return pigpio_command_ext(PI_CMD_I2CO, (int)i2c_bus, (int)i2c_addr, exts);
+ }
+
+ public int i2c_close(UInt32 handle)
+ { return pigpio_command(PI_CMD_I2CC, (int)handle, 0); }
+
+ public int i2c_write_quick(UInt32 handle, UInt32 bit)
+ { return pigpio_command(PI_CMD_I2CWQ, (int)handle, (int)bit); }
+
+ public int i2c_write_byte(UInt32 handle, UInt32 val)
+ { return pigpio_command(PI_CMD_I2CWS, (int)handle, (int)val); }
+
+ public int i2c_read_byte(UInt32 handle)
+ { return pigpio_command(PI_CMD_I2CRS, (int)handle, 0); }
+
+ public int i2c_write_byte_data(UInt32 handle, UInt32 reg, UInt32 val)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=reg
+ p3=4
+ ## extension ##
+ uint32_t val
+ */
+
+ exts[0].Contents = UInt32ToBytes(val);
+
+ return pigpio_command_ext(PI_CMD_I2CWB, (int)handle, (int)reg, exts);
+ }
+
+ public int i2c_write_word_data(UInt32 handle, UInt32 reg, UInt32 val)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=reg
+ p3=4
+ ## extension ##
+ uint32_t val
+ */
+
+ exts[0].Contents = UInt32ToBytes(val);
+
+ return pigpio_command_ext(PI_CMD_I2CWW, (int)handle, (int)reg, exts);
+ }
+
+ public int i2c_read_byte_data(UInt32 handle, UInt32 reg)
+ { return pigpio_command(PI_CMD_I2CRB, (int)handle, (int)reg); }
+
+ public int i2c_read_word_data(UInt32 handle, UInt32 reg)
+ { return pigpio_command(PI_CMD_I2CRW, (int)handle, (int)reg); }
+
+ public int i2c_process_call(UInt32 handle, UInt32 reg, UInt32 val)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=reg
+ p3=4
+ ## extension ##
+ uint32_t val
+ */
+
+ exts[0].Contents = UInt32ToBytes(val);
+
+ return pigpio_command_ext(PI_CMD_I2CPK, (int)handle, (int)reg, exts);
+ }
+
+ public int i2c_write_block_data(UInt32 handle, UInt32 reg, byte[] buf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=reg
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = buf;
+
+ return pigpio_command_ext(PI_CMD_I2CWK, (int)handle, (int)reg, exts);
+ }
+
+ public int i2c_read_block_data(UInt32 handle, UInt32 reg, byte[] buf)
+ {
+ int bytes;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command(PI_CMD_I2CRK, (int)handle, (int)reg);
+
+ if (bytes > 0)
+ {
+ // 32バイト固定になっていたが、不明
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int i2c_block_process_call(UInt32 handle, UInt32 reg, byte[] buf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=reg
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = buf;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext(PI_CMD_I2CPK, (int)handle, (int)reg, exts);
+
+ if (bytes > 0)
+ {
+ // 32バイト固定になっていたが、不明
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int i2c_read_i2c_block_data(UInt32 handle, UInt32 reg, byte[] buf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=reg
+ p3=4
+ ## extension ##
+ uint32_t count
+ */
+
+ UInt32 count = (UInt32)buf.Length;
+ exts[0].Contents = UInt32ToBytes(count);
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext(PI_CMD_I2CRI, (int)handle, (int)reg, exts);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int i2c_write_i2c_block_data(UInt32 handle, UInt32 reg, byte[] buf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=reg
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = buf;
+
+ return pigpio_command_ext(PI_CMD_I2CWI, (int)handle, (int)reg, exts);
+ }
+
+ public int i2c_read_device(UInt32 handle, byte[] buf)
+ {
+ int bytes;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command(PI_CMD_I2CRD, (int)handle, buf.Length);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int i2c_write_device(UInt32 handle, byte[] buf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=0
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = buf;
+
+ return pigpio_command_ext(PI_CMD_I2CWD, (int)handle, 0, exts);
+ }
+
+ public int i2c_zip(UInt32 handle, byte[] inBuf, byte[] outBuf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=0
+ p3=inLen
+ ## extension ##
+ char inBuf[inLen]
+ */
+
+ exts[0].Contents = inBuf;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext(PI_CMD_I2CZ, (int)handle, 0, exts);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(outBuf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int bb_i2c_open(UInt32 SDA, UInt32 SCL, UInt32 baud)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=SDA
+ p2=SCL
+ p3=4
+ ## extension ##
+ uint32_t baud
+ */
+
+ exts[0].Contents = UInt32ToBytes(baud);
+
+ return pigpio_command_ext(PI_CMD_BI2CO, (int)SDA, (int)SCL, exts);
+ }
+
+ public int bb_i2c_close(UInt32 SDA)
+ { return pigpio_command(PI_CMD_BI2CC, (int)SDA, 0); }
+
+ public int bb_i2c_zip(UInt32 SDA, byte[] inBuf, byte[] outBuf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=SDA
+ p2=0
+ p3=inLen
+ ## extension ##
+ char inBuf[inLen]
+ */
+
+ exts[0].Contents = inBuf;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext(PI_CMD_BI2CZ, (int)SDA, 0, exts);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(outBuf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int bb_spi_open(
+ UInt32 CS, UInt32 MISO, UInt32 MOSI, UInt32 SCLK,
+ UInt32 baud, UInt32 spiFlags)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=CS
+ p2=0
+ p3=20
+ ## extension ##
+ uint32_t MISO
+ uint32_t MOSI
+ uint32_t SCLK
+ uint32_t baud
+ uint32_t spiFlags
+ */
+
+ exts[0].Contents = UInt32ArrayToBytes(new UInt32[] {
+ MISO, MOSI, SCLK, baud, spiFlags
+ });
+
+ return pigpio_command_ext(PI_CMD_BSPIO, (int)CS, 0, exts);
+ }
+
+ public int bb_spi_close(UInt32 CS)
+ { return pigpio_command(PI_CMD_BSPIC, (int)CS, 0); }
+
+ public int bb_spi_xfer(UInt32 CS, byte[] txBuf, byte[] rxBuf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=CS
+ p2=0
+ p3=count
+ ## extension ##
+ char txBuf[count]
+ */
+
+ exts[0].Contents = txBuf;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext(PI_CMD_BSPIX, (int)CS, 0, exts);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(rxBuf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int spi_open(UInt32 channel, UInt32 speed, UInt32 flags)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=channel
+ p2=speed
+ p3=4
+ ## extension ##
+ uint32_t flags
+ */
+
+ exts[0].Contents = UInt32ToBytes(flags);
+
+ return pigpio_command_ext(PI_CMD_SPIO, (int)channel, (int)speed, exts);
+ }
+
+ public int spi_close(UInt32 handle)
+ { return pigpio_command(PI_CMD_SPIC, (int)handle, 0); }
+
+ public int spi_read(UInt32 handle, byte[] buf)
+ {
+ int bytes;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command(PI_CMD_SPIR, (int)handle, buf.Length);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int spi_write(UInt32 handle, byte[] buf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=0
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = buf;
+
+ return pigpio_command_ext(PI_CMD_SPIW, (int)handle, 0, exts);
+ }
+
+ public int spi_xfer(UInt32 handle, byte[] txBuf, byte[] rxBuf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=0
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = txBuf;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext(PI_CMD_SPIX, (int)handle, 0, exts);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(rxBuf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int serial_open(string dev, UInt32 baud, UInt32 flags)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=baud
+ p2=flags
+ p3=len
+ ## extension ##
+ char dev[len]
+ */
+
+ var bytes = Encoding.UTF8.GetBytes(dev);
+ exts[0].Contents = bytes;
+
+ return pigpio_command_ext(PI_CMD_SERO, (int)baud, (int)flags, exts);
+ }
+
+ public int serial_close(UInt32 handle)
+ { return pigpio_command(PI_CMD_SERC, (int)handle, 0); }
+
+ public int serial_write_byte(UInt32 handle, UInt32 val)
+ { return pigpio_command(PI_CMD_SERWB, (int)handle, (int)val); }
+
+ public int serial_read_byte(UInt32 handle)
+ { return pigpio_command(PI_CMD_SERRB, (int)handle, 0); }
+
+ public int serial_write(UInt32 handle, byte[] buf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=0
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = buf;
+
+ return pigpio_command_ext(PI_CMD_SERW, (int)handle, 0, exts);
+ }
+
+ public int serial_read(UInt32 handle, byte[] buf)
+ {
+ int bytes;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command(PI_CMD_SERR, (int)handle, buf.Length);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public int serial_data_available(UInt32 handle)
+ { return pigpio_command(PI_CMD_SERDA, (int)handle, 0); }
+
+ int custom_1(UInt32 arg1, UInt32 arg2, string argx, byte[] retBuf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=arg1
+ p2=arg2
+ p3=count
+ ## extension ##
+ char argx[count]
+ */
+
+ exts[0].Contents = Encoding.UTF8.GetBytes(argx);
+
+ return pigpio_command_ext
+ (PI_CMD_CF2, (int)arg1, (int)arg2, exts);
+ }
+
+ int custom_2(UInt32 arg1, string argx, byte[] retBuf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=arg1
+ p2=retMax
+ p3=count
+ ## extension ##
+ char argx[count]
+ */
+
+ exts[0].Contents = Encoding.UTF8.GetBytes(argx);
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext
+ (PI_CMD_CF2, (int)arg1, retBuf.Length, exts);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(retBuf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ int get_pad_strength(UInt32 pad)
+ { return pigpio_command(PI_CMD_PADG, (int)pad, 0); }
+
+ int set_pad_strength(UInt32 pad, UInt32 padStrength)
+ { return pigpio_command(PI_CMD_PADS, (int)pad, (int)padStrength); }
+
+ int shell_(string scriptName, string scriptString)
+ {
+ GpioExtent[] exts = new GpioExtent[] {
+ new GpioExtent(),
+ new GpioExtent()
+ };
+
+ /*
+ p1=len(scriptName)
+ p2=0
+ p3=len(scriptName) + len(scriptString) + 1
+ ## extension ##
+ char[]
+ */
+
+ exts[0].Contents = Encoding.UTF8.GetBytes(scriptName + "\0"); /* include null byte */
+
+ exts[1].Contents = Encoding.UTF8.GetBytes(scriptString);
+
+ return pigpio_command_ext
+ (PI_CMD_SHELL, scriptName.Length, 0, exts);
+ }
+
+ int file_open(string file, UInt32 mode)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=mode
+ p2=0
+ p3=len
+ ## extension ##
+ char file[len]
+ */
+
+ exts[0].Contents = Encoding.UTF8.GetBytes(file);
+
+ return pigpio_command_ext
+ (PI_CMD_FO, (int)mode, 0, exts);
+ }
+
+ int file_close(UInt32 handle)
+ { return pigpio_command(PI_CMD_FC, (int)handle, 0); }
+
+ int file_write(UInt32 handle, byte[] buf)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=0
+ p3=count
+ ## extension ##
+ char buf[count]
+ */
+
+ exts[0].Contents = buf;
+
+ return pigpio_command_ext
+ (PI_CMD_FW, (int)handle, 0, exts);
+ }
+
+ int file_read(UInt32 handle, byte[] buf)
+ {
+ int bytes;
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command
+ (PI_CMD_FR, (int)handle, buf.Length);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ int file_seek(UInt32 handle, UInt32 seekOffset, int seekFrom)
+ {
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=handle
+ p2=seekOffset
+ p3=4
+ ## extension ##
+ uint32_t seekFrom
+ */
+
+ exts[0].Contents = UInt32ToBytes((UInt32)seekFrom);
+
+ return pigpio_command_ext
+ (PI_CMD_FS, (int)handle, (int)seekOffset, exts);
+ }
+
+ int file_list(string fpat, byte[] buf)
+ {
+ int bytes;
+ GpioExtent[] exts = new GpioExtent[] { new GpioExtent() };
+
+ /*
+ p1=60000
+ p2=0
+ p3=len
+ ## extension ##
+ char fpat[len]
+ */
+
+ exts[0].Contents = Encoding.UTF8.GetBytes(fpat);
+
+ lock (LockObject)
+ {
+ bytes = pigpio_command_ext(PI_CMD_FL, 60000, 0, exts);
+
+ if (bytes > 0)
+ {
+ bytes = recvMax(buf, bytes);
+ }
+ }
+
+ return bytes;
+ }
+
+ public Callback callback(UInt32 user_gpio, UInt32 edge, Action f)
+ { return intCallback(user_gpio, edge, f, null, 0); }
+
+ public Callback callback_ex(UInt32 user_gpio, UInt32 edge, Action f, object user)
+ { return intCallback(user_gpio, edge, f, user, 1); }
+
+ public int callback_cancel(Callback callback)
+ {
+ if (gCallBackList.Contains(callback))
+ {
+ gCallBackList.Remove(callback);
+
+ findNotifyBits();
+
+ return 0;
+ }
+ return (int)EError.pigif_callback_not_found;
+ }
+
+ int wait_for_edge(int pi, UInt32 user_gpio, UInt32 edge, double timeout)
+ {
+ int triggered = 0;
+ double due;
+
+ if (timeout <= 0.0) return 0;
+
+ due = time_time() + timeout;
+
+ var id = callback(user_gpio, edge, (gpio, level, tick, user) =>
+ {
+ triggered = 1;
+ });
+
+ while (triggered == 0 && (time_time() < due)) time_sleep(0.05);
+
+ callback_cancel(id);
+
+ return triggered;
+ }
+
+ // Do not implement
+ // event_callback(),
+ // event_callback_ex(),
+ // event_callback_cancel() and
+ // wait_for_event().
+
+ int event_trigger(UInt32 evt)
+ { return pigpio_command(PI_CMD_EVM, (int)evt, 0); }
+
+ #endregion
+
+
+ #region # private method
+
+ private byte[] UInt32ArrayToBytes(UInt32[] array)
+ {
+ int numBytes = 4;
+
+ byte[] bytes = new byte[numBytes * array.Length];
+ for (int i = 0; i < array.Length; i++)
+ {
+ byte[] tempBytes = BitConverter.GetBytes(array[i]);
+ tempBytes.CopyTo(bytes, numBytes * i);
+ }
+
+ return bytes;
+ }
+
+ private byte[] UInt32ToBytes(UInt32 data)
+ {
+ return UInt32ArrayToBytes(new UInt32[] { data });
+ }
+
+ private UInt32[] BytesToUInt32Array(byte[] bytes)
+ {
+ int numBytes = 4;
+
+ UInt32[] array = new UInt32[bytes.Length / numBytes];
+ byte[] dataBytes = new byte[numBytes];
+ for (int i = 0; i < array.Length; i++)
+ {
+ for (int b = 0; b < numBytes; b++)
+ {
+ dataBytes[b] = bytes[numBytes * i + b];
+ }
+ array[i] = BitConverter.ToUInt32(dataBytes, 0);
+ }
+
+ return array;
+ }
+
+ private int pigpio_command(int command, int p1, int p2)
+ {
+ if (CanWrite == false || CanRead == false)
+ {
+ return (int)EError.pigif_unconnected_pi;
+ }
+
+ UInt32[] cmd = new UInt32[4];
+ cmd[0] = (UInt32)command;
+ cmd[1] = (UInt32)p1;
+ cmd[2] = (UInt32)p2;
+ cmd[3] = 0;
+
+ // UInt32[] -> byte[]
+ byte[] bytes = UInt32ArrayToBytes(cmd);
+
+ lock (LockObject)
+ {
+ try
+ {
+ this.TcpConnection.Stream.Write(bytes, 0, bytes.Length);
+ }
+ catch (Exception)
+ {
+ return (int)EError.pigif_bad_send;
+ }
+
+ try
+ {
+ if (this.TcpConnection.Stream.Read(bytes, 0, bytes.Length) != bytes.Length)
+ {
+ return (int)EError.pigif_bad_recv;
+ }
+ }
+ catch (Exception)
+ {
+ return (int)EError.pigif_bad_recv;
+ }
+ }
+
+ // byte[] -> UInt32[]
+ cmd = BytesToUInt32Array(bytes);
+
+ return (int)cmd[3];
+ }
+
+ private int pigpio_notify()
+ {
+ if (NotifyTcpConnection == null || NotifyTcpConnection.Stream == null ||
+ NotifyTcpConnection.Stream.CanWrite == false || NotifyTcpConnection.Stream.CanRead == false)
+ {
+ return (int)EError.pigif_unconnected_pi;
+ }
+
+ UInt32[] cmd = new UInt32[4];
+ cmd[0] = PI_CMD_NOIB;
+ cmd[1] = 0;
+ cmd[2] = 0;
+ cmd[3] = 0;
+
+ // UInt32[] -> byte[]
+ byte[] bytes = UInt32ArrayToBytes(cmd);
+
+ lock (LockObject)
+ {
+ try
+ {
+ NotifyTcpConnection.Stream.Write(bytes, 0, bytes.Length);
+ }
+ catch (Exception)
+ {
+ return (int)EError.pigif_bad_send;
+ }
+
+ try
+ {
+ if (NotifyTcpConnection.Stream.Read(bytes, 0, bytes.Length) != bytes.Length)
+ {
+ return (int)EError.pigif_bad_recv;
+ }
+ }
+ catch (Exception)
+ {
+ return (int)EError.pigif_bad_recv;
+ }
+ }
+
+ // byte[] -> UInt32[]
+ cmd = BytesToUInt32Array(bytes);
+
+ return (int)cmd[3];
+ }
+
+ private int pigpio_command_ext(int command, int p1, int p2, GpioExtent[] exts)
+ {
+ if (CanWrite == false || CanRead == false)
+ {
+ return (int)EError.pigif_unconnected_pi;
+ }
+
+ int extsBytes = 0;
+ foreach (var ext in exts)
+ {
+ extsBytes += ext.Contents.Length;
+ }
+
+ UInt32[] cmd = new UInt32[4];
+ cmd[0] = (UInt32)command;
+ cmd[1] = (UInt32)p1;
+ cmd[2] = (UInt32)p2;
+ cmd[3] = (UInt32)extsBytes;
+
+ // UInt32[] -> byte[]
+ byte[] cmdBytes = UInt32ArrayToBytes(cmd);
+
+ byte[] bytes = new byte[cmdBytes.Length + extsBytes];
+ int index = 0;
+ cmdBytes.CopyTo(bytes, index); index += cmdBytes.Length;
+ foreach (var ext in exts)
+ {
+ ext.Contents.CopyTo(bytes, index); index += ext.Contents.Length;
+ }
+
+ lock (LockObject)
+ {
+ try
+ {
+ this.TcpConnection.Stream.Write(bytes, 0, bytes.Length);
+ }
+ catch (Exception)
+ {
+ return (int)EError.pigif_bad_send;
+ }
+
+ try
+ {
+ if (this.TcpConnection.Stream.Read(cmdBytes, 0, cmdBytes.Length) != cmdBytes.Length)
+ {
+ return (int)EError.pigif_bad_recv;
+ }
+ }
+ catch (Exception)
+ {
+ return (int)EError.pigif_bad_recv;
+ }
+ }
+
+ // byte[] -> UInt32[]
+ cmd = BytesToUInt32Array(cmdBytes);
+
+ return (int)cmd[3];
+ }
+
+ private void dispatch_notification(GpioReport r)
+ {
+ UInt32 changed;
+ int l, g;
+
+ //Console.WriteLine("s={0:X4} f={1:X4} t={2} l={3:X8}",
+ // r.seqno, r.flags, r.tick, r.level);
+
+ if (r.flags == 0)
+ {
+ changed = (r.level ^ gLastLevel) & gNotifyBits;
+
+ gLastLevel = r.level;
+
+ foreach (var p in gCallBackList)
+ {
+ if ((changed & (1 << (p.gpio))) != 0)
+ {
+ if (((r.level) & (1 << (p.gpio))) != 0) l = 1; else l = 0;
+ if (((p.edge) ^ l) != 0)
+ {
+ if (p.ex != 0) p.f((UInt32)p.gpio, (UInt32)l, r.tick, p.user);
+ else p.f((UInt32)p.gpio, (UInt32)l, r.tick, null);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (((r.flags) & PI_NTFY_FLAGS_WDOG) != 0)
+ {
+ g = (r.flags) & 31;
+
+ foreach (var p in gCallBackList)
+ {
+ if ((p.gpio) == g)
+ {
+ if (p.ex != 0) p.f((UInt32)g, PI_TIMEOUT, r.tick, p.user);
+ else p.f((UInt32)g, PI_TIMEOUT, r.tick, null);
+ }
+ }
+ }
+ else if (((r.flags) & PI_NTFY_FLAGS_EVENT) != 0)
+ {
+ g = (r.flags) & 31;
+
+ foreach (var ep in geCallBackList)
+ {
+ if ((ep.evt) == g)
+ {
+ if (ep.ex != 0) ep.f((UInt32)g, r.tick, ep.user);
+ else ep.f((UInt32)g, r.tick, null);
+ }
+ }
+ }
+ }
+ }
+
+ private void NotifyThread(CancellationToken ct)
+ {
+ byte[] bytes = new byte[12 * PI_MAX_REPORTS_PER_READ];
+ int received = 0;
+
+ while (ct.IsCancellationRequested == false)
+ {
+ if (NotifyTcpConnection == null || NotifyTcpConnection.Stream == null || NotifyTcpConnection.Stream.CanRead == false)
+ break;
+
+ try
+ {
+ while (received < 12)
+ {
+ received += NotifyTcpConnection.Stream.Read(bytes, received, bytes.Length - received);
+ }
+ }
+ catch (IOException)
+ {
+ break;
+ }
+
+ int p = 0;
+ while (p + 12 <= received)
+ {
+ var report = new GpioReport()
+ {
+ seqno = BitConverter.ToUInt16(new byte[] { bytes[p + 0], bytes[p + 1] }, 0),
+ flags = BitConverter.ToUInt16(new byte[] { bytes[p + 2], bytes[p + 3] }, 0),
+ tick = BitConverter.ToUInt32(new byte[] { bytes[p + 4], bytes[p + 5], bytes[p + 6], bytes[p + 7] }, 0),
+ level = BitConverter.ToUInt32(new byte[] { bytes[p + 8], bytes[p + 9], bytes[p + 10], bytes[p + 11] }, 0)
+ };
+ dispatch_notification(report);
+ p += 12;
+ }
+ for (int i = p; i < received; i++)
+ {
+ bytes[i - p] = bytes[i];
+ }
+ received -= p;
+ }
+ }
+
+ private void findNotifyBits()
+ {
+ UInt32 bits = 0;
+
+
+ foreach (var callback in gCallBackList)
+ {
+ bits |= (1U << (callback.gpio));
+ }
+
+ if (bits != gNotifyBits)
+ {
+ gNotifyBits = bits;
+ pigpio_command(PI_CMD_NB, gPigHandle, (int)gNotifyBits);
+ }
+ }
+
+ private Callback intCallback(UInt32 user_gpio, UInt32 edge, Action f, object user, int ex)
+ {
+ if ((user_gpio >= 0) && (user_gpio < 32) && (edge >= 0) && (edge <= 2) && f != null)
+ {
+ /* prevent duplicates */
+
+ if (gCallBackList.Count(p => p.gpio == user_gpio && p.edge == edge && p.f == f) != 0)
+ {
+ return null;
+ }
+
+ var callback = new Callback()
+ {
+ gpio = (int)user_gpio,
+ edge = (int)edge,
+ f = f,
+ user = user,
+ ex = ex
+ };
+ gCallBackList.Add(callback);
+
+ findNotifyBits();
+
+ return callback;
+ }
+
+ return null;
+ }
+
+ private int recvMax(byte[] buf, int sent)
+ {
+ /*
+ Copy at most bufSize bytes from the receieved message to
+ buf. Discard the rest of the message.
+ */
+ byte[] scratch = new byte[4096];
+ int remaining, fetch, count;
+
+ if (sent < buf.Length) count = sent; else count = buf.Length;
+
+ if (count > 0)
+ {
+ int received = 0;
+ while (received < count)
+ {
+ received += this.TcpConnection.Stream.Read(buf, received, count - received);
+ }
+ }
+
+ remaining = sent - count;
+
+ while (remaining > 0)
+ {
+ fetch = remaining;
+ if (fetch > scratch.Length) fetch = scratch.Length;
+ remaining -= this.TcpConnection.Stream.Read(scratch, 0, fetch);
+ }
+
+ return count;
+ }
+
+ #endregion
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/Properties/launchSettings.json b/RSTP_DSLink/RSTP_DSLink/Properties/launchSettings.json
new file mode 100644
index 0000000..e63b917
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "RSTP_DSLink": {
+ "commandName": "Project",
+ "commandLineArgs": "--name RTSP --broker http://192.168.1.54:8080/conn"
+ }
+ }
+}
\ No newline at end of file
diff --git a/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.cs b/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.cs
index 617744e..f01c5f8 100644
--- a/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.cs
+++ b/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.cs
@@ -7,24 +7,44 @@ using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
+using System.Net.NetworkInformation;
+using System.Net;
+using System.Text.RegularExpressions;
+using System.Diagnostics;
+using Iot.Device.Pigpio;
using Serilog;
using CommandLine;
using System.IO;
using RTSP_DSLink;
+using System.Device.Gpio;
namespace RTSP_DSLink
{
public class RSTP_DSLink : DSLinkContainer
{
- private readonly Dictionary _rngValues;
- private readonly Random _random;
- private readonly Thread _randomNumberThread;
+ private readonly Dictionary _processes;
+ private readonly Dictionary _alarmCTs;
+ public static bool PortInUse(int port)
+ {
+ bool inUse = false;
+ IPGlobalProperties ipProperties = IPGlobalProperties.GetIPGlobalProperties();
+ IPEndPoint[] ipEndPoints = ipProperties.GetActiveTcpListeners();
+ foreach (IPEndPoint endPoint in ipEndPoints)
+ {
+ if (endPoint.Port == port)
+ {
+ inUse = true;
+ break;
+ }
+ }
+ return inUse;
+ }
private static void Main(string[] args)
{
Parser.Default.ParseArguments(args)
.WithParsed(cmdLineOptions =>
- {
+ {
cmdLineOptions = ProcessDSLinkJson(cmdLineOptions);
//Init the logging engine
@@ -49,11 +69,13 @@ namespace RTSP_DSLink
public static async Task InitializeLink(RSTP_DSLink dsLink)
{
await dsLink.Connect();
- await dsLink.SaveNodes();
+ //dsLink.ClearNodes();
}
public RSTP_DSLink(Configuration config, CommandLineArguments cmdLineOptions) : base(config)
{
+ _processes = new Dictionary();
+ _alarmCTs = new Dictionary();
//Perform any configuration overrides from command line options
if (cmdLineOptions.BrokerUrl != null)
{
@@ -75,97 +97,279 @@ namespace RTSP_DSLink
config.KeysFolder = cmdLineOptions.KeysFolder;
}
- _rngValues = new Dictionary();
- _random = new Random();
-
- Responder.AddNodeClass("rngAdd", delegate(Node node)
+ Responder.AddNodeClass("streamAdd", delegate(Node node)
{
- node.Configs.Set(ConfigType.DisplayName, new Value("Create RNG"));
+ node.Configs.Set(ConfigType.DisplayName, new Value("Add Stream"));
node.AddParameter(new Parameter
{
- Name = "rngName",
+ Name = "RSTP URL",
ValueType = DSLink.Nodes.ValueType.String
- });
- node.SetAction(new ActionHandler(Permission.Config, _createRngAction));
- });
-
- Responder.AddNodeClass("rng", delegate(Node node)
- {
- node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
- node.Configs.Set(ConfigType.ValueType, DSLink.Nodes.ValueType.Number.TypeValue);
- node.Value.Set(0);
-
- lock (_rngValues)
- {
- _rngValues.Add(node.Name, node);
}
+ );
+ node.AddParameter(new Parameter
+ {
+ Name = "Stream name",
+ ValueType = DSLink.Nodes.ValueType.String
+ }
+ );
+ node.SetAction(new ActionHandler(Permission.Config, _createStreamAction));
});
- Responder.AddNodeClass("number", delegate (Node node)
+ Responder.AddNodeClass("alarmAdd", delegate (Node node)
+ {
+ node.Configs.Set(ConfigType.DisplayName, new Value("Add Alarm"));
+ node.AddParameter(new Parameter
+ {
+ Name = "Alarm name",
+ ValueType = DSLink.Nodes.ValueType.String
+ }
+ );
+ /*node.AddParameter(new Parameter
+ {
+ Name = "Camera name",
+ ValueType = DSLink.Nodes.ValueType.String
+ }
+ ); */
+ node.AddParameter(new Parameter
+ {
+ Name = "Raspberry Pi IP Address",
+ ValueType = DSLink.Nodes.ValueType.String
+ }
+ );
+ node.AddParameter(new Parameter
+ {
+ Name = "Port Number",
+ ValueType = DSLink.Nodes.ValueType.Number
+ }
+ );
+ node.AddParameter(new Parameter
+ {
+ Name = "GPIO Pin",
+ ValueType = DSLink.Nodes.ValueType.Number
+ }
+ );
+
+ node.SetAction(new ActionHandler(Permission.Config, _createAlarmAction));
+ });
+
+ Responder.AddNodeClass("removeNode", delegate (Node node)
+ {
+ node.Configs.Set(ConfigType.DisplayName, new Value("Remove"));
+ node.SetAction(new ActionHandler(Permission.Config, removeNodeAction));
+ });
+
+ Responder.AddNodeClass("stream", delegate (Node node)
+ {
+ node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
+ node.Configs.Set(ConfigType.ValueType, DSLink.Nodes.ValueType.Number.TypeValue);
+
+ node.Value.Set(-1);
+ });
+
+ Responder.AddNodeClass("alarm", delegate (Node node)
+ {
+ node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
+ node.Configs.Set(ConfigType.ValueType, DSLink.Nodes.ValueType.Boolean.TypeValue);
+ node.Value.Set(false);
+ });
+
+ /*Responder.AddNodeClass("rng", delegate(Node node)
{
node.Configs.Set(ConfigType.Writable, new Value(Permission.Read.Permit));
node.Configs.Set(ConfigType.ValueType, DSLink.Nodes.ValueType.Number.TypeValue);
node.Value.Set(0);
- });
- _randomNumberThread = new Thread(_updateRandomNumbers);
- _randomNumberThread.Start();
+ });*/
+ }
+ public void ClearNodes()
+ {
+ foreach (var key in Responder.SuperRoot.Children.Keys)
+ {
+ Responder.SuperRoot.Children.TryGetValue(key, out Node oldStream);
+ if (oldStream.ClassName == "stream")
+ {
+ //Console.WriteLine(key);
+ Responder.SuperRoot.RemoveChild(key);
+ }
+ }
}
public override void InitializeDefaultNodes()
{
- Responder.SuperRoot.CreateChild("createRNG", "rngAdd").BuildNode();
+ Responder.SuperRoot.CreateChild("createStream", "streamAdd").BuildNode();
+ Responder.SuperRoot.CreateChild("createAlarm", "alarmAdd").BuildNode();
+ SaveNodes();
+ //Responder.SuperRoot.CreateChild("removeStream", "remove").BuildNode();
}
- private void _updateRandomNumbers()
+ private async void _createStreamAction(InvokeRequest request)
{
- while (Thread.CurrentThread.IsAlive)
+ try
{
- lock (_rngValues)
- {
- foreach (var n in _rngValues)
- {
- Node minChild, maxChild;
- n.Value.Children.TryGetValue("min", out minChild);
- n.Value.Children.TryGetValue("max", out maxChild);
- //Si les enfants ne sont pas initialisés, on met les valeurs de min et max à 0
- // Code équivalent à :
- //int min, max;
- //if (minChild != null) {
- // min = minChild.Value.Int;
- //}
- //else {
- // min = 0;
- //}
- //if (maxChild != null) {
- // max = maxChild.Value.Int;
- //}
- //else {
- // max = 0;
- //}
- int min = (minChild != null ? minChild.Value.Int : 0);
- int max = (maxChild != null ? maxChild.Value.Int : 0);
+ var address = request.Parameters["RSTP URL"].Value();
+ var streamName = request.Parameters["Stream name"].Value();
+ int port = 8081;
- n.Value.Value.Set(_random.Next(min, max+1));
+ if (string.IsNullOrEmpty(address)) return;
+
+ while (PortInUse(port))
+ port++;
+
+ /*foreach (var oldStreamName in Responder.SuperRoot.Children.Keys)
+ {
+
+ Responder.SuperRoot.Children.TryGetValue(oldStreamName, out Node oldStream);
+ if (oldStream.ClassName == "stream")
+ {
+ //Console.WriteLine(oldStreamName);
+ if (oldStream.Value.Int == port)
+ {
+ Responder.SuperRoot.RemoveChild(oldStreamName);
+ }
}
- }
-
- Thread.Sleep(10000);
+ }*/
+
+ if (string.IsNullOrEmpty(streamName)) return;
+ if (Responder.SuperRoot.Children.ContainsKey(streamName)) return;
+
+ var stream = Responder.SuperRoot.CreateChild(streamName, "stream").BuildNode();
+
+ stream.Value.Set(port);
+ stream.CreateChild("remove", "removeNode").BuildNode();
+
+ /*System.Diagnostics.Process.Start("CMD.exe", "/C \"C:\\Program Files\\VideoLAN\\VLC\\VLC.exe\"" +
+ " -vvv -Idummy " + address + " --sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}" +
+ ":standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a}," +
+ "mux=mpjpeg,dst=:" + port + "/} vlc://quit;");*/
+ var proc = new Process {
+ StartInfo = new ProcessStartInfo
+ {
+ FileName = "C:\\Program Files\\VideoLAN\\VLC\\VLC.exe",
+ Arguments = " -vvv -Idummy " + address + " --sout #transcode{vcodec=MJPG,venc=ffmpeg{strict=1}}" +
+ ":standard{access=http{mime=multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a}," +
+ "mux=mpjpeg,dst=:" + port + "/} vlc://quit;",
+ UseShellExecute = false,
+ RedirectStandardOutput = false,
+ CreateNoWindow = true
+ }};
+ proc.Start();
+ _processes.Add(streamName, proc);
+
+ await request.Close();
+ await SaveNodes();
+ }
+ catch(Exception e)
+ {
+ Console.WriteLine(e.GetType() + ":" + e.Message);
}
}
- private async void _createRngAction(InvokeRequest request)
+ private async void _createAlarmAction(InvokeRequest request)
{
- var rngName = request.Parameters["rngName"].Value();
- if (string.IsNullOrEmpty(rngName)) return;
- if (Responder.SuperRoot.Children.ContainsKey(rngName)) return;
+ try
+ {
+ var alarmName = request.Parameters["Alarm name"].Value();
+ //var cameraName = request.Parameters["Camera name"].Value();
+ var address = request.Parameters["Raspberry Pi IP Address"].Value();
+ var port = request.Parameters["Port Number"].Value();
+ var pin = request.Parameters["GPIO Pin"].Value();
- var newRng = Responder.SuperRoot.CreateChild(rngName, "rng").BuildNode();
- newRng.CreateChild("min", "number").BuildNode();
- newRng.CreateChild("max", "number").BuildNode();
+ if (string.IsNullOrEmpty(alarmName)) return;
+ //if (string.IsNullOrEmpty(cameraName)) return;
+ if (Responder.SuperRoot.Children.ContainsKey(alarmName)) return;
+ //if (!Responder.SuperRoot.Children.ContainsKey(cameraName)) return;
- await request.Close();
- await SaveNodes();
+ var alarm = Responder.SuperRoot.CreateChild(alarmName, "alarm").BuildNode();
+
+ alarm.CreateChild("remove", "removeNode").BuildNode();
+ var ts = new CancellationTokenSource();
+ CancellationToken ct = ts.Token;
+ Task.Run(() => _updateAlarm(alarm, address, port, pin, ct));
+ _alarmCTs.Add(alarmName, ts);
+
+
+
+ await request.Close();
+ await SaveNodes();
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.GetType() + ":" + e.Message);
+ }
+ }
+ private async void removeNodeAction(InvokeRequest request)
+ {
+ try
+ {
+ //Console.WriteLine(request.Path);
+
+ //on récupère le nom du noeud ayant envoyé la requête
+ //dans le chemin de la requête en utilisant une regex (le chemin se terminant par /noeud/remove)
+ var nodeName = Regex.Replace(request.Path, "^.*\\/([^\\/]*)\\/remove$", "$1");
+ //Console.WriteLine(streamName);
+
+
+ Responder.SuperRoot.Children.TryGetValue(nodeName, out Node node);
+ if (node != null)
+ {
+ if (node.ClassName == "stream")
+ {
+ var port = node.Value.Int;
+ _processes.TryGetValue(nodeName, out Process proc);
+ if (proc != null)
+ proc.Kill();
+ _processes.Remove(nodeName);
+
+ /*System.Diagnostics.Process.Start("CMD.exe", "/C FOR /F \"tokens=5 delims= \" %P IN ('netstat -a -n -o ^|" +
+ "findstr :" + stream.Value.Int + "') DO @ECHO taskkill /F /PID %P");*/
+
+ //FOR /F "tokens=5 delims= " %P IN('netstat -a -n -o | findstr :8081') DO @ECHO TaskKill.exe /PID %P
+ }
+ else if (node.ClassName == "alarm")
+ {
+ _alarmCTs.TryGetValue(nodeName, out CancellationTokenSource ts);
+ if(ts != null)
+ ts.Cancel();
+ }
+ Responder.SuperRoot.RemoveChild(nodeName);
+ }
+
+ await request.Close();
+ await SaveNodes();
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.GetType() + ":" + e.Message);
+ }
+ }
+
+ private async void _updateAlarm(Node alarm, string addr, int port, int pin, CancellationToken ct)
+ {
+ using (var driver = new Driver(new IPEndPoint(IPAddress.Parse(addr), port)))
+ {
+ await driver.ConnectAsync();
+ await Task.Delay(TimeSpan.FromSeconds(1)); //Give the socket time to get connected
+
+ Console.WriteLine("Connected");
+
+ using (var controller = new GpioController(PinNumberingScheme.Logical, driver))
+ {
+ controller.OpenPin(pin);
+ controller.SetPinMode(pin, PinMode.InputPullUp);
+
+ while (!ct.IsCancellationRequested)
+ {
+ controller.WaitForEvent(pin, PinEventTypes.Falling, ct);
+ if(!ct.IsCancellationRequested)
+ {
+ Console.WriteLine("Beep boop");
+ alarm.Value.Set(true);
+ }
+ }
+ Console.WriteLine("Task cancelled");
+ controller.ClosePin(pin);
+ }
+ }
}
#region Initialize Logging
diff --git a/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.csproj b/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.csproj
index 1ccf261..b2790ca 100644
--- a/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.csproj
+++ b/RSTP_DSLink/RSTP_DSLink/RSTP_DSLink.csproj
@@ -22,6 +22,8 @@
+
+
diff --git a/RSTP_DSLink/RSTP_DSLink/TcpConnection.cs b/RSTP_DSLink/RSTP_DSLink/TcpConnection.cs
new file mode 100644
index 0000000..d874b32
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/TcpConnection.cs
@@ -0,0 +1,156 @@
+using System;
+using System.Net.Sockets;
+
+namespace Iot.Device.Pigpio
+{
+ internal class TcpConnection
+ {
+ #region # event
+
+ public event EventHandler StreamChanged;
+
+ #endregion
+
+
+ #region # private field
+
+ private TcpClient tcp = null;
+ private string ipOrHost;
+ private int port;
+
+ #endregion
+
+
+ #region # public property
+
+ public bool IsOpened
+ {
+ get
+ {
+ return tcp != null;
+ }
+ }
+
+ private NetworkStream _stream = null;
+ public NetworkStream Stream
+ {
+ get
+ {
+ return _stream;
+ }
+ set
+ {
+ _stream = value;
+ if (StreamChanged != null)
+ {
+ StreamChanged.Invoke(this, new EventArgs());
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region # Implementation of IDisposable
+
+ bool disposed = false;
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+ protected virtual void Dispose(bool disposing)
+ {
+ if (disposed)
+ return;
+
+ if (disposing)
+ {
+ // Release managed objects
+ Close();
+ }
+
+ // Release unmanaged objects
+
+ disposed = true;
+ }
+ ~TcpConnection()
+ {
+ Dispose(false);
+ }
+
+ #endregion
+
+
+ #region # public method
+
+ public bool Open(string ipOrHost, int port)
+ {
+ if (tcp == null)
+ {
+ try
+ {
+ this.ipOrHost = ipOrHost;
+ this.port = port;
+
+ tcp = new TcpClient();
+ tcp.BeginConnect(ipOrHost, port, new AsyncCallback(NetConnectCallback), null);
+
+ Console.WriteLine("Connecting to {0}:{1}...", ipOrHost, port);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine("Connection failed({0}).", ex.Message);
+ Close();
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public void Close()
+ {
+ if (Stream != null)
+ {
+ // Execute handlers of StreamChanged event, and call Dispose()
+ var stream = Stream;
+ Stream = null;
+ stream.Dispose();
+ }
+ if (tcp != null)
+ {
+ tcp.Close();
+ tcp = null;
+
+ Console.WriteLine("{0}:{1} was disconnected.", ipOrHost, port);
+ }
+ ipOrHost = string.Empty;
+ port = 0;
+ }
+
+ #endregion
+
+
+ #region # private method
+
+ private void NetConnectCallback(IAsyncResult result)
+ {
+ if (tcp == null)
+ return;
+
+ if (tcp.Connected)
+ {
+ Console.WriteLine("Connected to LAN {0}:{1}.",
+ ((System.Net.IPEndPoint)tcp.Client.RemoteEndPoint).Address,
+ ((System.Net.IPEndPoint)tcp.Client.RemoteEndPoint).Port);
+
+ var stream = tcp.GetStream();
+ stream.ReadTimeout = 10000;
+ stream.WriteTimeout = 10000;
+ Stream = stream;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/.keys b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/.keys
new file mode 100644
index 0000000..fcf3e21
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/.keys
@@ -0,0 +1 @@
+AO39Mq3F7NNBl0JDFl0Vz5c99i8+xKqU6Z+X4IZqHLxN BB55A01yuewbt8+/lKZ9hNVvpvEAv9BAuY/y/M0KjvHxUzcFdGdmGrftSjQVtITmD5c83eFyBRMUeK9Ca7Eybn8=
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Microsoft.Win32.Registry.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Microsoft.Win32.Registry.dll
new file mode 100644
index 0000000..d7fdbbd
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Microsoft.Win32.Registry.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.deps.json b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.deps.json
index 73a412f..a0b2ef9 100644
--- a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.deps.json
+++ b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.deps.json
@@ -21,6 +21,8 @@
"Serilog.Sinks.File": "5.0.0",
"Serilog.Sinks.RollingFile": "3.3.0",
"StandardStorage": "0.1.1",
+ "System.Device.Gpio": "1.5.0",
+ "Unosquare.RaspberryIO.Peripherals": "0.5.0",
"DSLink": "1.0.0.0"
},
"runtime": {
@@ -37,8 +39,35 @@
},
"LibLog/5.0.8": {},
"Microsoft.CSharp/4.7.0": {},
- "Microsoft.NETCore.Platforms/2.0.0": {},
+ "Microsoft.NETCore.Platforms/5.0.0": {},
"Microsoft.NETCore.Targets/1.1.0": {},
+ "Microsoft.Win32.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "Microsoft.Win32.Registry/5.0.0": {
+ "dependencies": {
+ "System.Security.AccessControl": "5.0.0",
+ "System.Security.Principal.Windows": "5.0.0"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
+ "assemblyVersion": "5.0.0.0",
+ "fileVersion": "5.0.20.51904"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "5.0.0.0",
+ "fileVersion": "5.0.20.51904"
+ }
+ }
+ },
"MsgPack.Cli/1.0.1": {
"dependencies": {
"System.CodeDom": "4.4.0",
@@ -55,7 +84,7 @@
},
"NETStandard.Library/2.0.3": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0"
+ "Microsoft.NETCore.Platforms": "5.0.0"
}
},
"Newtonsoft.Json/13.0.1": {
@@ -74,6 +103,48 @@
}
}
},
+ "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.native.System/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "runtime.native.System.Net.Http/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0"
+ }
+ },
+ "runtime.native.System.Security.Cryptography.Apple/4.3.0": {
+ "dependencies": {
+ "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple": "4.3.0"
+ }
+ },
+ "runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "dependencies": {
+ "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2",
+ "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2"
+ }
+ },
+ "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple/4.3.0": {},
+ "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
+ "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {},
"Serilog/2.10.0": {
"runtime": {
"lib/netstandard2.1/Serilog.dll": {
@@ -119,8 +190,8 @@
"dependencies": {
"Serilog.Sinks.File": "5.0.0",
"System.IO": "4.3.0",
- "System.IO.FileSystem.Primitives": "4.0.1",
- "System.Runtime.InteropServices": "4.1.0",
+ "System.IO.FileSystem.Primitives": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
"System.Text.Encoding.Extensions": "4.0.11"
},
"runtime": {
@@ -149,27 +220,201 @@
}
}
},
- "System.Globalization/4.3.0": {
+ "System.Collections/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
+ "System.Collections.Concurrent/4.3.0": {
+ "dependencies": {
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Debug": "4.3.0",
+ "System.Diagnostics.Tracing": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Threading": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.Device.Gpio/1.5.0": {
+ "dependencies": {
+ "Microsoft.Win32.Registry": "5.0.0",
+ "System.Memory": "4.5.4",
+ "System.Runtime.InteropServices.WindowsRuntime": "4.3.0",
+ "System.Runtime.WindowsRuntime": "4.6.0",
+ "System.Threading.Tasks.Extensions": "4.5.4"
+ },
+ "runtime": {
+ "lib/netstandard2.0/System.Device.Gpio.dll": {
+ "assemblyVersion": "1.5.0.0",
+ "fileVersion": "1.500.21.36606"
+ }
+ }
+ },
+ "System.Diagnostics.Debug/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Diagnostics.DiagnosticSource/4.3.0": {
+ "dependencies": {
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Tracing": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Threading": "4.3.0"
+ }
+ },
+ "System.Diagnostics.Tracing/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Globalization/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Globalization.Calendars/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Globalization": "4.3.0",
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Globalization.Extensions/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Globalization": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0"
+ }
+ },
"System.IO/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
- "System.IO.FileSystem.Primitives/4.0.1": {
+ "System.IO.FileSystem/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.IO.FileSystem.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.IO.FileSystem.Primitives/4.3.0": {
"dependencies": {
"System.Runtime": "4.3.0"
}
},
+ "System.Linq/4.3.0": {
+ "dependencies": {
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Debug": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0"
+ }
+ },
+ "System.Memory/4.5.4": {},
+ "System.Net.Http/4.3.4": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Debug": "4.3.0",
+ "System.Diagnostics.DiagnosticSource": "4.3.0",
+ "System.Diagnostics.Tracing": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.Globalization.Extensions": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.IO.FileSystem": "4.3.0",
+ "System.Net.Primitives": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Security.Cryptography.Algorithms": "4.3.0",
+ "System.Security.Cryptography.Encoding": "4.3.0",
+ "System.Security.Cryptography.OpenSsl": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Security.Cryptography.X509Certificates": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading": "4.3.0",
+ "System.Threading.Tasks": "4.3.0",
+ "runtime.native.System": "4.3.0",
+ "runtime.native.System.Net.Http": "4.3.0",
+ "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2"
+ }
+ },
+ "System.Net.NetworkInformation/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.Win32.Primitives": "4.3.0",
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Tracing": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.IO.FileSystem": "4.3.0",
+ "System.IO.FileSystem.Primitives": "4.3.0",
+ "System.Linq": "4.3.0",
+ "System.Net.Primitives": "4.3.0",
+ "System.Net.Sockets": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Security.Principal.Windows": "5.0.0",
+ "System.Threading": "4.3.0",
+ "System.Threading.Overlapped": "4.3.0",
+ "System.Threading.Tasks": "4.3.0",
+ "System.Threading.Thread": "4.3.0",
+ "System.Threading.ThreadPool": "4.3.0",
+ "runtime.native.System": "4.3.0"
+ }
+ },
+ "System.Net.Primitives/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Handles": "4.3.0"
+ }
+ },
+ "System.Net.Sockets/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "Microsoft.NETCore.Targets": "1.1.0",
+ "System.IO": "4.3.0",
+ "System.Net.Primitives": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
"System.Numerics.Vectors/4.3.0": {
"dependencies": {
"System.Globalization": "4.3.0",
@@ -180,7 +425,7 @@
},
"System.Reflection/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
@@ -213,14 +458,14 @@
},
"System.Reflection.Primitives/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Resources.ResourceManager/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Globalization": "4.3.0",
"System.Reflection": "4.3.0",
@@ -229,43 +474,199 @@
},
"System.Runtime/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0"
}
},
+ "System.Runtime.CompilerServices.Unsafe/4.5.2": {},
"System.Runtime.Extensions/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
- "System.Runtime.Handles/4.0.1": {
+ "System.Runtime.Handles/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
- "System.Runtime.InteropServices/4.1.0": {
+ "System.Runtime.InteropServices/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Reflection": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0",
- "System.Runtime.Handles": "4.0.1"
+ "System.Runtime.Handles": "4.3.0"
}
},
- "System.Security.AccessControl/4.4.0": {
+ "System.Runtime.InteropServices.WindowsRuntime/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
- "System.Security.Principal.Windows": "4.4.0"
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Runtime.Numerics/4.3.0": {
+ "dependencies": {
+ "System.Globalization": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0"
+ }
+ },
+ "System.Runtime.WindowsRuntime/4.6.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0"
+ }
+ },
+ "System.Security.AccessControl/5.0.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Security.Principal.Windows": "5.0.0"
+ },
+ "runtime": {
+ "lib/netstandard2.0/System.Security.AccessControl.dll": {
+ "assemblyVersion": "5.0.0.0",
+ "fileVersion": "5.0.20.51904"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "5.0.0.0",
+ "fileVersion": "5.0.20.51904"
+ }
+ }
+ },
+ "System.Security.Cryptography.Algorithms/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Collections": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Runtime.Numerics": "4.3.0",
+ "System.Security.Cryptography.Encoding": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "runtime.native.System.Security.Cryptography.Apple": "4.3.0",
+ "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2"
+ }
+ },
+ "System.Security.Cryptography.Cng/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.IO": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Security.Cryptography.Algorithms": "4.3.0",
+ "System.Security.Cryptography.Encoding": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Text.Encoding": "4.3.0"
+ }
+ },
+ "System.Security.Cryptography.Csp/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.IO": "4.3.0",
+ "System.Reflection": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Security.Cryptography.Algorithms": "4.3.0",
+ "System.Security.Cryptography.Encoding": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading": "4.3.0"
+ }
+ },
+ "System.Security.Cryptography.Encoding/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Collections": "4.3.0",
+ "System.Collections.Concurrent": "4.3.0",
+ "System.Linq": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2"
+ }
+ },
+ "System.Security.Cryptography.OpenSsl/4.3.0": {
+ "dependencies": {
+ "System.Collections": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Runtime.Numerics": "4.3.0",
+ "System.Security.Cryptography.Algorithms": "4.3.0",
+ "System.Security.Cryptography.Encoding": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2"
+ }
+ },
+ "System.Security.Cryptography.Primitives/4.3.0": {
+ "dependencies": {
+ "System.Diagnostics.Debug": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Threading": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.Security.Cryptography.X509Certificates/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Collections": "4.3.0",
+ "System.Diagnostics.Debug": "4.3.0",
+ "System.Globalization": "4.3.0",
+ "System.Globalization.Calendars": "4.3.0",
+ "System.IO": "4.3.0",
+ "System.IO.FileSystem": "4.3.0",
+ "System.IO.FileSystem.Primitives": "4.3.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Extensions": "4.3.0",
+ "System.Runtime.Handles": "4.3.0",
+ "System.Runtime.InteropServices": "4.3.0",
+ "System.Runtime.Numerics": "4.3.0",
+ "System.Security.Cryptography.Algorithms": "4.3.0",
+ "System.Security.Cryptography.Cng": "4.3.0",
+ "System.Security.Cryptography.Csp": "4.3.0",
+ "System.Security.Cryptography.Encoding": "4.3.0",
+ "System.Security.Cryptography.OpenSsl": "4.3.0",
+ "System.Security.Cryptography.Primitives": "4.3.0",
+ "System.Text.Encoding": "4.3.0",
+ "System.Threading": "4.3.0",
+ "runtime.native.System": "4.3.0",
+ "runtime.native.System.Net.Http": "4.3.0",
+ "runtime.native.System.Security.Cryptography.OpenSsl": "4.3.2"
}
},
"System.Security.Permissions/4.4.1": {
"dependencies": {
- "System.Security.AccessControl": "4.4.0"
+ "System.Security.AccessControl": "5.0.0"
},
"runtime": {
"lib/netstandard2.0/System.Security.Permissions.dll": {
@@ -274,33 +675,137 @@
}
}
},
- "System.Security.Principal.Windows/4.4.0": {
- "dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0"
+ "System.Security.Principal.Windows/5.0.0": {
+ "runtime": {
+ "lib/netstandard2.0/System.Security.Principal.Windows.dll": {
+ "assemblyVersion": "5.0.0.0",
+ "fileVersion": "5.0.20.51904"
+ }
+ },
+ "runtimeTargets": {
+ "runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
+ "rid": "unix",
+ "assetType": "runtime",
+ "assemblyVersion": "5.0.0.0",
+ "fileVersion": "5.0.20.51904"
+ },
+ "runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
+ "rid": "win",
+ "assetType": "runtime",
+ "assemblyVersion": "5.0.0.0",
+ "fileVersion": "5.0.20.51904"
+ }
}
},
"System.Text.Encoding/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
+ "System.Text.Encoding.CodePages/4.5.1": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Runtime.CompilerServices.Unsafe": "4.5.2"
+ }
+ },
"System.Text.Encoding.Extensions/4.0.11": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0"
}
},
+ "System.Threading/4.3.0": {
+ "dependencies": {
+ "System.Runtime": "4.3.0",
+ "System.Threading.Tasks": "4.3.0"
+ }
+ },
+ "System.Threading.Overlapped/4.3.0": {
+ "dependencies": {
+ "Microsoft.NETCore.Platforms": "5.0.0",
+ "System.Resources.ResourceManager": "4.3.0",
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Handles": "4.3.0"
+ }
+ },
"System.Threading.Tasks/4.3.0": {
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0",
+ "Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
+ "System.Threading.Tasks.Extensions/4.5.4": {},
+ "System.Threading.Thread/4.3.0": {
+ "dependencies": {
+ "System.Runtime": "4.3.0"
+ }
+ },
+ "System.Threading.ThreadPool/4.3.0": {
+ "dependencies": {
+ "System.Runtime": "4.3.0",
+ "System.Runtime.Handles": "4.3.0"
+ }
+ },
+ "Unosquare.Raspberry.Abstractions/0.4.0": {
+ "runtime": {
+ "lib/netstandard2.0/Unosquare.Raspberry.Abstractions.dll": {
+ "assemblyVersion": "0.4.0.0",
+ "fileVersion": "0.4.0.0"
+ }
+ }
+ },
+ "Unosquare.Raspberry.IO/0.25.0": {
+ "dependencies": {
+ "Unosquare.Raspberry.Abstractions": "0.4.0",
+ "Unosquare.Swan": "2.0.1"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Unosquare.RaspberryIO.dll": {
+ "assemblyVersion": "0.25.0.0",
+ "fileVersion": "0.25.0.0"
+ }
+ }
+ },
+ "Unosquare.RaspberryIO.Peripherals/0.5.0": {
+ "dependencies": {
+ "Unosquare.Raspberry.IO": "0.25.0"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Unosquare.RaspberryIO.Peripherals.dll": {
+ "assemblyVersion": "0.5.0.0",
+ "fileVersion": "0.5.0.0"
+ }
+ }
+ },
+ "Unosquare.Swan/2.0.1": {
+ "dependencies": {
+ "System.Net.Http": "4.3.4",
+ "System.Net.NetworkInformation": "4.3.0",
+ "Unosquare.Swan.Lite": "2.0.0"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Swan.dll": {
+ "assemblyVersion": "2.0.1.0",
+ "fileVersion": "2.0.1.0"
+ }
+ }
+ },
+ "Unosquare.Swan.Lite/2.0.0": {
+ "dependencies": {
+ "System.Text.Encoding.CodePages": "4.5.1"
+ },
+ "runtime": {
+ "lib/netstandard2.0/Swan.Lite.dll": {
+ "assemblyVersion": "2.0.0.0",
+ "fileVersion": "2.0.0.0"
+ }
+ }
+ },
"DSLink/1.0.0.0": {
"runtime": {
"DSLink.dll": {
@@ -338,12 +843,12 @@
"path": "microsoft.csharp/4.7.0",
"hashPath": "microsoft.csharp.4.7.0.nupkg.sha512"
},
- "Microsoft.NETCore.Platforms/2.0.0": {
+ "Microsoft.NETCore.Platforms/5.0.0": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-VdLJOCXhZaEMY7Hm2GKiULmn7IEPFE4XC5LPSfBVCUIA8YLZVh846gtfBJalsPQF2PlzdD7ecX7DZEulJ402ZQ==",
- "path": "microsoft.netcore.platforms/2.0.0",
- "hashPath": "microsoft.netcore.platforms.2.0.0.nupkg.sha512"
+ "sha512": "sha512-VyPlqzH2wavqquTcYpkIIAQ6WdenuKoFN0BdYBbCWsclXacSOHNQn66Gt4z5NBqEYW0FAPm5rlvki9ZiCij5xQ==",
+ "path": "microsoft.netcore.platforms/5.0.0",
+ "hashPath": "microsoft.netcore.platforms.5.0.0.nupkg.sha512"
},
"Microsoft.NETCore.Targets/1.1.0": {
"type": "package",
@@ -352,6 +857,20 @@
"path": "microsoft.netcore.targets/1.1.0",
"hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
},
+ "Microsoft.Win32.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-9ZQKCWxH7Ijp9BfahvL2Zyf1cJIk8XYLF6Yjzr2yi0b2cOut/HQ31qf1ThHAgCc3WiZMdnWcfJCgN82/0UunxA==",
+ "path": "microsoft.win32.primitives/4.3.0",
+ "hashPath": "microsoft.win32.primitives.4.3.0.nupkg.sha512"
+ },
+ "Microsoft.Win32.Registry/5.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
+ "path": "microsoft.win32.registry/5.0.0",
+ "hashPath": "microsoft.win32.registry.5.0.0.nupkg.sha512"
+ },
"MsgPack.Cli/1.0.1": {
"type": "package",
"serviceable": true,
@@ -380,6 +899,111 @@
"path": "portable.bouncycastle/1.8.10",
"hashPath": "portable.bouncycastle.1.8.10.nupkg.sha512"
},
+ "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-7VSGO0URRKoMEAq0Sc9cRz8mb6zbyx/BZDEWhgPdzzpmFhkam3fJ1DAGWFXBI4nGlma+uPKpfuMQP5LXRnOH5g==",
+ "path": "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-0oAaTAm6e2oVH+/Zttt0cuhGaePQYKII1dY8iaqP7CvOpVKgLybKRFvQjXR2LtxXOXTVPNv14j0ot8uV+HrUmw==",
+ "path": "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-G24ibsCNi5Kbz0oXWynBoRgtGvsw5ZSVEWjv13/KiCAM8C6wz9zzcCniMeQFIkJ2tasjo2kXlvlBZhplL51kGg==",
+ "path": "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.native.System/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-c/qWt2LieNZIj1jGnVNsE2Kl23Ya2aSTBuXMD6V7k9KWr6l16Tqdwq+hJScEpWER9753NWC8h96PaVNY5Ld7Jw==",
+ "path": "runtime.native.system/4.3.0",
+ "hashPath": "runtime.native.system.4.3.0.nupkg.sha512"
+ },
+ "runtime.native.System.Net.Http/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ZVuZJqnnegJhd2k/PtAbbIcZ3aZeITq3sj06oKfMBSfphW3HDmk/t4ObvbOk/JA/swGR0LNqMksAh/f7gpTROg==",
+ "path": "runtime.native.system.net.http/4.3.0",
+ "hashPath": "runtime.native.system.net.http.4.3.0.nupkg.sha512"
+ },
+ "runtime.native.System.Security.Cryptography.Apple/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-DloMk88juo0OuOWr56QG7MNchmafTLYWvABy36izkrLI5VledI0rq28KGs1i9wbpeT9NPQrx/wTf8U2vazqQ3Q==",
+ "path": "runtime.native.system.security.cryptography.apple/4.3.0",
+ "hashPath": "runtime.native.system.security.cryptography.apple.4.3.0.nupkg.sha512"
+ },
+ "runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-QR1OwtwehHxSeQvZKXe+iSd+d3XZNkEcuWMFYa2i0aG1l+lR739HPicKMlTbJst3spmeekDVBUS7SeS26s4U/g==",
+ "path": "runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-I+GNKGg2xCHueRd1m9PzeEW7WLbNNLznmTuEi8/vZX71HudUbx1UTwlGkiwMri7JLl8hGaIAWnA/GONhu+LOyQ==",
+ "path": "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-1Z3TAq1ytS1IBRtPXJvEUZdVsfWfeNEhBkbiOCGEl9wwAfsjP2lz3ZFDx5tq8p60/EqbS0HItG5piHuB71RjoA==",
+ "path": "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kVXCuMTrTlxq4XOOMAysuNwsXWpYeboGddNGpIgNSZmv1b6r/s/DPk0fYMB7Q5Qo4bY68o48jt4T4y5BVecbCQ==",
+ "path": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple/4.3.0",
+ "hashPath": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.apple.4.3.0.nupkg.sha512"
+ },
+ "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-6mU/cVmmHtQiDXhnzUImxIcDL48GbTk+TsptXyJA+MIOG9LRjPoAQC/qBFB7X+UNyK86bmvGwC8t+M66wsYC8w==",
+ "path": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-vjwG0GGcTW/PPg6KVud8F9GLWYuAV1rrw1BKAqY0oh4jcUqg15oYF1+qkGR2x2ZHM4DQnWKQ7cJgYbfncz/lYg==",
+ "path": "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-7KMFpTkHC/zoExs+PwP8jDCWcrK9H6L7soowT80CUx3e+nxP/AFnq0AQAW5W76z2WYbLAYCRyPfwYFG6zkvQRw==",
+ "path": "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-xrlmRCnKZJLHxyyLIqkZjNXqgxnKdZxfItrPkjI+6pkRo5lHX8YvSZlWrSI5AVwLMi4HbNWP7064hcAWeZKp5w==",
+ "path": "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
+ "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl/4.3.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-leXiwfiIkW7Gmn7cgnNcdtNAU70SjmKW3jxGj1iKHOvdn0zRWsgv/l2OJUO5zdGdiv2VRFnAsxxhDgMzofPdWg==",
+ "path": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.2",
+ "hashPath": "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.2.nupkg.sha512"
+ },
"Serilog/2.10.0": {
"type": "package",
"serviceable": true,
@@ -429,6 +1053,48 @@
"path": "system.codedom/4.4.0",
"hashPath": "system.codedom.4.4.0.nupkg.sha512"
},
+ "System.Collections/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==",
+ "path": "system.collections/4.3.0",
+ "hashPath": "system.collections.4.3.0.nupkg.sha512"
+ },
+ "System.Collections.Concurrent/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ztl69Xp0Y/UXCL+3v3tEU+lIy+bvjKNUmopn1wep/a291pVPK7dxBd6T7WnlQqRog+d1a/hSsgRsmFnIBKTPLQ==",
+ "path": "system.collections.concurrent/4.3.0",
+ "hashPath": "system.collections.concurrent.4.3.0.nupkg.sha512"
+ },
+ "System.Device.Gpio/1.5.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-OOxVX5FBTSrV8SZguyAVV+zVx0cmhfPL+6bvgVsKJXky8rUhpQKQuP8+tpatcHuQT4fCqAE2/vdN9Hy3cC68vQ==",
+ "path": "system.device.gpio/1.5.0",
+ "hashPath": "system.device.gpio.1.5.0.nupkg.sha512"
+ },
+ "System.Diagnostics.Debug/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==",
+ "path": "system.diagnostics.debug/4.3.0",
+ "hashPath": "system.diagnostics.debug.4.3.0.nupkg.sha512"
+ },
+ "System.Diagnostics.DiagnosticSource/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-tD6kosZnTAGdrEa0tZSuFyunMbt/5KYDnHdndJYGqZoNy00XVXyACd5d6KnE1YgYv3ne2CjtAfNXo/fwEhnKUA==",
+ "path": "system.diagnostics.diagnosticsource/4.3.0",
+ "hashPath": "system.diagnostics.diagnosticsource.4.3.0.nupkg.sha512"
+ },
+ "System.Diagnostics.Tracing/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-rswfv0f/Cqkh78rA5S8eN8Neocz234+emGCtTF3lxPY96F+mmmUen6tbn0glN6PMvlKQb9bPAY5e9u7fgPTkKw==",
+ "path": "system.diagnostics.tracing/4.3.0",
+ "hashPath": "system.diagnostics.tracing.4.3.0.nupkg.sha512"
+ },
"System.Globalization/4.3.0": {
"type": "package",
"serviceable": true,
@@ -436,6 +1102,20 @@
"path": "system.globalization/4.3.0",
"hashPath": "system.globalization.4.3.0.nupkg.sha512"
},
+ "System.Globalization.Calendars/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-GUlBtdOWT4LTV3I+9/PJW+56AnnChTaOqqTLFtdmype/L500M2LIyXgmtd9X2P2VOkmJd5c67H5SaC2QcL1bFA==",
+ "path": "system.globalization.calendars/4.3.0",
+ "hashPath": "system.globalization.calendars.4.3.0.nupkg.sha512"
+ },
+ "System.Globalization.Extensions/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-FhKmdR6MPG+pxow6wGtNAWdZh7noIOpdD5TwQ3CprzgIE1bBBoim0vbR1+AWsWjQmU7zXHgQo4TWSP6lCeiWcQ==",
+ "path": "system.globalization.extensions/4.3.0",
+ "hashPath": "system.globalization.extensions.4.3.0.nupkg.sha512"
+ },
"System.IO/4.3.0": {
"type": "package",
"serviceable": true,
@@ -443,12 +1123,61 @@
"path": "system.io/4.3.0",
"hashPath": "system.io.4.3.0.nupkg.sha512"
},
- "System.IO.FileSystem.Primitives/4.0.1": {
+ "System.IO.FileSystem/4.3.0": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-kWkKD203JJKxJeE74p8aF8y4Qc9r9WQx4C0cHzHPrY3fv/L/IhWnyCHaFJ3H1QPOH6A93whlQ2vG5nHlBDvzWQ==",
- "path": "system.io.filesystem.primitives/4.0.1",
- "hashPath": "system.io.filesystem.primitives.4.0.1.nupkg.sha512"
+ "sha512": "sha512-3wEMARTnuio+ulnvi+hkRNROYwa1kylvYahhcLk4HSoVdl+xxTFVeVlYOfLwrDPImGls0mDqbMhrza8qnWPTdA==",
+ "path": "system.io.filesystem/4.3.0",
+ "hashPath": "system.io.filesystem.4.3.0.nupkg.sha512"
+ },
+ "System.IO.FileSystem.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-6QOb2XFLch7bEc4lIcJH49nJN2HV+OC3fHDgsLVsBVBk3Y4hFAnOBGzJ2lUu7CyDDFo9IBWkSsnbkT6IBwwiMw==",
+ "path": "system.io.filesystem.primitives/4.3.0",
+ "hashPath": "system.io.filesystem.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Linq/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==",
+ "path": "system.linq/4.3.0",
+ "hashPath": "system.linq.4.3.0.nupkg.sha512"
+ },
+ "System.Memory/4.5.4": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw==",
+ "path": "system.memory/4.5.4",
+ "hashPath": "system.memory.4.5.4.nupkg.sha512"
+ },
+ "System.Net.Http/4.3.4": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-aOa2d51SEbmM+H+Csw7yJOuNZoHkrP2XnAurye5HWYgGVVU54YZDvsLUYRv6h18X3sPnjNCANmN7ZhIPiqMcjA==",
+ "path": "system.net.http/4.3.4",
+ "hashPath": "system.net.http.4.3.4.nupkg.sha512"
+ },
+ "System.Net.NetworkInformation/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-zNVmWVry0pAu7lcrRBhwwU96WUdbsrGL3azyzsbXmVNptae1+Za+UgOe9Z6s8iaWhPn7/l4wQqhC56HZWq7tkg==",
+ "path": "system.net.networkinformation/4.3.0",
+ "hashPath": "system.net.networkinformation.4.3.0.nupkg.sha512"
+ },
+ "System.Net.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-qOu+hDwFwoZPbzPvwut2qATe3ygjeQBDQj91xlsaqGFQUI5i4ZnZb8yyQuLGpDGivEPIt8EJkd1BVzVoP31FXA==",
+ "path": "system.net.primitives/4.3.0",
+ "hashPath": "system.net.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Net.Sockets/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-m6icV6TqQOAdgt5N/9I5KNpjom/5NFtkmGseEH+AK/hny8XrytLH3+b5M8zL/Ycg3fhIocFpUMyl/wpFnVRvdw==",
+ "path": "system.net.sockets/4.3.0",
+ "hashPath": "system.net.sockets.4.3.0.nupkg.sha512"
},
"System.Numerics.Vectors/4.3.0": {
"type": "package",
@@ -506,6 +1235,13 @@
"path": "system.runtime/4.3.0",
"hashPath": "system.runtime.4.3.0.nupkg.sha512"
},
+ "System.Runtime.CompilerServices.Unsafe/4.5.2": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-wprSFgext8cwqymChhrBLu62LMg/1u92bU+VOwyfBimSPVFXtsNqEWC92Pf9ofzJFlk4IHmJA75EDJn1b2goAQ==",
+ "path": "system.runtime.compilerservices.unsafe/4.5.2",
+ "hashPath": "system.runtime.compilerservices.unsafe.4.5.2.nupkg.sha512"
+ },
"System.Runtime.Extensions/4.3.0": {
"type": "package",
"serviceable": true,
@@ -513,26 +1249,96 @@
"path": "system.runtime.extensions/4.3.0",
"hashPath": "system.runtime.extensions.4.3.0.nupkg.sha512"
},
- "System.Runtime.Handles/4.0.1": {
+ "System.Runtime.Handles/4.3.0": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-nCJvEKguXEvk2ymk1gqj625vVnlK3/xdGzx0vOKicQkoquaTBJTP13AIYkocSUwHCLNBwUbXTqTWGDxBTWpt7g==",
- "path": "system.runtime.handles/4.0.1",
- "hashPath": "system.runtime.handles.4.0.1.nupkg.sha512"
+ "sha512": "sha512-OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==",
+ "path": "system.runtime.handles/4.3.0",
+ "hashPath": "system.runtime.handles.4.3.0.nupkg.sha512"
},
- "System.Runtime.InteropServices/4.1.0": {
+ "System.Runtime.InteropServices/4.3.0": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-16eu3kjHS633yYdkjwShDHZLRNMKVi/s0bY8ODiqJ2RfMhDMAwxZaUaWVnZ2P71kr/or+X9o/xFWtNqz8ivieQ==",
- "path": "system.runtime.interopservices/4.1.0",
- "hashPath": "system.runtime.interopservices.4.1.0.nupkg.sha512"
+ "sha512": "sha512-uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==",
+ "path": "system.runtime.interopservices/4.3.0",
+ "hashPath": "system.runtime.interopservices.4.3.0.nupkg.sha512"
},
- "System.Security.AccessControl/4.4.0": {
+ "System.Runtime.InteropServices.WindowsRuntime/4.3.0": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-2NRFPX/V81ucKQmqNgGBZrKGH/5ejsvivSGMRum0SMgPnJxwhuNkzVS1+7gC3R2X0f57CtwrPrXPPSe6nOp82g==",
- "path": "system.security.accesscontrol/4.4.0",
- "hashPath": "system.security.accesscontrol.4.4.0.nupkg.sha512"
+ "sha512": "sha512-J4GUi3xZQLUBasNwZnjrffN8i5wpHrBtZoLG+OhRyGo/+YunMRWWtwoMDlUAIdmX0uRfpHIBDSV6zyr3yf00TA==",
+ "path": "system.runtime.interopservices.windowsruntime/4.3.0",
+ "hashPath": "system.runtime.interopservices.windowsruntime.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime.Numerics/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-yMH+MfdzHjy17l2KESnPiF2dwq7T+xLnSJar7slyimAkUh/gTrS9/UQOtv7xarskJ2/XDSNvfLGOBQPjL7PaHQ==",
+ "path": "system.runtime.numerics/4.3.0",
+ "hashPath": "system.runtime.numerics.4.3.0.nupkg.sha512"
+ },
+ "System.Runtime.WindowsRuntime/4.6.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-IWrs1TmbxP65ZZjIglNyvDkFNoV5q2Pofg5WO7I8RKQOpLdFprQSh3xesOoClBqR4JHr4nEB1Xk1MqLPW1jPuQ==",
+ "path": "system.runtime.windowsruntime/4.6.0",
+ "hashPath": "system.runtime.windowsruntime.4.6.0.nupkg.sha512"
+ },
+ "System.Security.AccessControl/5.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
+ "path": "system.security.accesscontrol/5.0.0",
+ "hashPath": "system.security.accesscontrol.5.0.0.nupkg.sha512"
+ },
+ "System.Security.Cryptography.Algorithms/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-W1kd2Y8mYSCgc3ULTAZ0hOP2dSdG5YauTb1089T0/kRcN2MpSAW1izOFROrJgxSlMn3ArsgHXagigyi+ibhevg==",
+ "path": "system.security.cryptography.algorithms/4.3.0",
+ "hashPath": "system.security.cryptography.algorithms.4.3.0.nupkg.sha512"
+ },
+ "System.Security.Cryptography.Cng/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-03idZOqFlsKRL4W+LuCpJ6dBYDUWReug6lZjBa3uJWnk5sPCUXckocevTaUA8iT/MFSrY/2HXkOt753xQ/cf8g==",
+ "path": "system.security.cryptography.cng/4.3.0",
+ "hashPath": "system.security.cryptography.cng.4.3.0.nupkg.sha512"
+ },
+ "System.Security.Cryptography.Csp/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-X4s/FCkEUnRGnwR3aSfVIkldBmtURMhmexALNTwpjklzxWU7yjMk7GHLKOZTNkgnWnE0q7+BCf9N2LVRWxewaA==",
+ "path": "system.security.cryptography.csp/4.3.0",
+ "hashPath": "system.security.cryptography.csp.4.3.0.nupkg.sha512"
+ },
+ "System.Security.Cryptography.Encoding/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-1DEWjZZly9ae9C79vFwqaO5kaOlI5q+3/55ohmq/7dpDyDfc8lYe7YVxJUZ5MF/NtbkRjwFRo14yM4OEo9EmDw==",
+ "path": "system.security.cryptography.encoding/4.3.0",
+ "hashPath": "system.security.cryptography.encoding.4.3.0.nupkg.sha512"
+ },
+ "System.Security.Cryptography.OpenSsl/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-h4CEgOgv5PKVF/HwaHzJRiVboL2THYCou97zpmhjghx5frc7fIvlkY1jL+lnIQyChrJDMNEXS6r7byGif8Cy4w==",
+ "path": "system.security.cryptography.openssl/4.3.0",
+ "hashPath": "system.security.cryptography.openssl.4.3.0.nupkg.sha512"
+ },
+ "System.Security.Cryptography.Primitives/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-7bDIyVFNL/xKeFHjhobUAQqSpJq9YTOpbEs6mR233Et01STBMXNAc/V+BM6dwYGc95gVh/Zf+iVXWzj3mE8DWg==",
+ "path": "system.security.cryptography.primitives/4.3.0",
+ "hashPath": "system.security.cryptography.primitives.4.3.0.nupkg.sha512"
+ },
+ "System.Security.Cryptography.X509Certificates/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-t2Tmu6Y2NtJ2um0RtcuhP7ZdNNxXEgUm2JeoA/0NvlMjAhKCnM1NX07TDl3244mVp3QU6LPEhT3HTtH1uF7IYw==",
+ "path": "system.security.cryptography.x509certificates/4.3.0",
+ "hashPath": "system.security.cryptography.x509certificates.4.3.0.nupkg.sha512"
},
"System.Security.Permissions/4.4.1": {
"type": "package",
@@ -541,12 +1347,12 @@
"path": "system.security.permissions/4.4.1",
"hashPath": "system.security.permissions.4.4.1.nupkg.sha512"
},
- "System.Security.Principal.Windows/4.4.0": {
+ "System.Security.Principal.Windows/5.0.0": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-pP+AOzt1o3jESOuLmf52YQTF7H3Ng9hTnrOESQiqsnl2IbBh1HInsAMHYtoh75iUYV0OIkHmjvveraYB6zM97w==",
- "path": "system.security.principal.windows/4.4.0",
- "hashPath": "system.security.principal.windows.4.4.0.nupkg.sha512"
+ "sha512": "sha512-t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA==",
+ "path": "system.security.principal.windows/5.0.0",
+ "hashPath": "system.security.principal.windows.5.0.0.nupkg.sha512"
},
"System.Text.Encoding/4.3.0": {
"type": "package",
@@ -555,6 +1361,13 @@
"path": "system.text.encoding/4.3.0",
"hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
},
+ "System.Text.Encoding.CodePages/4.5.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==",
+ "path": "system.text.encoding.codepages/4.5.1",
+ "hashPath": "system.text.encoding.codepages.4.5.1.nupkg.sha512"
+ },
"System.Text.Encoding.Extensions/4.0.11": {
"type": "package",
"serviceable": true,
@@ -562,6 +1375,20 @@
"path": "system.text.encoding.extensions/4.0.11",
"hashPath": "system.text.encoding.extensions.4.0.11.nupkg.sha512"
},
+ "System.Threading/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==",
+ "path": "system.threading/4.3.0",
+ "hashPath": "system.threading.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.Overlapped/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-m3HQ2dPiX/DSTpf+yJt8B0c+SRvzfqAJKx+QDWi+VLhz8svLT23MVjEOHPF/KiSLeArKU/iHescrbLd3yVgyNg==",
+ "path": "system.threading.overlapped/4.3.0",
+ "hashPath": "system.threading.overlapped.4.3.0.nupkg.sha512"
+ },
"System.Threading.Tasks/4.3.0": {
"type": "package",
"serviceable": true,
@@ -569,6 +1396,62 @@
"path": "system.threading.tasks/4.3.0",
"hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
},
+ "System.Threading.Tasks.Extensions/4.5.4": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
+ "path": "system.threading.tasks.extensions/4.5.4",
+ "hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
+ },
+ "System.Threading.Thread/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-OHmbT+Zz065NKII/ZHcH9XO1dEuLGI1L2k7uYss+9C1jLxTC9kTZZuzUOyXHayRk+dft9CiDf3I/QZ0t8JKyBQ==",
+ "path": "system.threading.thread/4.3.0",
+ "hashPath": "system.threading.thread.4.3.0.nupkg.sha512"
+ },
+ "System.Threading.ThreadPool/4.3.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-k/+g4b7vjdd4aix83sTgC9VG6oXYKAktSfNIJUNGxPEj7ryEOfzHHhfnmsZvjxawwcD9HyWXKCXmPjX8U4zeSw==",
+ "path": "system.threading.threadpool/4.3.0",
+ "hashPath": "system.threading.threadpool.4.3.0.nupkg.sha512"
+ },
+ "Unosquare.Raspberry.Abstractions/0.4.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-8d3d8uMSTLMHpacgznS7G549TixwXUITw761ZlEYJz8uv1IaZjmFYvZXqWjLoiELNL8bZg+P1AodG9OkfI0Teg==",
+ "path": "unosquare.raspberry.abstractions/0.4.0",
+ "hashPath": "unosquare.raspberry.abstractions.0.4.0.nupkg.sha512"
+ },
+ "Unosquare.Raspberry.IO/0.25.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-31wqeOzURZhnJIwrC0A8UNu68nAk3tDLSTgOIXLBnfu7eiTfObJ7430M5nnaNdE5m/MdT6JNHaseHhjY1lwI6w==",
+ "path": "unosquare.raspberry.io/0.25.0",
+ "hashPath": "unosquare.raspberry.io.0.25.0.nupkg.sha512"
+ },
+ "Unosquare.RaspberryIO.Peripherals/0.5.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-kojfP/uO8M9UBDvZIbAgLKIRR83sjRh6XPsynNh+HmrqnAFRNEKGVu/9YyUFWwm8jYde7yORiXVKwXoILoybGg==",
+ "path": "unosquare.raspberryio.peripherals/0.5.0",
+ "hashPath": "unosquare.raspberryio.peripherals.0.5.0.nupkg.sha512"
+ },
+ "Unosquare.Swan/2.0.1": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-NIdyzXizpXES6u6KZmUzvg6KkN3JXQHlXAcOBZsZJBiHNNLybqF1SlONihlgCJALq6RrUsC3J5IRrdGUsv3U9g==",
+ "path": "unosquare.swan/2.0.1",
+ "hashPath": "unosquare.swan.2.0.1.nupkg.sha512"
+ },
+ "Unosquare.Swan.Lite/2.0.0": {
+ "type": "package",
+ "serviceable": true,
+ "sha512": "sha512-mp46juLhXcJQqBIpqW/QwXv8dwsB+zgZK6Ro18QSvn5NCXiBc1WW5PDf4U8a+3u96CvAat5dSln3fy7LXyPjsw==",
+ "path": "unosquare.swan.lite/2.0.0",
+ "hashPath": "unosquare.swan.lite.2.0.0.nupkg.sha512"
+ },
"DSLink/1.0.0.0": {
"type": "reference",
"serviceable": false,
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.dll
index 1209927..5279db6 100644
Binary files a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.dll and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.pdb b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.pdb
index 4881e51..b683dca 100644
Binary files a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.pdb and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/RSTP_DSLink.pdb differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Swan.Lite.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Swan.Lite.dll
new file mode 100644
index 0000000..b9fa0de
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Swan.Lite.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Swan.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Swan.dll
new file mode 100644
index 0000000..b9afd2b
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Swan.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Device.Gpio.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Device.Gpio.dll
new file mode 100644
index 0000000..dc2ae4a
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Device.Gpio.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.AccessControl.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.AccessControl.dll
new file mode 100644
index 0000000..7a83655
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.AccessControl.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.Principal.Windows.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.Principal.Windows.dll
new file mode 100644
index 0000000..0c7819b
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/System.Security.Principal.Windows.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.Raspberry.Abstractions.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.Raspberry.Abstractions.dll
new file mode 100644
index 0000000..e62e58d
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.Raspberry.Abstractions.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.RaspberryIO.Peripherals.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.RaspberryIO.Peripherals.dll
new file mode 100644
index 0000000..82f1793
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.RaspberryIO.Peripherals.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.RaspberryIO.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.RaspberryIO.dll
new file mode 100644
index 0000000..ee8b74b
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/Unosquare.RaspberryIO.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210730.txt b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210730.txt
new file mode 100644
index 0000000..d56187a
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210730.txt
@@ -0,0 +1,5 @@
+2021-07-30 09:43:15.793 +02:00 [Information] Handshaking with http://localhost:8080/conn?dsId=RSTP_Test3-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-07-30 09:43:18.537 +02:00 [Information] Handshake successful
+2021-07-30 09:43:19.001 +02:00 [Information] Connecting
+2021-07-30 09:43:19.031 +02:00 [Information] WebSocket connecting to ws://localhost:8080/ws?dsId=RSTP_Test3-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ZI0S3FYjOpJ6RFGUB0AJdQz1L66DY40JexmnWbFRdW0&format=msgpack
+2021-07-30 09:43:21.172 +02:00 [Information] Connected to ws://localhost:8080/ws?dsId=RSTP_Test3-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ZI0S3FYjOpJ6RFGUB0AJdQz1L66DY40JexmnWbFRdW0&format=msgpack
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210802.txt b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210802.txt
new file mode 100644
index 0000000..4f696b4
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210802.txt
@@ -0,0 +1,137 @@
+2021-08-02 13:50:42.944 +02:00 [Information] Handshaking with http://localhost:8080/conn?dsId=RSTP_Test3-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 13:51:41.611 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 13:51:42.663 +02:00 [Information] Handshake successful
+2021-08-02 13:51:43.442 +02:00 [Information] Connecting
+2021-08-02 13:51:43.489 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=uhl97qol-LJctTsc1JFBBvNw_sEimFGBhB3faZZJtnU&format=msgpack
+2021-08-02 13:51:43.635 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=uhl97qol-LJctTsc1JFBBvNw_sEimFGBhB3faZZJtnU&format=msgpack
+2021-08-02 14:34:19.228 +02:00 [Warning] Failed to load nodes.json
+2021-08-02 14:34:19.348 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-02 14:34:19.565 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-02 14:34:19.708 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 14:34:20.422 +02:00 [Information] Handshake successful
+2021-08-02 14:34:21.158 +02:00 [Information] Connecting
+2021-08-02 14:34:21.216 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ODxOscstQta0tvbEL7qP9asNm-ruY0cO5FS59ic3iLg&format=msgpack
+2021-08-02 14:34:21.361 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ODxOscstQta0tvbEL7qP9asNm-ruY0cO5FS59ic3iLg&format=msgpack
+2021-08-02 14:35:38.680 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 14:35:39.471 +02:00 [Information] Handshake successful
+2021-08-02 14:35:39.956 +02:00 [Information] Connecting
+2021-08-02 14:35:40.030 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=imEeLF8hF0q7ChooQmo5CsGjIf25PFZcRNR1EozTcog&format=msgpack
+2021-08-02 14:35:40.142 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=imEeLF8hF0q7ChooQmo5CsGjIf25PFZcRNR1EozTcog&format=msgpack
+2021-08-02 14:36:55.341 +02:00 [Warning] Failed to load nodes.json
+2021-08-02 14:36:55.501 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-02 14:36:55.670 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-02 14:36:55.743 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 14:36:56.450 +02:00 [Information] Handshake successful
+2021-08-02 14:36:56.788 +02:00 [Information] Connecting
+2021-08-02 14:36:56.867 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=PQrt57OWxkEJODmDyqmYIGr81Cd6LkMSxeMd9IDGNTk&format=msgpack
+2021-08-02 14:36:57.006 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=PQrt57OWxkEJODmDyqmYIGr81Cd6LkMSxeMd9IDGNTk&format=msgpack
+2021-08-02 14:45:15.520 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 14:45:16.224 +02:00 [Information] Handshake successful
+2021-08-02 14:45:16.858 +02:00 [Information] Connecting
+2021-08-02 14:45:16.953 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=LliHPiJv3YLrT1AwlAPUj3s52vEcvswjBMhX3n9hsIQ&format=msgpack
+2021-08-02 14:45:17.043 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=LliHPiJv3YLrT1AwlAPUj3s52vEcvswjBMhX3n9hsIQ&format=msgpack
+2021-08-02 15:05:11.773 +02:00 [Warning] Failed to load nodes.json
+2021-08-02 15:05:11.895 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-02 15:05:12.135 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-02 15:05:12.216 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:05:12.775 +02:00 [Information] Handshake successful
+2021-08-02 15:05:13.146 +02:00 [Information] Connecting
+2021-08-02 15:05:13.200 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=8_IBgIIzs9F0GftK--bSy47OJ47V8iQZQbu5Zn_HdC0&format=msgpack
+2021-08-02 15:05:13.301 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=8_IBgIIzs9F0GftK--bSy47OJ47V8iQZQbu5Zn_HdC0&format=msgpack
+2021-08-02 15:23:30.345 +02:00 [Warning] Failed to load nodes.json
+2021-08-02 15:23:30.945 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-02 15:23:31.041 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-02 15:23:31.147 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:23:32.012 +02:00 [Information] Handshake successful
+2021-08-02 15:23:32.694 +02:00 [Information] Connecting
+2021-08-02 15:23:32.783 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=MqtkDt1G1TO0CnxkbQrTNvU3LGNOeqsBHeI_XL_M6Q4&format=msgpack
+2021-08-02 15:23:33.134 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=MqtkDt1G1TO0CnxkbQrTNvU3LGNOeqsBHeI_XL_M6Q4&format=msgpack
+2021-08-02 15:24:27.414 +02:00 [Warning] Failed to load nodes.json
+2021-08-02 15:24:27.517 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-02 15:24:27.624 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-02 15:24:27.720 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:24:28.544 +02:00 [Information] Handshake successful
+2021-08-02 15:24:28.956 +02:00 [Information] Connecting
+2021-08-02 15:24:29.016 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=91NDc7aEGIm0ZaI1idI5PZcvlzF2NJlKp0vqN5zGk_A&format=msgpack
+2021-08-02 15:24:29.156 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=91NDc7aEGIm0ZaI1idI5PZcvlzF2NJlKp0vqN5zGk_A&format=msgpack
+2021-08-02 15:36:07.616 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:36:08.470 +02:00 [Information] Handshake successful
+2021-08-02 15:36:08.910 +02:00 [Information] Connecting
+2021-08-02 15:36:08.971 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=kNXRX8md71HUGQYqMdfmhFkEiC7SsQeVn87VyuxajK8&format=msgpack
+2021-08-02 15:36:09.047 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=kNXRX8md71HUGQYqMdfmhFkEiC7SsQeVn87VyuxajK8&format=msgpack
+2021-08-02 15:37:13.892 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:37:14.418 +02:00 [Information] Handshake successful
+2021-08-02 15:37:14.765 +02:00 [Information] Connecting
+2021-08-02 15:37:14.819 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=8zvw8rDqIFXrIKvqE1ftulG7BM_rLNb7bb-AdHK37ks&format=msgpack
+2021-08-02 15:37:14.947 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=8zvw8rDqIFXrIKvqE1ftulG7BM_rLNb7bb-AdHK37ks&format=msgpack
+2021-08-02 15:37:59.300 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:37:59.804 +02:00 [Information] Handshake successful
+2021-08-02 15:38:00.225 +02:00 [Information] Connecting
+2021-08-02 15:38:00.299 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=p1_Cwft2j9YTdcwyz2KcIDSZXii5JQUNSUkT4FQwUUA&format=msgpack
+2021-08-02 15:38:00.365 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=p1_Cwft2j9YTdcwyz2KcIDSZXii5JQUNSUkT4FQwUUA&format=msgpack
+2021-08-02 15:40:46.878 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:40:47.752 +02:00 [Information] Handshake successful
+2021-08-02 15:40:48.027 +02:00 [Information] Connecting
+2021-08-02 15:40:48.090 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=hmcLWMoqCo7LV889eG8XN-epvd8iyxXAwUPgIE49bk0&format=msgpack
+2021-08-02 15:40:48.145 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=hmcLWMoqCo7LV889eG8XN-epvd8iyxXAwUPgIE49bk0&format=msgpack
+2021-08-02 15:42:44.204 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:42:44.899 +02:00 [Information] Handshake successful
+2021-08-02 15:42:45.251 +02:00 [Information] Connecting
+2021-08-02 15:42:45.317 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=BBaRuoEhEOnDNHdd225-F9s2w_BWRaiFU7RvoHNye70&format=msgpack
+2021-08-02 15:42:45.419 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=BBaRuoEhEOnDNHdd225-F9s2w_BWRaiFU7RvoHNye70&format=msgpack
+2021-08-02 15:44:48.828 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 15:44:49.600 +02:00 [Information] Handshake successful
+2021-08-02 15:44:49.997 +02:00 [Information] Connecting
+2021-08-02 15:44:50.084 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=-w52j8pLBXA9LKUVoeIMzIjQLBLC3cfaU4UcBsscqAI&format=msgpack
+2021-08-02 15:44:50.248 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=-w52j8pLBXA9LKUVoeIMzIjQLBLC3cfaU4UcBsscqAI&format=msgpack
+2021-08-02 16:04:38.986 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 16:04:39.683 +02:00 [Information] Handshake successful
+2021-08-02 16:04:39.993 +02:00 [Information] Connecting
+2021-08-02 16:04:40.036 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=MKQAEE5Jis75YBh0JZDlzVoj6ug03k22oVjNtKWXlRc&format=msgpack
+2021-08-02 16:04:40.124 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=MKQAEE5Jis75YBh0JZDlzVoj6ug03k22oVjNtKWXlRc&format=msgpack
+2021-08-02 16:07:26.733 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 16:07:27.487 +02:00 [Information] Handshake successful
+2021-08-02 16:07:28.240 +02:00 [Information] Connecting
+2021-08-02 16:07:28.320 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=xU27aIt1tzrE-2jGTf3f10AGbRHl4Kpiormd5gRmDhU&format=msgpack
+2021-08-02 16:07:28.421 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=xU27aIt1tzrE-2jGTf3f10AGbRHl4Kpiormd5gRmDhU&format=msgpack
+2021-08-02 16:10:00.222 +02:00 [Warning] Failed to load nodes.json
+2021-08-02 16:10:00.334 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-02 16:10:00.499 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-02 16:10:00.566 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 16:10:01.090 +02:00 [Information] Handshake successful
+2021-08-02 16:10:01.437 +02:00 [Information] Connecting
+2021-08-02 16:10:01.466 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=t09OJX_lXJF71GtOiQjXu-V6kEfCxohRpXqGKTRfOsA&format=msgpack
+2021-08-02 16:10:01.525 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=t09OJX_lXJF71GtOiQjXu-V6kEfCxohRpXqGKTRfOsA&format=msgpack
+2021-08-02 16:12:57.439 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 16:12:58.046 +02:00 [Information] Handshake successful
+2021-08-02 16:12:58.325 +02:00 [Information] Connecting
+2021-08-02 16:12:58.438 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=JQUHQceTDOsUz3-5IWBWgSVznZ8o_bpsBxRFR2WGSNY&format=msgpack
+2021-08-02 16:12:58.580 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=JQUHQceTDOsUz3-5IWBWgSVznZ8o_bpsBxRFR2WGSNY&format=msgpack
+2021-08-02 16:13:57.017 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 16:13:57.507 +02:00 [Information] Handshake successful
+2021-08-02 16:13:57.873 +02:00 [Information] Connecting
+2021-08-02 16:13:58.022 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=KEgjreMZ8LATOlDfPf1a0v2s0XPAx6wBhQKJpXTMuYg&format=msgpack
+2021-08-02 16:13:58.174 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=KEgjreMZ8LATOlDfPf1a0v2s0XPAx6wBhQKJpXTMuYg&format=msgpack
+2021-08-02 16:15:10.931 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-02 16:15:11.735 +02:00 [Information] Handshake successful
+2021-08-02 16:15:11.937 +02:00 [Information] Connecting
+2021-08-02 16:15:11.984 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=8BcKgvQO1DR6vVdJO0GeIuubq7_80xDV-zpxb6ZVhXI&format=msgpack
+2021-08-02 16:15:12.087 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=8BcKgvQO1DR6vVdJO0GeIuubq7_80xDV-zpxb6ZVhXI&format=msgpack
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210803.txt b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210803.txt
new file mode 100644
index 0000000..4939f1c
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/log-20210803.txt
@@ -0,0 +1,129 @@
+2021-08-03 11:03:44.122 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:03:45.752 +02:00 [Information] Handshake successful
+2021-08-03 11:03:46.945 +02:00 [Information] Connecting
+2021-08-03 11:03:47.010 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=B0sKiYxR4Q-MphyQBZJEF9-5YYiOtHyJGAAXimqympI&format=msgpack
+2021-08-03 11:03:47.254 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=B0sKiYxR4Q-MphyQBZJEF9-5YYiOtHyJGAAXimqympI&format=msgpack
+2021-08-03 11:30:52.942 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:30:53.558 +02:00 [Information] Handshake successful
+2021-08-03 11:30:53.749 +02:00 [Information] Connecting
+2021-08-03 11:30:53.791 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=VhcS9rCG3lgMQWshLxv2rHK0XRwZTgl3WuHzfxqncSQ&format=msgpack
+2021-08-03 11:30:53.856 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=VhcS9rCG3lgMQWshLxv2rHK0XRwZTgl3WuHzfxqncSQ&format=msgpack
+2021-08-03 11:31:27.638 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:31:27.724 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:31:28.350 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:31:28.416 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:31:29.164 +02:00 [Information] Handshake successful
+2021-08-03 11:31:29.535 +02:00 [Information] Connecting
+2021-08-03 11:31:29.647 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=gpv5jA0dwOIVN0zc439RLXHK0GXBSxInZeKmYucTRUU&format=msgpack
+2021-08-03 11:31:29.867 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=gpv5jA0dwOIVN0zc439RLXHK0GXBSxInZeKmYucTRUU&format=msgpack
+2021-08-03 11:33:10.676 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:33:10.790 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:33:10.939 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:33:11.166 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:33:12.404 +02:00 [Information] Handshake successful
+2021-08-03 11:33:12.778 +02:00 [Information] Connecting
+2021-08-03 11:33:12.812 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=Bli_OxHVHntLF9zADsjwqEbn8EhWQ-CGJmK9WIDLf10&format=msgpack
+2021-08-03 11:33:12.930 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=Bli_OxHVHntLF9zADsjwqEbn8EhWQ-CGJmK9WIDLf10&format=msgpack
+2021-08-03 11:35:36.583 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:35:36.671 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:35:36.770 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:35:36.833 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:35:37.483 +02:00 [Information] Handshake successful
+2021-08-03 11:35:37.965 +02:00 [Information] Connecting
+2021-08-03 11:35:38.069 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=N3aAK1S7jWsz6Xeixb3agtCf8MXr0x-e7HATwPWPX1o&format=msgpack
+2021-08-03 11:35:38.136 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=N3aAK1S7jWsz6Xeixb3agtCf8MXr0x-e7HATwPWPX1o&format=msgpack
+2021-08-03 11:37:18.243 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:37:18.376 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:37:18.465 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:37:18.539 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:37:19.334 +02:00 [Information] Handshake successful
+2021-08-03 11:37:19.657 +02:00 [Information] Connecting
+2021-08-03 11:37:19.696 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=betMIA8Xy-p4Z0R9lN1fKBUZJNled2t8JabU8eH2GAk&format=msgpack
+2021-08-03 11:37:19.827 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=betMIA8Xy-p4Z0R9lN1fKBUZJNled2t8JabU8eH2GAk&format=msgpack
+2021-08-03 11:40:24.309 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:40:24.489 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:40:24.607 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:40:25.009 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:40:25.869 +02:00 [Information] Handshake successful
+2021-08-03 11:40:26.442 +02:00 [Information] Connecting
+2021-08-03 11:40:26.566 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=fdos6OENq6v54imFbTDefeYyc3_m5841nu8NI-hcF58&format=msgpack
+2021-08-03 11:40:26.656 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=fdos6OENq6v54imFbTDefeYyc3_m5841nu8NI-hcF58&format=msgpack
+2021-08-03 11:41:08.851 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:41:09.031 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:41:09.144 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:41:09.385 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:41:10.111 +02:00 [Information] Handshake successful
+2021-08-03 11:41:10.598 +02:00 [Information] Connecting
+2021-08-03 11:41:10.692 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=vr8C6A6On9Xh-q70n8L-RfXcmOBdfraXoOykU3cwUQA&format=msgpack
+2021-08-03 11:41:10.825 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=vr8C6A6On9Xh-q70n8L-RfXcmOBdfraXoOykU3cwUQA&format=msgpack
+2021-08-03 11:42:10.520 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:42:10.898 +02:00 [Information] Handshake successful
+2021-08-03 11:42:11.108 +02:00 [Information] Connecting
+2021-08-03 11:42:11.177 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ojurIILA78q0aJt4grkJzFbgw3DwfS2r_WC5R8pwpSo&format=msgpack
+2021-08-03 11:42:11.297 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ojurIILA78q0aJt4grkJzFbgw3DwfS2r_WC5R8pwpSo&format=msgpack
+2021-08-03 11:42:29.808 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:42:29.898 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:42:29.967 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:42:30.137 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:42:30.532 +02:00 [Information] Handshake successful
+2021-08-03 11:42:30.906 +02:00 [Information] Connecting
+2021-08-03 11:42:30.985 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=tKi9TXyt1wXcsIjPytryaX6sHgpTDBzJElA1hEl2zu8&format=msgpack
+2021-08-03 11:42:31.134 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=tKi9TXyt1wXcsIjPytryaX6sHgpTDBzJElA1hEl2zu8&format=msgpack
+2021-08-03 11:43:35.267 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:43:35.366 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:43:35.434 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:43:35.867 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:43:36.274 +02:00 [Information] Handshake successful
+2021-08-03 11:43:36.493 +02:00 [Information] Connecting
+2021-08-03 11:43:36.530 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=bubQ2UGVXRlMIbYSrt2gA4KZAuS0kKos4x5vjlx__Rc&format=msgpack
+2021-08-03 11:43:36.663 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=bubQ2UGVXRlMIbYSrt2gA4KZAuS0kKos4x5vjlx__Rc&format=msgpack
+2021-08-03 11:46:24.951 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:46:25.564 +02:00 [Information] Handshake successful
+2021-08-03 11:46:25.871 +02:00 [Information] Connecting
+2021-08-03 11:46:25.945 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=bpl3In8B0JhkN53rTf4afrZMF0tA-NEHz3pfcSpwkB8&format=msgpack
+2021-08-03 11:46:26.102 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=bpl3In8B0JhkN53rTf4afrZMF0tA-NEHz3pfcSpwkB8&format=msgpack
+2021-08-03 11:56:02.197 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:56:02.727 +02:00 [Information] Handshake successful
+2021-08-03 11:56:03.109 +02:00 [Information] Connecting
+2021-08-03 11:56:03.172 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=4IsqPIISg-NycVkNpVfgaULTURZ6Sdi-Zh3B5X9pmwM&format=msgpack
+2021-08-03 11:56:03.418 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=4IsqPIISg-NycVkNpVfgaULTURZ6Sdi-Zh3B5X9pmwM&format=msgpack
+2021-08-03 11:56:48.024 +02:00 [Warning] Failed to load nodes.json
+2021-08-03 11:56:48.146 +02:00 [Warning] File does not exist: C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\nodes.json
+2021-08-03 11:56:48.307 +02:00 [Warning] at StandardStorage.Folder.GetFileAsync(String name, CancellationToken cancellationToken)
+ at DSLink.VFS.SystemVFS._getFile(String fileName)
+ at DSLink.VFS.SystemVFS.ReadAsync(String fileName)
+ at DSLink.Respond.DiskSerializer.DeserializeFromDisk()
+2021-08-03 11:56:48.628 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 11:56:49.971 +02:00 [Information] Handshake successful
+2021-08-03 11:56:50.534 +02:00 [Information] Connecting
+2021-08-03 11:56:50.874 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ypWQIh8FPOQNhPAXbRN1meG0gWc_sw2va2g3Cg0nMd4&format=msgpack
+2021-08-03 11:56:51.227 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=ypWQIh8FPOQNhPAXbRN1meG0gWc_sw2va2g3Cg0nMd4&format=msgpack
+2021-08-03 12:02:42.774 +02:00 [Information] Handshaking with http://192.168.1.54:8080/conn?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs
+2021-08-03 12:02:43.276 +02:00 [Information] Handshake successful
+2021-08-03 12:02:43.454 +02:00 [Information] Connecting
+2021-08-03 12:02:43.489 +02:00 [Information] WebSocket connecting to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=Fz0kksH0XedbyZ5rz1bOhD5ET8QuDRpvOK88ot6khuA&format=msgpack
+2021-08-03 12:02:43.562 +02:00 [Information] Connected to ws://192.168.1.54:8080/ws?dsId=RTSP-OMdrHg0avIBTMlApcGJyO6F7_WThL5P0aIxLoTJwYrs&auth=Fz0kksH0XedbyZ5rz1bOhD5ET8QuDRpvOK88ot6khuA&format=msgpack
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/nodes.json b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/nodes.json
new file mode 100644
index 0000000..c445e8d
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/nodes.json
@@ -0,0 +1,46 @@
+{
+ "$is": "node",
+ "privateConfigs": {},
+ "createStream": {
+ "$is": "streamAdd",
+ "$name": "Add Stream",
+ "$params": [
+ {
+ "name": "RSTP URL",
+ "type": "string"
+ },
+ {
+ "name": "Stream name",
+ "type": "string"
+ }
+ ],
+ "$invokable": "config",
+ "privateConfigs": {},
+ "?class": "streamAdd"
+ },
+ "createAlarm": {
+ "$is": "alarmAdd",
+ "$name": "Add Alarm",
+ "$params": [
+ {
+ "name": "Alarm name",
+ "type": "string"
+ },
+ {
+ "name": "Raspberry Pi IP Address",
+ "type": "string"
+ },
+ {
+ "name": "Port Number",
+ "type": "number"
+ },
+ {
+ "name": "GPIO Pin",
+ "type": "number"
+ }
+ ],
+ "$invokable": "config",
+ "privateConfigs": {},
+ "?class": "alarmAdd"
+ }
+}
\ No newline at end of file
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll
new file mode 100644
index 0000000..59bf0e3
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll
new file mode 100644
index 0000000..72fd7e7
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll
new file mode 100644
index 0000000..0f6dabc
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll
new file mode 100644
index 0000000..a7520fe
Binary files /dev/null and b/RSTP_DSLink/RSTP_DSLink/bin/Debug/netcoreapp3.1/runtimes/win/lib/netstandard2.0/Microsoft.Win32.Registry.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.assets.cache b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.assets.cache
index 04bb2b9..f12715a 100644
Binary files a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.assets.cache and b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.assets.cache differ
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.CoreCompileInputs.cache b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.CoreCompileInputs.cache
index a2a21a2..39af9f5 100644
--- a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.CoreCompileInputs.cache
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.CoreCompileInputs.cache
@@ -1 +1 @@
-28da4aa5ebde6007021646d01b238b1b362bbd7c
+38f2e3c6f718af46c0bc45eb96010e1b0699066e
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.FileListAbsolute.txt b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.FileListAbsolute.txt
index 3e66777..b3fa4b0 100644
--- a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.FileListAbsolute.txt
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.csproj.FileListAbsolute.txt
@@ -1,7 +1,3 @@
-C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.csproj.AssemblyReference.cache
-C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.AssemblyInfoInputs.cache
-C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.AssemblyInfo.cs
-C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.csproj.CoreCompileInputs.cache
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\RSTP_DSLink.exe
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\RSTP_DSLink.deps.json
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\RSTP_DSLink.runtimeconfig.json
@@ -21,7 +17,23 @@ C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreap
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\System.CodeDom.dll
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\System.Security.Permissions.dll
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\DSLink.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.AssemblyInfoInputs.cache
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.AssemblyInfo.cs
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.csproj.CoreCompileInputs.cache
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.csproj.CopyComplete
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.dll
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.pdb
C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\obj\Debug\netcoreapp3.1\RSTP_DSLink.genruntimeconfig.cache
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\Unosquare.Raspberry.Abstractions.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\Unosquare.RaspberryIO.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\Unosquare.RaspberryIO.Peripherals.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\Swan.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\Swan.Lite.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\Microsoft.Win32.Registry.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\System.Device.Gpio.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\System.Security.AccessControl.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\System.Security.Principal.Windows.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\runtimes\win\lib\netstandard2.0\Microsoft.Win32.Registry.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp2.0\System.Security.AccessControl.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\runtimes\unix\lib\netcoreapp2.1\System.Security.Principal.Windows.dll
+C:\Users\l.farina\Desktop\UCRM_stage\RSTP_DSLink\RSTP_DSLink\bin\Debug\netcoreapp3.1\runtimes\win\lib\netcoreapp2.1\System.Security.Principal.Windows.dll
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.dll b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.dll
index 1209927..5279db6 100644
Binary files a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.dll and b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.dll differ
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.pdb b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.pdb
index 4881e51..b683dca 100644
Binary files a/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.pdb and b/RSTP_DSLink/RSTP_DSLink/obj/Debug/netcoreapp3.1/RSTP_DSLink.pdb differ
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/RSTP_DSLink.csproj.nuget.dgspec.json b/RSTP_DSLink/RSTP_DSLink/obj/RSTP_DSLink.csproj.nuget.dgspec.json
index 4da7efa..1929ed8 100644
--- a/RSTP_DSLink/RSTP_DSLink/obj/RSTP_DSLink.csproj.nuget.dgspec.json
+++ b/RSTP_DSLink/RSTP_DSLink/obj/RSTP_DSLink.csproj.nuget.dgspec.json
@@ -93,6 +93,14 @@
"StandardStorage": {
"target": "Package",
"version": "[0.1.1, )"
+ },
+ "System.Device.Gpio": {
+ "target": "Package",
+ "version": "[1.5.0, )"
+ },
+ "Unosquare.RaspberryIO.Peripherals": {
+ "target": "Package",
+ "version": "[0.5.0, )"
}
},
"imports": [
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
new file mode 100644
index 0000000..ad8dfe1
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/.NETCoreApp,Version=v3.1.AssemblyAttributes.cs
@@ -0,0 +1,4 @@
+//
+using System;
+using System.Reflection;
+[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILog.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILog.cs
new file mode 100644
index 0000000..714af85
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILog.cs
@@ -0,0 +1,33 @@
+//
+// ReSharper disable CheckNamespace
+namespace RSTP_DSLink.Logging
+{
+ using System;
+
+ ///
+ /// Simple interface that represent a logger.
+ ///
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ interface ILog
+ {
+ ///
+ /// Log a message the specified log level.
+ ///
+ /// The log level.
+ /// The message function.
+ /// An optional exception.
+ /// Optional format parameters for the message generated by the messagefunc.
+ /// true if the message was logged. Otherwise false.
+ ///
+ /// Note to implementers: the message func should not be called if the loglevel is not enabled
+ /// so as not to incur performance penalties.
+ /// To check IsEnabled call Log with only LogLevel and check the return value, no event will be written.
+ ///
+ bool Log(LogLevel logLevel, Func messageFunc, Exception exception = null,
+ params object[] formatParameters);
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILogProvider.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILogProvider.cs
new file mode 100644
index 0000000..8ca2aee
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/ILogProvider.cs
@@ -0,0 +1,40 @@
+//
+// ReSharper disable CheckNamespace
+using System;
+
+namespace RSTP_DSLink.Logging
+{
+ ///
+ /// Represents a way to get a
+ ///
+#if LIBLOG_PROVIDERS_ONLY
+ internal
+#else
+ public
+#endif
+ interface ILogProvider
+ {
+ ///
+ /// Gets the specified named logger.
+ ///
+ /// Name of the logger.
+ /// The logger reference.
+ Logger GetLogger(string name);
+
+ ///
+ /// Opens a nested diagnostics context. Not supported in EntLib logging.
+ ///
+ /// The message to add to the diagnostics context.
+ /// A disposable that when disposed removes the message from the context.
+ IDisposable OpenNestedContext(string message);
+
+ ///
+ /// Opens a mapped diagnostics context. Not supported in EntLib logging.
+ ///
+ /// A key.
+ /// A value.
+ /// Determines whether to call the destructor or not.
+ /// A disposable that when disposed removes the map from the context.
+ IDisposable OpenMappedContext(string key, object value, bool destructure = false);
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogExtensions.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogExtensions.cs
new file mode 100644
index 0000000..dabc266
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogExtensions.cs
@@ -0,0 +1,562 @@
+//
+// ReSharper disable CheckNamespace
+namespace RSTP_DSLink.Logging
+{
+ using System;
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ using System.Diagnostics.CodeAnalysis;
+#endif
+
+ ///
+ /// Extension methods for the interface.
+ ///
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ [ExcludeFromCodeCoverage]
+#endif
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ static class LogExtensions
+ {
+ internal static readonly object[] EmptyParams = new object[0];
+
+ ///
+ /// Check if the log level is enabled.
+ ///
+ /// The to check with.
+ /// True if the log level is enabled; false otherwise.
+ public static bool IsDebugEnabled(this ILog logger)
+ {
+ GuardAgainstNullLogger(logger);
+ return logger.Log(LogLevel.Debug, null, null, EmptyParams);
+ }
+
+ ///
+ /// Check if the log level is enabled.
+ ///
+ /// The to check with.
+ /// True if the log level is enabled; false otherwise.
+ public static bool IsErrorEnabled(this ILog logger)
+ {
+ GuardAgainstNullLogger(logger);
+ return logger.Log(LogLevel.Error, null, null, EmptyParams);
+ }
+
+ ///
+ /// Check if the log level is enabled.
+ ///
+ /// The to check with.
+ /// True if the log level is enabled; false otherwise.
+ public static bool IsFatalEnabled(this ILog logger)
+ {
+ GuardAgainstNullLogger(logger);
+ return logger.Log(LogLevel.Fatal, null, null, EmptyParams);
+ }
+
+ ///
+ /// Check if the log level is enabled.
+ ///
+ /// The to check with.
+ /// True if the log level is enabled; false otherwise.
+ public static bool IsInfoEnabled(this ILog logger)
+ {
+ GuardAgainstNullLogger(logger);
+ return logger.Log(LogLevel.Info, null, null, EmptyParams);
+ }
+
+ ///
+ /// Check if the log level is enabled.
+ ///
+ /// The to check with.
+ /// True if the log level is enabled; false otherwise.
+ public static bool IsTraceEnabled(this ILog logger)
+ {
+ GuardAgainstNullLogger(logger);
+ return logger.Log(LogLevel.Trace, null, null, EmptyParams);
+ }
+
+ ///
+ /// Check if the log level is enabled.
+ ///
+ /// The to check with.
+ /// True if the log level is enabled; false otherwise.
+ public static bool IsWarnEnabled(this ILog logger)
+ {
+ GuardAgainstNullLogger(logger);
+ return logger.Log(LogLevel.Warn, null, null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message function.
+ public static void Debug(this ILog logger, Func messageFunc)
+ {
+ GuardAgainstNullLogger(logger);
+ logger.Log(LogLevel.Debug, WrapLogInternal(messageFunc), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ public static void Debug(this ILog logger, string message)
+ {
+ if (logger.IsDebugEnabled()) logger.Log(LogLevel.Debug, message.AsFunc(), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Debug(this ILog logger, string message, params object[] args)
+ {
+ logger.DebugFormat(message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The exception.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Debug(this ILog logger, Exception exception, string message, params object[] args)
+ {
+ logger.DebugException(message, exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void DebugFormat(this ILog logger, string message, params object[] args)
+ {
+ if (logger.IsDebugEnabled()) logger.LogFormat(LogLevel.Debug, message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// The exception.
+ public static void DebugException(this ILog logger, string message, Exception exception)
+ {
+ if (logger.IsDebugEnabled()) logger.Log(LogLevel.Debug, message.AsFunc(), exception, EmptyParams);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// The exception.
+ /// Optional format parameters for the message.
+ public static void DebugException(this ILog logger, string message, Exception exception,
+ params object[] args)
+ {
+ if (logger.IsDebugEnabled()) logger.Log(LogLevel.Debug, message.AsFunc(), exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message function.
+ public static void Error(this ILog logger, Func messageFunc)
+ {
+ GuardAgainstNullLogger(logger);
+ logger.Log(LogLevel.Error, WrapLogInternal(messageFunc), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ public static void Error(this ILog logger, string message)
+ {
+ if (logger.IsErrorEnabled()) logger.Log(LogLevel.Error, message.AsFunc(), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Error(this ILog logger, string message, params object[] args)
+ {
+ logger.ErrorFormat(message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The exception.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Error(this ILog logger, Exception exception, string message, params object[] args)
+ {
+ logger.ErrorException(message, exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void ErrorFormat(this ILog logger, string message, params object[] args)
+ {
+ if (logger.IsErrorEnabled()) logger.LogFormat(LogLevel.Error, message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// The exception.
+ /// Optional format parameters for the message.
+ public static void ErrorException(this ILog logger, string message, Exception exception,
+ params object[] args)
+ {
+ if (logger.IsErrorEnabled()) logger.Log(LogLevel.Error, message.AsFunc(), exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message function.
+ public static void Fatal(this ILog logger, Func messageFunc)
+ {
+ logger.Log(LogLevel.Fatal, WrapLogInternal(messageFunc), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ public static void Fatal(this ILog logger, string message)
+ {
+ if (logger.IsFatalEnabled()) logger.Log(LogLevel.Fatal, message.AsFunc(), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Fatal(this ILog logger, string message, params object[] args)
+ {
+ logger.FatalFormat(message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The exception.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Fatal(this ILog logger, Exception exception, string message, params object[] args)
+ {
+ logger.FatalException(message, exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void FatalFormat(this ILog logger, string message, params object[] args)
+ {
+ if (logger.IsFatalEnabled()) logger.LogFormat(LogLevel.Fatal, message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// The exception.
+ /// Optional format parameters for the message.
+ public static void FatalException(this ILog logger, string message, Exception exception,
+ params object[] args)
+ {
+ if (logger.IsFatalEnabled()) logger.Log(LogLevel.Fatal, message.AsFunc(), exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message function.
+ public static void Info(this ILog logger, Func messageFunc)
+ {
+ GuardAgainstNullLogger(logger);
+ logger.Log(LogLevel.Info, WrapLogInternal(messageFunc), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ public static void Info(this ILog logger, string message)
+ {
+ if (logger.IsInfoEnabled()) logger.Log(LogLevel.Info, message.AsFunc(), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Info(this ILog logger, string message, params object[] args)
+ {
+ logger.InfoFormat(message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The exception.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Info(this ILog logger, Exception exception, string message, params object[] args)
+ {
+ logger.InfoException(message, exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void InfoFormat(this ILog logger, string message, params object[] args)
+ {
+ if (logger.IsInfoEnabled()) logger.LogFormat(LogLevel.Info, message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// The exception.
+ /// Optional format parameters for the message.
+ public static void InfoException(this ILog logger, string message, Exception exception,
+ params object[] args)
+ {
+ if (logger.IsInfoEnabled()) logger.Log(LogLevel.Info, message.AsFunc(), exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message function.
+ public static void Trace(this ILog logger, Func messageFunc)
+ {
+ GuardAgainstNullLogger(logger);
+ logger.Log(LogLevel.Trace, WrapLogInternal(messageFunc), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ public static void Trace(this ILog logger, string message)
+ {
+ if (logger.IsTraceEnabled()) logger.Log(LogLevel.Trace, message.AsFunc(), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Trace(this ILog logger, string message, params object[] args)
+ {
+ logger.TraceFormat(message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The exception.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Trace(this ILog logger, Exception exception, string message, params object[] args)
+ {
+ logger.TraceException(message, exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void TraceFormat(this ILog logger, string message, params object[] args)
+ {
+ if (logger.IsTraceEnabled()) logger.LogFormat(LogLevel.Trace, message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// The exception.
+ /// Optional format parameters for the message.
+ public static void TraceException(this ILog logger, string message, Exception exception,
+ params object[] args)
+ {
+ if (logger.IsTraceEnabled()) logger.Log(LogLevel.Trace, message.AsFunc(), exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message function.
+ public static void Warn(this ILog logger, Func messageFunc)
+ {
+ GuardAgainstNullLogger(logger);
+ logger.Log(LogLevel.Warn, WrapLogInternal(messageFunc), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ public static void Warn(this ILog logger, string message)
+ {
+ if (logger.IsWarnEnabled()) logger.Log(LogLevel.Warn, message.AsFunc(), null, EmptyParams);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Warn(this ILog logger, string message, params object[] args)
+ {
+ logger.WarnFormat(message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The exception.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void Warn(this ILog logger, Exception exception, string message, params object[] args)
+ {
+ logger.WarnException(message, exception, args);
+ }
+
+ ///
+ /// Logs a message at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// Optional format parameters for the message.
+ public static void WarnFormat(this ILog logger, string message, params object[] args)
+ {
+ if (logger.IsWarnEnabled()) logger.LogFormat(LogLevel.Warn, message, args);
+ }
+
+ ///
+ /// Logs an exception at the log level, if enabled.
+ ///
+ /// The to use.
+ /// The message.
+ /// The exception.
+ /// Optional format parameters for the message.
+ public static void WarnException(this ILog logger, string message, Exception exception,
+ params object[] args)
+ {
+ if (logger.IsWarnEnabled()) logger.Log(LogLevel.Warn, message.AsFunc(), exception, args);
+ }
+
+ // ReSharper disable once UnusedParameter.Local
+ private static void GuardAgainstNullLogger(ILog logger)
+ {
+ if (logger == null) throw new ArgumentNullException("logger");
+ }
+
+ private static void LogFormat(this ILog logger, LogLevel logLevel, string message, params object[] args)
+ {
+ logger.Log(logLevel, message.AsFunc(), null, args);
+ }
+
+ // Avoid the closure allocation, see https://gist.github.com/AArnott/d285feef75c18f6ecd2b
+ private static Func AsFunc(this T value) where T : class
+ {
+ return value.Return;
+ }
+
+ private static T Return(this T value)
+ {
+ return value;
+ }
+
+ // Allow passing callsite-logger-type to LogProviderBase using messageFunc
+ internal static Func WrapLogSafeInternal(LoggerExecutionWrapper logger, Func messageFunc)
+ {
+ var WrappedMessageFunc = new Func(() => {
+ try
+ {
+ return messageFunc();
+ }
+ catch (Exception ex)
+ {
+ logger.WrappedLogger(LogLevel.Error, () => LoggerExecutionWrapper.FailedToGenerateLogMessage, ex,
+ EmptyParams);
+ }
+
+ return null;
+ });
+
+ return WrappedMessageFunc;
+ }
+
+ // Allow passing callsite-logger-type to LogProviderBase using messageFunc
+ private static Func WrapLogInternal(Func messageFunc)
+ {
+ var WrappedMessageFunc = new Func(() =>
+ {
+ return messageFunc();
+ });
+
+ return WrappedMessageFunc;
+ }
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogLevel.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogLevel.cs
new file mode 100644
index 0000000..680efdb
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogLevel.cs
@@ -0,0 +1,45 @@
+//
+// ReSharper disable CheckNamespace
+namespace RSTP_DSLink.Logging
+{
+ ///
+ /// The log level.
+ ///
+#if LIBLOG_PROVIDERS_ONLY
+ internal
+#else
+ public
+#endif
+ enum LogLevel
+ {
+ ///
+ /// Trace
+ ///
+ Trace,
+
+ ///
+ /// Debug
+ ///
+ Debug,
+
+ ///
+ /// Info
+ ///
+ Info,
+
+ ///
+ /// Warn
+ ///
+ Warn,
+
+ ///
+ /// Error
+ ///
+ Error,
+
+ ///
+ /// Fatal
+ ///
+ Fatal
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProvider.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProvider.cs
new file mode 100644
index 0000000..5b443e5
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProvider.cs
@@ -0,0 +1,318 @@
+//
+// ReSharper disable CheckNamespace
+//===============================================================================
+// LibLog
+//
+// https://github.com/damianh/LibLog
+//===============================================================================
+// Copyright © 2011-2017 Damian Hickey. All rights reserved.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+// SOFTWARE.
+//===============================================================================
+
+// @formatter:off — disable resharper formatter after this line
+// ReSharper disable PossibleNullReferenceException
+
+// Define LIBLOG_PUBLIC to enable ability to GET a logger (LogProvider.For<>() etc) from outside this library. NOTE:
+// this can have unintended consequences of consumers of your library using your library to resolve a logger. If the
+// reason is because you want to open this functionality to other projects within your solution,
+// consider [InternalsVisibleTo] instead.
+//
+// Define LIBLOG_PROVIDERS_ONLY if your library provides its own logging API and you just want to use the
+// LibLog providers internally to provide built in support for popular logging frameworks.
+
+#pragma warning disable 1591
+
+using global::System.Diagnostics.CodeAnalysis;
+
+[assembly: SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "RSTP_DSLink.Logging")]
+[assembly: SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed", Scope = "member", Target = "RSTP_DSLink.Logging.Logger.#Invoke(RSTP_DSLink.Logging.LogLevel,System.Func`1,System.Exception,System.Object[])")]
+
+// If you copied this file manually, you need to change all "YourRootNameSpace" so not to clash with other libraries
+// that use LibLog
+namespace RSTP_DSLink.Logging
+{
+ using global::System.Collections.Generic;
+ using global::System.Diagnostics.CodeAnalysis;
+ using global::RSTP_DSLink.Logging.LogProviders;
+ using global::System;
+#if !LIBLOG_PROVIDERS_ONLY
+ using global::System.Diagnostics;
+ using global::System.Runtime.CompilerServices;
+#endif
+
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ [ExcludeFromCodeCoverage]
+#endif
+#if LIBLOG_PROVIDERS_ONLY
+ ///
+ /// Provides a mechanism to set the
+ /// and create instances of objects.
+ ///
+ internal
+#else
+ ///
+ /// Provides a mechanism to set the .
+ ///
+ public
+#endif
+ static class LogProvider
+ {
+ private static readonly Lazy ResolvedLogProvider = new Lazy(ForceResolveLogProvider);
+#if !LIBLOG_PROVIDERS_ONLY
+ private static ILogProvider s_currentLogProvider;
+ private static Action s_onCurrentLogProviderSet;
+
+ [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline")]
+ static LogProvider()
+ {
+ IsDisabled = false;
+ }
+
+ ///
+ /// Sets the current log provider.
+ ///
+ /// The log provider.
+ public static void SetCurrentLogProvider(ILogProvider logProvider)
+ {
+ s_currentLogProvider = logProvider;
+
+ RaiseOnCurrentLogProviderSet();
+ }
+
+ ///
+ /// Gets or sets a value indicating whether this is logging is disabled.
+ ///
+ ///
+ /// true if logging is disabled; otherwise, false.
+ ///
+ public static bool IsDisabled { get; set; }
+
+ ///
+ /// Sets an action that is invoked when a consumer of your library has called SetCurrentLogProvider. It is
+ /// important that hook into this if you are using child libraries (especially ilmerged ones) that are using
+ /// LibLog (or other logging abstraction) so you adapt and delegate to them.
+ ///
+ ///
+ internal static Action OnCurrentLogProviderSet
+ {
+ set
+ {
+ s_onCurrentLogProviderSet = value;
+ RaiseOnCurrentLogProviderSet();
+ }
+ }
+
+ internal static ILogProvider CurrentLogProvider
+ {
+ get { return s_currentLogProvider; }
+ }
+
+ ///
+ /// Gets a logger for the specified type.
+ ///
+ /// The type whose name will be used for the logger.
+ /// An instance of
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ static ILog For()
+ {
+ return GetLogger(typeof(T));
+ }
+
+ ///
+ /// Gets a logger for the current class.
+ ///
+ /// An instance of
+ [MethodImpl(MethodImplOptions.NoInlining)]
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ static ILog GetCurrentClassLogger()
+ {
+ var stackFrame = new StackFrame(1, false);
+ return GetLogger(stackFrame.GetMethod().DeclaringType);
+ }
+
+ ///
+ /// Gets a logger for the specified type.
+ ///
+ /// The type whose name will be used for the logger.
+ /// If the type is null then this name will be used as the log name instead
+ /// An instance of
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ static ILog GetLogger(Type type, string fallbackTypeName = "System.Object")
+ {
+ // If the type passed in is null then fallback to the type name specified
+ return GetLogger(type != null ? type.ToString() : fallbackTypeName);
+ }
+
+ ///
+ /// Gets a logger with the specified name.
+ ///
+ /// The name.
+ /// An instance of
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ static ILog GetLogger(string name)
+ {
+ var logProvider = CurrentLogProvider ?? ResolveLogProvider();
+ return logProvider == null
+ ? NoOpLogger.Instance
+ : (ILog)new LoggerExecutionWrapper(logProvider.GetLogger(name), () => IsDisabled);
+ }
+
+ ///
+ /// Opens a nested diagnostics context.
+ ///
+ /// A message.
+ /// An that closes context when disposed.
+ [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "SetCurrentLogProvider")]
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ static IDisposable OpenNestedContext(string message)
+ {
+ var logProvider = CurrentLogProvider ?? ResolveLogProvider();
+
+ return logProvider == null
+ ? new DisposableAction(() => { })
+ : logProvider.OpenNestedContext(message);
+ }
+
+ ///
+ /// Opens a mapped diagnostics context.
+ ///
+ /// A key.
+ /// A value.
+ /// A optional paramater to indicate message should be destructured.
+ /// An that closes context when disposed.
+ [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "SetCurrentLogProvider")]
+#if LIBLOG_PUBLIC
+ public
+#else
+ internal
+#endif
+ static IDisposable OpenMappedContext(string key, object value, bool destructure = false)
+ {
+ var logProvider = CurrentLogProvider ?? ResolveLogProvider();
+
+ return logProvider == null
+ ? new DisposableAction(() => { })
+ : logProvider.OpenMappedContext(key, value, destructure);
+ }
+#endif
+
+#if LIBLOG_PROVIDERS_ONLY
+ private
+#else
+ internal
+#endif
+ delegate bool IsLoggerAvailable();
+
+#if LIBLOG_PROVIDERS_ONLY
+ private
+#else
+ internal
+#endif
+ delegate ILogProvider CreateLogProvider();
+
+#if LIBLOG_PROVIDERS_ONLY
+ private
+#else
+ internal
+#endif
+ static readonly List> LogProviderResolvers =
+ new List>
+ {
+ new Tuple(SerilogLogProvider.IsLoggerAvailable, () => new SerilogLogProvider()),
+ new Tuple(NLogLogProvider.IsLoggerAvailable, () => new NLogLogProvider()),
+ new Tuple(Log4NetLogProvider.IsLoggerAvailable, () => new Log4NetLogProvider()),
+ new Tuple(LoupeLogProvider.IsLoggerAvailable, () => new LoupeLogProvider()),
+ };
+
+#if !LIBLOG_PROVIDERS_ONLY
+ private static void RaiseOnCurrentLogProviderSet()
+ {
+ if (s_onCurrentLogProviderSet != null)
+ {
+ s_onCurrentLogProviderSet(s_currentLogProvider);
+ }
+ }
+#endif
+
+ internal static ILogProvider ResolveLogProvider()
+ {
+ return ResolvedLogProvider.Value;
+ }
+
+ [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "System.Console.WriteLine(System.String,System.Object,System.Object)")]
+ [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
+ internal static ILogProvider ForceResolveLogProvider()
+ {
+ try
+ {
+ foreach (var providerResolver in LogProviderResolvers)
+ {
+ if (providerResolver.Item1())
+ {
+ return providerResolver.Item2();
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine(
+ "Exception occurred resolving a log provider. Logging for this assembly {0} is disabled. {1}",
+ typeof(LogProvider).Assembly.FullName,
+ ex);
+ }
+ return null;
+ }
+
+#if !LIBLOG_PROVIDERS_ONLY
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ [ExcludeFromCodeCoverage]
+#endif
+ internal class NoOpLogger : ILog
+ {
+ internal static readonly NoOpLogger Instance = new NoOpLogger();
+
+ public bool Log(LogLevel logLevel, Func messageFunc, Exception exception, params object[] formatParameters)
+ {
+ return false;
+ }
+ }
+#endif
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/DisposableAction.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/DisposableAction.cs
new file mode 100644
index 0000000..390d8cf
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/DisposableAction.cs
@@ -0,0 +1,26 @@
+//
+// ReSharper disable CheckNamespace
+namespace RSTP_DSLink.Logging.LogProviders
+{
+ using System;
+
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ using System.Diagnostics.CodeAnalysis;
+
+ [ExcludeFromCodeCoverage]
+#endif
+ internal class DisposableAction : IDisposable
+ {
+ private readonly Action _onDispose;
+
+ public DisposableAction(Action onDispose = null)
+ {
+ _onDispose = onDispose;
+ }
+
+ public void Dispose()
+ {
+ if(_onDispose != null) _onDispose.Invoke();
+ }
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/LibLogException.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/LibLogException.cs
new file mode 100644
index 0000000..389c070
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/LibLogException.cs
@@ -0,0 +1,42 @@
+//
+// ReSharper disable CheckNamespace
+namespace RSTP_DSLink.Logging.LogProviders
+{
+ using System;
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ using System.Diagnostics.CodeAnalysis;
+#endif
+
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ [ExcludeFromCodeCoverage]
+#endif
+#if !LIBLOG_PROVIDERS_ONLY || LIBLOG_PUBLIC
+ ///
+ /// Exception thrown by LibLog.
+ ///
+ public
+#else
+ internal
+#endif
+ class LibLogException : Exception
+ {
+ ///
+ /// Initializes a new LibLogException with the specified message.
+ ///
+ /// The message
+ public LibLogException(string message)
+ : base(message)
+ {
+ }
+
+ ///
+ /// Initializes a new LibLogException with the specified message and inner exception.
+ ///
+ /// The message.
+ /// The inner exception.
+ public LibLogException(string message, Exception inner)
+ : base(message, inner)
+ {
+ }
+ }
+}
diff --git a/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/Log4NetLogProvider.cs b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/Log4NetLogProvider.cs
new file mode 100644
index 0000000..bd61e19
--- /dev/null
+++ b/RSTP_DSLink/RSTP_DSLink/obj/Release/netcoreapp3.1/NuGet/303EE78B01AFB11ED24932A052C3548709DDD99C/LibLog/5.0.8/LogProviders/Log4NetLogProvider.cs
@@ -0,0 +1,381 @@
+//
+// ReSharper disable CheckNamespace
+namespace RSTP_DSLink.Logging.LogProviders
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Diagnostics.CodeAnalysis;
+ using System.Linq;
+ using System.Linq.Expressions;
+ using System.Reflection;
+ using System.Threading;
+
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ [ExcludeFromCodeCoverage]
+#endif
+ internal class Log4NetLogProvider : LogProviderBase
+ {
+ private readonly Func _getLoggerByNameDelegate;
+
+ [SuppressMessage("Microsoft.Naming", "CA2204:Literals should be spelled correctly", MessageId = "LogManager")]
+ public Log4NetLogProvider()
+ {
+ if (!IsLoggerAvailable()) throw new LibLogException("log4net.LogManager not found");
+ _getLoggerByNameDelegate = GetGetLoggerMethodCall();
+ }
+
+ public static bool ProviderIsAvailableOverride { get; set; } = true;
+
+ public override Logger GetLogger(string name)
+ {
+ return new Log4NetLogger(_getLoggerByNameDelegate(name)).Log;
+ }
+
+ internal static bool IsLoggerAvailable()
+ {
+ return ProviderIsAvailableOverride && GetLogManagerType() != null;
+ }
+
+ protected override OpenNdc GetOpenNdcMethod()
+ {
+ var logicalThreadContextType = FindType("log4net.LogicalThreadContext", "log4net");
+ var stacksProperty = logicalThreadContextType.GetProperty("Stacks");
+ var logicalThreadContextStacksType = stacksProperty.PropertyType;
+ var stacksIndexerProperty = logicalThreadContextStacksType.GetProperty("Item");
+ var stackType = stacksIndexerProperty.PropertyType;
+ var pushMethod = stackType.GetMethod("Push");
+
+ var messageParameter =
+ Expression.Parameter(typeof(string), "message");
+
+ // message => LogicalThreadContext.Stacks.Item["NDC"].Push(message);
+ var callPushBody =
+ Expression.Call(
+ Expression.Property(Expression.Property(null, stacksProperty),
+ stacksIndexerProperty,
+ Expression.Constant("NDC")),
+ pushMethod,
+ messageParameter);
+
+ var result =
+ Expression.Lambda(callPushBody, messageParameter)
+ .Compile();
+
+ return result;
+ }
+
+ protected override OpenMdc GetOpenMdcMethod()
+ {
+ var logicalThreadContextType = FindType("log4net.LogicalThreadContext", "log4net");
+ var propertiesProperty = logicalThreadContextType.GetProperty("Properties");
+ var logicalThreadContextPropertiesType = propertiesProperty.PropertyType;
+ var propertiesIndexerProperty = logicalThreadContextPropertiesType.GetProperty("Item");
+
+ var removeMethod = logicalThreadContextPropertiesType.GetMethod("Remove");
+
+ var keyParam = Expression.Parameter(typeof(string), "key");
+ var valueParam = Expression.Parameter(typeof(string), "value");
+
+ var propertiesExpression = Expression.Property(null, propertiesProperty);
+
+ // (key, value) => LogicalThreadContext.Properties.Item[key] = value;
+ var setProperties =
+ Expression.Assign(Expression.Property(propertiesExpression, propertiesIndexerProperty, keyParam),
+ valueParam);
+
+ // key => LogicalThreadContext.Properties.Remove(key);
+ var removeMethodCall = Expression.Call(propertiesExpression, removeMethod, keyParam);
+
+ var set = Expression
+ .Lambda>(setProperties, keyParam, valueParam)
+ .Compile();
+
+ var remove = Expression
+ .Lambda>(removeMethodCall, keyParam)
+ .Compile();
+
+ return (key, value, _) =>
+ {
+ set(key, value.ToString());
+ return new DisposableAction(() => remove(key));
+ };
+ }
+
+ private static Type GetLogManagerType()
+ {
+ return FindType("log4net.LogManager", "log4net");
+ }
+
+ private static Func GetGetLoggerMethodCall()
+ {
+ var logManagerType = GetLogManagerType();
+ var log4netAssembly = Assembly.GetAssembly(logManagerType);
+ var method = logManagerType.GetMethod("GetLogger", typeof(Assembly), typeof(string));
+ var repositoryAssemblyParam = Expression.Parameter(typeof(Assembly), "repositoryAssembly");
+ var nameParam = Expression.Parameter(typeof(string), "name");
+ var methodCall = Expression.Call(null, method, repositoryAssemblyParam, nameParam);
+ var lambda = Expression
+ .Lambda>(methodCall, repositoryAssemblyParam, nameParam).Compile();
+ return name => lambda(log4netAssembly, name);
+ }
+
+#if LIBLOG_EXCLUDE_CODE_COVERAGE
+ [ExcludeFromCodeCoverage]
+#endif
+ internal class Log4NetLogger
+ {
+ private static object s_levelAll;
+ private static object s_levelDebug;
+ private static object s_levelInfo;
+ private static object s_levelWarn;
+ private static object s_levelError;
+ private static object s_levelFatal;
+ private static Func