Merge branch 'development' into bugfix/countdownTimer-fixes

This commit is contained in:
Andrew Welker
2021-02-24 14:28:52 -07:00
committed by GitHub
22 changed files with 1228 additions and 782 deletions

View File

@@ -13,7 +13,7 @@ using PepperDash.Essentials.Room.Config;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec; using PepperDash.Essentials.Devices.Common.VideoCodec;
using PepperDash.Essentials.Devices.Common.AudioCodec; using PepperDash.Essentials.Devices.Common.AudioCodec;
using PepperDash_Essentials_Core.DeviceTypeInterfaces; using PepperDash.Essentials.Core.DeviceTypeInterfaces;
namespace PepperDash.Essentials namespace PepperDash.Essentials
{ {

View File

@@ -1,131 +1,131 @@
using System; using System;
using PepperDash.Essentials.Core; using PepperDash.Essentials.Core;
namespace PepperDash_Essentials_Core.Bridges.JoinMaps namespace PepperDash.Essentials.Core.Bridges.JoinMaps
{ {
public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced
{ {
[JoinName("IsOnline")] [JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete( public JoinDataComplete IsOnline = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 1, JoinNumber = 1,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Is Online", Description = "Sensor Is Online",
JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital JoinType = eJoinType.Digital
}); });
[JoinName("Name")] [JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete( public JoinDataComplete Name = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 1, JoinNumber = 1,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Name", Description = "Sensor Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial JoinType = eJoinType.Serial
}); });
[JoinName("Enable")] [JoinName("Enable")]
public JoinDataComplete Enable = new JoinDataComplete( public JoinDataComplete Enable = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 2, JoinNumber = 2,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Enable", Description = "Sensor Enable",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Digital JoinType = eJoinType.Digital
}); });
[JoinName("PartitionSensed")] [JoinName("PartitionSensed")]
public JoinDataComplete PartitionSensed = new JoinDataComplete( public JoinDataComplete PartitionSensed = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 3, JoinNumber = 3,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Partition Sensed", Description = "Sensor Partition Sensed",
JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital JoinType = eJoinType.Digital
}); });
[JoinName("PartitionNotSensed")] [JoinName("PartitionNotSensed")]
public JoinDataComplete PartitionNotSensed = new JoinDataComplete( public JoinDataComplete PartitionNotSensed = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 4, JoinNumber = 4,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Partition Not Sensed", Description = "Sensor Partition Not Sensed",
JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Digital JoinType = eJoinType.Digital
}); });
[JoinName("IncreaseSensitivity")] [JoinName("IncreaseSensitivity")]
public JoinDataComplete IncreaseSensitivity = new JoinDataComplete( public JoinDataComplete IncreaseSensitivity = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 6, JoinNumber = 6,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Increase Sensitivity", Description = "Sensor Increase Sensitivity",
JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital JoinType = eJoinType.Digital
}); });
[JoinName("DecreaseSensitivity")] [JoinName("DecreaseSensitivity")]
public JoinDataComplete DecreaseSensitivity = new JoinDataComplete( public JoinDataComplete DecreaseSensitivity = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 7, JoinNumber = 7,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Decrease Sensitivity", Description = "Sensor Decrease Sensitivity",
JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinCapabilities = eJoinCapabilities.FromSIMPL,
JoinType = eJoinType.Digital JoinType = eJoinType.Digital
}); });
[JoinName("Sensitivity")] [JoinName("Sensitivity")]
public JoinDataComplete Sensitivity = new JoinDataComplete( public JoinDataComplete Sensitivity = new JoinDataComplete(
new JoinData new JoinData
{ {
JoinNumber = 2, JoinNumber = 2,
JoinSpan = 1 JoinSpan = 1
}, },
new JoinMetadata new JoinMetadata
{ {
Description = "Sensor Sensitivity", Description = "Sensor Sensitivity",
JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Analog JoinType = eJoinType.Analog
}); });
/// <summary> /// <summary>
/// Constructor to use when instantiating this Join Map without inheriting from it /// Constructor to use when instantiating this Join Map without inheriting from it
/// </summary> /// </summary>
/// <param name="joinStart">Join this join map will start at</param> /// <param name="joinStart">Join this join map will start at</param>
public GlsPartitionSensorJoinMap(uint joinStart) public GlsPartitionSensorJoinMap(uint joinStart)
: this(joinStart, typeof (GlsPartitionSensorJoinMap)) : this(joinStart, typeof(GlsPartitionSensorJoinMap))
{ {
} }
/// <summary> /// <summary>
/// Constructor to use when extending this Join map /// Constructor to use when extending this Join map
@@ -137,5 +137,25 @@ namespace PepperDash_Essentials_Core.Bridges.JoinMaps
{ {
} }
}
}
namespace PepperDash_Essentials_Core.Bridges.JoinMaps
{
/// <summary>
///
/// </summary>
[Obsolete("use PepperDash.Essentials.Core.Bridges.JoinMaps version")]
public class GlsPartitionSensorJoinMap : PepperDash.Essentials.Core.Bridges.JoinMaps.GlsPartitionSensorJoinMap
{
public GlsPartitionSensorJoinMap(uint joinStart)
: this(joinStart, typeof(GlsPartitionSensorJoinMap))
{
}
protected GlsPartitionSensorJoinMap(uint joinStart, Type type) : base(joinStart, type)
{
}
} }
} }

View File

@@ -1,4 +1,6 @@
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces using System;
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{ {
public interface IHasBranding public interface IHasBranding
{ {
@@ -6,3 +8,12 @@
void InitializeBranding(string roomKey); void InitializeBranding(string roomKey);
} }
} }
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
{
[Obsolete("Use PepperDash.Essentials.Core.DeviceTypeInterfaces")]
public interface IHasBranding:PepperDash.Essentials.Core.DeviceTypeInterfaces.IHasBranding
{
}
}

View File

@@ -1,6 +1,6 @@
using PepperDash.Essentials.Core; using System;
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{ {
public interface IHasPhoneDialing public interface IHasPhoneDialing
{ {
@@ -12,3 +12,11 @@ namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
void SendDtmfToPhone(string digit); void SendDtmfToPhone(string digit);
} }
} }
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
{
[Obsolete("Use PepperDash.Essentials.Core.DeviceTypeInterfaces")]
public interface IHasPhoneDialing:PepperDash.Essentials.Core.DeviceTypeInterfaces.IHasPhoneDialing
{
}
}

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{ {
public interface ILanguageDefinition public interface ILanguageDefinition
{ {
@@ -16,3 +16,11 @@ namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
List<LanguageLabel> RoomNames { get; set; } List<LanguageLabel> RoomNames { get; set; }
} }
} }
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
{
[Obsolete("Use PepperDash.Essentials.Core.DeviceTypeInterfaces")]
public interface ILanguageDefinition:PepperDash.Essentials.Core.DeviceTypeInterfaces.ILanguageDefinition
{
}
}

View File

@@ -1,9 +1,9 @@
using System; using System;
using System.Collections.Generic;
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{ {
public interface ILanguageProvider
public interface ILanguageProvider
{ {
ILanguageDefinition CurrentLanguage { get; set; } ILanguageDefinition CurrentLanguage { get; set; }
@@ -11,3 +11,12 @@ namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
} }
} }
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
{
[Obsolete("Use PepperDash.Essentials.Core.DeviceTypeInterfaces")]
public interface ILanguageProvider:PepperDash.Essentials.Core.DeviceTypeInterfaces.ILanguageProvider
{
}
}

View File

@@ -1,6 +1,7 @@
using PepperDash.Core; using System;
using PepperDash.Core;
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
{ {
public class LanguageLabel public class LanguageLabel
{ {
@@ -10,3 +11,11 @@ namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
public uint JoinNumber { get; set; } public uint JoinNumber { get; set; }
} }
} }
namespace PepperDash_Essentials_Core.DeviceTypeInterfaces
{
[Obsolete("Use PepperDash.Essentials.Core.DeviceTypeInterfaces")]
public class LanguageLabel: PepperDash.Essentials.Core.DeviceTypeInterfaces.LanguageLabel
{
}
}

View File

@@ -7,7 +7,7 @@ using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
namespace PepperDash_Essentials_Core.Devices namespace PepperDash.Essentials.Core.Devices
{ {
public class GenericIrController: EssentialsBridgeableDevice public class GenericIrController: EssentialsBridgeableDevice
{ {

View File

@@ -3,8 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Essentials.Core;
namespace PepperDash_Essentials_Core namespace PepperDash.Essentials.Core
{ {
public class IsReadyEventArgs : EventArgs public class IsReadyEventArgs : EventArgs
{ {
@@ -22,3 +23,19 @@ namespace PepperDash_Essentials_Core
bool IsReady { get; } bool IsReady { get; }
} }
} }
namespace PepperDash_Essentials_Core
{
[Obsolete("Use PepperDash.Essentials.Core")]
public class IsReadyEventArgs : PepperDash.Essentials.Core.IsReadyEventArgs
{
public IsReadyEventArgs(bool data) : base(data)
{
}
}
[Obsolete("Use PepperDash.Essentials.Core")]
public interface IHasReady: PepperDash.Essentials.Core.IHasReady
{
}
}

View File

@@ -10,9 +10,7 @@ using Crestron.SimplSharpPro.DeviceSupport;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config; using PepperDash.Essentials.Core.Config;
using PepperDash_Essentials_Core;
namespace PepperDash.Essentials.Core namespace PepperDash.Essentials.Core

View File

@@ -4,7 +4,7 @@ using Crestron.SimplSharpPro.GeneralIO;
using Newtonsoft.Json; using Newtonsoft.Json;
using PepperDash.Core; using PepperDash.Core;
using PepperDash.Essentials.Core.Bridges; using PepperDash.Essentials.Core.Bridges;
using PepperDash_Essentials_Core.Bridges.JoinMaps; using PepperDash.Essentials.Core.Bridges.JoinMaps;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;

View File

@@ -1,7 +1,7 @@
using System; using System;
using PepperDash.Core; using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues namespace PepperDash.Essentials.Core.Queues
{ {
/// <summary> /// <summary>
/// IBasicCommunication Message for IQueue /// IBasicCommunication Message for IQueue
@@ -71,3 +71,31 @@ namespace PepperDash_Essentials_Core.Queues
} }
} }
} }
namespace PepperDash_Essentials_Core.Queues
{
/// <summary>
/// IBasicCommunication Message for IQueue
/// </summary>
[Obsolete("Use PepperDash.Essentials.Core.Queues")]
public class ComsMessage : PepperDash.Essentials.Core.Queues.ComsMessage
{
/// <summary>
/// Constructor for a string message
/// </summary>
/// <param name="coms">IBasicCommunication to send the message</param>
/// <param name="message">Message to send</param>
public ComsMessage(IBasicCommunication coms, string message):base(coms, message)
{
}
/// <summary>
/// Constructor for a byte message
/// </summary>
/// <param name="coms">IBasicCommunication to send the message</param>
/// <param name="message">Message to send</param>
public ComsMessage(IBasicCommunication coms, byte[] message):base(coms, message)
{
}
}
}

View File

@@ -3,7 +3,7 @@ using Crestron.SimplSharp;
using Crestron.SimplSharpPro.CrestronThread; using Crestron.SimplSharpPro.CrestronThread;
using PepperDash.Core; using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues namespace PepperDash.Essentials.Core.Queues
{ {
/// <summary> /// <summary>
/// Threadsafe processing of queued items with pacing if required /// Threadsafe processing of queued items with pacing if required
@@ -126,7 +126,9 @@ namespace PepperDash_Essentials_Core.Queues
/// </summary> /// </summary>
/// <param name="key">Key</param> /// <param name="key">Key</param>
/// <param name="priority"></param> /// <param name="priority"></param>
private GenericQueue(string key, Thread.eThreadPriority priority, int capacity, int pacing) /// <param name="capacity"></param>
/// <param name="pacing"></param>
protected GenericQueue(string key, Thread.eThreadPriority priority, int capacity, int pacing)
{ {
_key = key; _key = key;
int cap = 25; // sets default int cap = 25; // sets default
@@ -245,3 +247,105 @@ namespace PepperDash_Essentials_Core.Queues
} }
} }
} }
namespace PepperDash_Essentials_Core.Queues
{
/// <summary>
/// Threadsafe processing of queued items with pacing if required
/// </summary>
[Obsolete("Use PepperDash.Essentials.Core.Queues")]
public class GenericQueue : PepperDash.Essentials.Core.Queues.GenericQueue
{
private bool _delayEnabled;
private int _delayTime;
private const Thread.eThreadPriority _defaultPriority = Thread.eThreadPriority.MediumPriority;
/// <summary>
/// Constructor with no thread priority
/// </summary>
/// <param name="key"></param>
public GenericQueue(string key)
: this(key, _defaultPriority, 0, 0)
{
}
/// <summary>
/// Constructor with queue size
/// </summary>
/// <param name="key"></param>
/// <param name="capacity">Fixed size for the queue to hold</param>
public GenericQueue(string key, int capacity)
: this(key, _defaultPriority, capacity, 0)
{
}
/// <summary>
/// Constructor for generic queue with no pacing
/// </summary>
/// <param name="key">Key</param>
/// <param name="pacing">Pacing in ms between actions</param>
public GenericQueue(int pacing, string key)
: this(key, _defaultPriority, 0, pacing)
{
}
/// <summary>
/// Constructor with pacing and capacity
/// </summary>
/// <param name="key"></param>
/// <param name="pacing"></param>
/// <param name="capacity"></param>
public GenericQueue(string key, int pacing, int capacity)
: this(key, _defaultPriority, capacity, pacing)
{
}
/// <summary>
/// Constructor with pacing and priority
/// </summary>
/// <param name="key"></param>
/// <param name="pacing"></param>
/// <param name="priority"></param>
public GenericQueue(string key, int pacing, Thread.eThreadPriority priority)
: this(key, priority, 0, pacing)
{
}
/// <summary>
/// Constructor with pacing, priority and capacity
/// </summary>
/// <param name="key"></param>
/// <param name="priority"></param>
/// <param name="capacity"></param>
public GenericQueue(string key, Thread.eThreadPriority priority, int capacity)
: this(key, priority, capacity, 0)
{
}
/// <summary>
/// Constructor with pacing, priority and capacity
/// </summary>
/// <param name="key"></param>
/// <param name="pacing"></param>
/// <param name="priority"></param>
/// <param name="capacity"></param>
public GenericQueue(string key, int pacing, Thread.eThreadPriority priority, int capacity)
: this(key, priority, capacity, pacing)
{
}
/// <summary>
/// Constructor for generic queue with no pacing
/// </summary>
/// <param name="key">Key</param>
/// <param name="priority"></param>
/// <param name="capacity"></param>
/// <param name="pacing"></param>
private GenericQueue(string key, Thread.eThreadPriority priority, int capacity, int pacing):base(key, priority, capacity, pacing)
{
}
}
}

View File

@@ -5,7 +5,7 @@ using System.Text;
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Core; using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues namespace PepperDash.Essentials.Core.Queues
{ {
public interface IQueue<T> : IKeyed, IDisposable where T : class public interface IQueue<T> : IKeyed, IDisposable where T : class
{ {
@@ -13,3 +13,11 @@ namespace PepperDash_Essentials_Core.Queues
bool Disposed { get; } bool Disposed { get; }
} }
} }
namespace PepperDash_Essentials_Core.Queues
{
[Obsolete("Use PepperDash.Essentials.Core.Queues")]
public interface IQueue<T> : PepperDash.Essentials.Core.Queues.IQueue<T> where T: class
{
}
}

View File

@@ -1,7 +1,17 @@
namespace PepperDash_Essentials_Core.Queues using System;
namespace PepperDash.Essentials.Core.Queues
{ {
public interface IQueueMessage public interface IQueueMessage
{ {
void Dispatch(); void Dispatch();
} }
} }
namespace PepperDash_Essentials_Core.Queues
{
[Obsolete("Use PepperDash.Essentials.Core.Queues")]
public interface IQueueMessage:PepperDash.Essentials.Core.Queues.IQueueMessage
{
}
}

View File

@@ -1,6 +1,6 @@
using System; using System;
namespace PepperDash_Essentials_Core.Queues namespace PepperDash.Essentials.Core.Queues
{ {
/// <summary> /// <summary>
/// Message class for processing strings via an IQueue /// Message class for processing strings via an IQueue
@@ -42,3 +42,20 @@ namespace PepperDash_Essentials_Core.Queues
} }
} }
} }
namespace PepperDash_Essentials_Core.Queues
{
/// <summary>
/// Message class for processing strings via an IQueue
/// </summary>
[Obsolete("Use PepperDash.Essentials.Core.Queues")]
public class ProcessStringMessage : PepperDash.Essentials.Core.Queues.ProcessStringMessage
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="message">Message to be processed</param>
/// <param name="action">Action to invoke on the message</param>
public ProcessStringMessage(string message, Action<string> action) : base(message, action){}
}
}

View File

@@ -2,7 +2,7 @@
using Crestron.SimplSharp; using Crestron.SimplSharp;
using PepperDash.Core; using PepperDash.Core;
namespace PepperDash_Essentials_Core.Queues namespace PepperDash.Essentials.Core.Queues
{ {
public sealed class StringResponseProcessor : IKeyed, IDisposable public sealed class StringResponseProcessor : IKeyed, IDisposable
{ {
@@ -104,3 +104,107 @@ namespace PepperDash_Essentials_Core.Queues
} }
} }
} }
namespace PepperDash_Essentials_Core.Queues
{
[Obsolete("Use PepperDash.Essentials.Core.Queues")]
public sealed class StringResponseProcessor : IKeyed, IDisposable
{
private readonly Action<string> _processStringAction;
private readonly PepperDash.Essentials.Core.Queues.IQueue<PepperDash.Essentials.Core.Queues.IQueueMessage> _queue;
private readonly IBasicCommunication _coms;
private readonly CommunicationGather _gather;
private StringResponseProcessor(string key, Action<string> processStringAction)
{
_processStringAction = processStringAction;
_queue = new PepperDash.Essentials.Core.Queues.GenericQueue(key);
CrestronEnvironment.ProgramStatusEventHandler += programEvent =>
{
if (programEvent != eProgramStatusEventType.Stopping)
return;
Dispose();
};
}
/// <summary>
/// Constructor that builds an instance and subscribes to coms TextReceived for processing
/// </summary>
/// <param name="coms">Com port to process strings from</param>
/// <param name="processStringAction">Action to process the incoming strings</param>
public StringResponseProcessor(IBasicCommunication coms, Action<string> processStringAction)
: this(coms.Key, processStringAction)
{
_coms = coms;
coms.TextReceived += OnResponseReceived;
}
/// <summary>
/// Constructor that builds an instance and subscribes to gather Line Received for processing
/// </summary>
/// <param name="gather">Gather to process strings from</param>
/// <param name="processStringAction">Action to process the incoming strings</param>
public StringResponseProcessor(CommunicationGather gather, Action<string> processStringAction)
: this(gather.Port.Key, processStringAction)
{
_gather = gather;
gather.LineReceived += OnResponseReceived;
}
private void OnResponseReceived(object sender, GenericCommMethodReceiveTextArgs args)
{
_queue.Enqueue(new ProcessStringMessage(args.Text, _processStringAction));
}
/// <summary>
/// Key
/// </summary>
public string Key
{
get { return _queue.Key; }
}
/// <summary>
/// Disposes the instance and cleans up resources.
/// </summary>
public void Dispose()
{
Dispose(true);
CrestronEnvironment.GC.SuppressFinalize(this);
}
private void Dispose(bool disposing)
{
if (Disposed)
return;
if (disposing)
{
if (_coms != null)
_coms.TextReceived -= OnResponseReceived;
if (_gather != null)
{
_gather.LineReceived -= OnResponseReceived;
_gather.Stop();
}
_queue.Dispose();
}
Disposed = true;
}
/// <summary>
/// If the instance has been disposed or not. If it has, you can not use it anymore
/// </summary>
public bool Disposed { get; private set; }
~StringResponseProcessor()
{
Dispose(false);
}
}
}

View File

@@ -83,7 +83,7 @@ namespace PepperDash.Essentials.Core
} }
} }
void _gateway_IsReadyEvent(object sender, PepperDash_Essentials_Core.IsReadyEventArgs e) void _gateway_IsReadyEvent(object sender, IsReadyEventArgs e)
{ {
if (e.IsReady != true) return; if (e.IsReady != true) return;
_remote = GetHr1x0WirelessRemote(_config); _remote = GetHr1x0WirelessRemote(_config);

View File

@@ -18,8 +18,7 @@ using PepperDash.Essentials.Core.Routing;
using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Devices.Common.Cameras;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec; using PepperDash.Essentials.Devices.Common.VideoCodec;
using PepperDash_Essentials_Core.Queues; using PepperDash.Essentials.Core.Queues;
using PepperDash_Essentials_Core.DeviceTypeInterfaces;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
{ {

View File

@@ -19,8 +19,7 @@ using PepperDash.Essentials.Core.Routing;
using PepperDash.Essentials.Devices.Common.Cameras; using PepperDash.Essentials.Devices.Common.Cameras;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
using PepperDash_Essentials_Core.Bridges.JoinMaps; using PepperDash.Essentials.Core.Bridges.JoinMaps;
using PepperDash_Essentials_Core.DeviceTypeInterfaces;
using Feedback = PepperDash.Essentials.Core.Feedback; using Feedback = PepperDash.Essentials.Core.Feedback;
namespace PepperDash.Essentials.Devices.Common.VideoCodec namespace PepperDash.Essentials.Devices.Common.VideoCodec

View File

@@ -17,7 +17,6 @@ using PepperDash.Essentials.Devices.Common.Cameras;
using PepperDash.Essentials.Devices.Common.Codec; using PepperDash.Essentials.Devices.Common.Codec;
using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco; using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco;
using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces; using PepperDash.Essentials.Devices.Common.VideoCodec.Interfaces;
using PepperDash_Essentials_Core.DeviceTypeInterfaces;
namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom namespace PepperDash.Essentials.Devices.Common.VideoCodec.ZoomRoom
{ {