chore: move all files to file-scoped namespace

This commit is contained in:
Andrew Welker 2025-07-04 16:02:32 -05:00 committed by Neil Dorin
parent aaa5b0532b
commit 3ece4f0b7b
522 changed files with 39628 additions and 45678 deletions

View file

@ -1,43 +0,0 @@
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
namespace PepperDash.Core
{
/// <summary>
/// Helper class for formatting communication text and byte data for debugging purposes.
/// </summary>
public class ComTextHelper
{
/// <summary>
/// Gets escaped text for a byte array
/// </summary>
/// <param name="bytes"></param>
/// <returns>string with all bytes escaped</returns>
public static string GetEscapedText(byte[] bytes)
{
return string.Concat(bytes.Select(b => string.Format(@"[{0:X2}]", (int)b)).ToArray());
}
/// <summary>
/// Gets escaped text for a string
/// </summary>
/// <param name="text"></param>
/// <returns>string with all bytes escaped</returns>
public static string GetEscapedText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
return string.Concat(bytes.Select(b => string.Format(@"[{0:X2}]", (int)b)).ToArray());
}
/// <summary>
/// Gets debug text for a string
/// </summary>
/// <param name="text"></param>
/// <returns>string with all non-printable characters escaped</returns>
public static string GetDebugText(string text)
{
return Regex.Replace(text, @"[^\u0020-\u007E]", a => GetEscapedText(a.Value));
}
}
}

View file

@ -8,8 +8,8 @@ using Crestron.SimplSharp;
using PepperDash.Core;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Defines the string event handler for line events on the gather
/// </summary>
@ -175,4 +175,3 @@ namespace PepperDash.Core
Stop();
}
}
}

View file

@ -1,11 +1,12 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Controls the ability to disable/enable debugging of TX/RX data sent to/from a device with a built in timer to disable
/// </summary>
@ -22,7 +23,7 @@ namespace PepperDash.Core
private CTimer DebugExpiryPeriod;
/// <summary>
/// Gets or sets the DebugSetting
/// The current debug setting
/// </summary>
public eStreamDebuggingSetting DebugSetting { get; private set; }
@ -41,7 +42,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the RxStreamDebuggingIsEnabled
/// Indicates that receive stream debugging is enabled
/// </summary>
public bool RxStreamDebuggingIsEnabled{ get; private set; }
@ -64,9 +65,6 @@ namespace PepperDash.Core
/// Sets the debugging setting and if not setting to off, assumes the default of 30 mintues
/// </summary>
/// <param name="setting"></param>
/// <summary>
/// SetDebuggingWithDefaultTimeout method
/// </summary>
public void SetDebuggingWithDefaultTimeout(eStreamDebuggingSetting setting)
{
if (setting == eStreamDebuggingSetting.Off)
@ -83,9 +81,6 @@ namespace PepperDash.Core
/// </summary>
/// <param name="setting"></param>
/// <param name="minutes"></param>
/// <summary>
/// SetDebuggingWithSpecificTimeout method
/// </summary>
public void SetDebuggingWithSpecificTimeout(eStreamDebuggingSetting setting, uint minutes)
{
if (setting == eStreamDebuggingSetting.Off)
@ -135,4 +130,28 @@ namespace PepperDash.Core
DebugExpiryPeriod = null;
}
}
/// <summary>
/// The available settings for stream debugging
/// </summary>
[Flags]
public enum eStreamDebuggingSetting
{
/// <summary>
/// Debug off
/// </summary>
Off = 0,
/// <summary>
/// Debug received data
/// </summary>
Rx = 1,
/// <summary>
/// Debug transmitted data
/// </summary>
Tx = 2,
/// <summary>
/// Debug both received and transmitted data
/// </summary>
Both = Rx | Tx
}

View file

@ -8,10 +8,10 @@ using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
using NullValueHandling = NewtonsoftJson::Newtonsoft.Json.NullValueHandling;
using StringEnumConverter = NewtonsoftJson::Newtonsoft.Json.Converters.StringEnumConverter;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Represents a ControlPropertiesConfig
/// Config properties that indicate how to communicate with a device for control
/// </summary>
public class ControlPropertiesConfig
{
@ -95,4 +95,3 @@ namespace PepperDash.Core
{
}
}
}

View file

@ -16,8 +16,8 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronSockets;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Delegate for notifying of socket status changes
/// </summary>
@ -35,7 +35,7 @@ namespace PepperDash.Core
public ISocketStatus Client { get; private set; }
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="client"></param>
public GenericSocketStatusChageEventArgs(ISocketStatus client)
@ -65,7 +65,7 @@ namespace PepperDash.Core
public ServerState State { get; private set; }
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="state"></param>
public GenericTcpServerStateChangedEventArgs(ServerState state)
@ -91,20 +91,22 @@ namespace PepperDash.Core
public class GenericTcpServerSocketStatusChangeEventArgs : EventArgs
{
/// <summary>
///
/// Gets or sets the Socket
/// </summary>
public object Socket { get; private set; }
/// <summary>
///
/// Gets or sets the index of the client from which the status change was received
/// </summary>
public uint ReceivedFromClientIndex { get; private set; }
/// <summary>
///
/// Gets or sets the ClientStatus
/// </summary>
public SocketStatus ClientStatus { get; set; }
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="socket"></param>
/// <param name="clientStatus"></param>
@ -115,7 +117,7 @@ namespace PepperDash.Core
}
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="socket"></param>
/// <param name="clientIndex"></param>
@ -138,12 +140,12 @@ namespace PepperDash.Core
public class GenericTcpServerCommMethodReceiveTextArgs : EventArgs
{
/// <summary>
///
/// Gets or sets the index of the client from which the text was received
/// </summary>
public uint ReceivedFromClientIndex { get; private set; }
/// <summary>
///
/// Gets the index of the client from which the text was received as a ushort
/// </summary>
public ushort ReceivedFromClientIndexShort
{
@ -159,7 +161,7 @@ namespace PepperDash.Core
public string Text { get; private set; }
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="text"></param>
public GenericTcpServerCommMethodReceiveTextArgs(string text)
@ -168,7 +170,7 @@ namespace PepperDash.Core
}
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="text"></param>
/// <param name="clientIndex"></param>
@ -189,18 +191,19 @@ namespace PepperDash.Core
public class GenericTcpServerClientReadyForcommunicationsEventArgs : EventArgs
{
/// <summary>
///
/// Gets or sets IsReady
/// </summary>
public bool IsReady;
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="isReady"></param>
public GenericTcpServerClientReadyForcommunicationsEventArgs(bool isReady)
{
IsReady = isReady;
}
/// <summary>
/// S+ Constructor
/// </summary>
@ -213,11 +216,12 @@ namespace PepperDash.Core
public class GenericUdpConnectedEventArgs : EventArgs
{
/// <summary>
///
/// Gets or sets the UConnected
/// </summary>
public ushort UConnected;
/// <summary>
///
/// Gets or sets the Connected status
/// </summary>
public bool Connected;
@ -227,7 +231,7 @@ namespace PepperDash.Core
public GenericUdpConnectedEventArgs() { }
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="uconnected"></param>
public GenericUdpConnectedEventArgs(ushort uconnected)
@ -236,7 +240,7 @@ namespace PepperDash.Core
}
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="connected"></param>
public GenericUdpConnectedEventArgs(bool connected)
@ -246,6 +250,3 @@ namespace PepperDash.Core
}
}

View file

@ -7,8 +7,8 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronSockets;
using PepperDash.Core.Logging;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// A class to handle secure TCP/IP communications with a server
/// </summary>
@ -79,7 +79,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the Port
/// Port on server
/// </summary>
public int Port { get; set; }
@ -149,7 +149,7 @@ namespace PepperDash.Core
public string ConnectionFailure { get { return ClientStatus.ToString(); } }
/// <summary>
/// Gets or sets the AutoReconnect
/// bool to track if auto reconnect should be set on the socket
/// </summary>
public bool AutoReconnect { get; set; }
@ -188,7 +188,7 @@ namespace PepperDash.Core
#region GenericSecureTcpIpClient properties
/// <summary>
/// Gets or sets the SharedKeyRequired
/// Bool to show whether the server requires a preshared key. This is used in the DynamicTCPServer class
/// </summary>
public bool SharedKeyRequired { get; set; }
@ -207,7 +207,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the SharedKey
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
/// </summary>
public string SharedKey { get; set; }
@ -222,7 +222,7 @@ namespace PepperDash.Core
bool IsTryingToConnect;
/// <summary>
/// Gets or sets the IsReadyForCommunication
/// Bool showing if socket is ready for communication after shared key exchange
/// </summary>
public bool IsReadyForCommunication { get; set; }
@ -342,7 +342,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Initialize method
/// Just to help S+ set the key
/// </summary>
public void Initialize(string key)
{
@ -357,7 +357,7 @@ namespace PepperDash.Core
{
if (config == null)
{
Debug.Console(0, this, "Could not initialize client with key: {0}", Key);
this.LogWarning( "Could not initialize client with key: {0}", Key);
return;
}
try
@ -397,7 +397,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(0, this, "Exception initializing client with key: {0}\rException: {1}", Key, ex);
this.LogError("Exception initializing client with key: {0}\rException: {1}", Key, ex);
}
}
@ -410,7 +410,7 @@ namespace PepperDash.Core
{
if (programEventType == eProgramStatusEventType.Stopping || programEventType == eProgramStatusEventType.Paused)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Program stopping. Closing _client connection");
this.LogInformation("Program stopping. Closing _client connection");
ProgramIsStopping = true;
Disconnect();
}
@ -421,9 +421,6 @@ namespace PepperDash.Core
/// Deactivate the client
/// </summary>
/// <returns></returns>
/// <summary>
/// Deactivate method
/// </summary>
public override bool Deactivate()
{
if (_client != null)
@ -435,22 +432,22 @@ namespace PepperDash.Core
}
/// <summary>
/// Connect method
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
/// </summary>
public void Connect()
{
ConnectionCount++;
Debug.Console(2, this, "Attempting connect Count:{0}", ConnectionCount);
this.LogVerbose("Attempting connect Count:{0}", ConnectionCount);
if (IsConnected)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Already connected. Ignoring.");
this.LogInformation("Already connected. Ignoring.");
return;
}
if (IsTryingToConnect)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Already trying to connect. Ignoring.");
this.LogInformation("Already trying to connect. Ignoring.");
return;
}
try
@ -463,17 +460,17 @@ namespace PepperDash.Core
}
if (string.IsNullOrEmpty(Hostname))
{
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "DynamicTcpClient: No address set");
this.LogWarning("DynamicTcpClient: No address set");
return;
}
if (Port < 1 || Port > 65535)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "DynamicTcpClient: Invalid port");
this.LogWarning("DynamicTcpClient: Invalid port");
return;
}
if (string.IsNullOrEmpty(SharedKey) && SharedKeyRequired)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "DynamicTcpClient: No Shared Key set");
this.LogWarning("DynamicTcpClient: No Shared Key set");
return;
}
@ -496,7 +493,7 @@ namespace PepperDash.Core
ConnectFailTimer = new CTimer(o =>
{
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Connect attempt has not finished after 30sec Count:{0}", ConnectionCount);
this.LogError("Connect attempt has not finished after 30sec Count:{0}", ConnectionCount);
if (IsTryingToConnect)
{
IsTryingToConnect = false;
@ -510,10 +507,10 @@ namespace PepperDash.Core
}
}, 30000);
Debug.Console(2, this, "Making Connection Count:{0}", ConnectionCount);
this.LogVerbose("Making Connection Count:{0}", ConnectionCount);
_client.ConnectToServerAsync(o =>
{
Debug.Console(2, this, "ConnectToServerAsync Count:{0} Ran!", ConnectionCount);
this.LogVerbose("ConnectToServerAsync Count:{0} Ran!", ConnectionCount);
if (ConnectFailTimer != null)
{
@ -523,7 +520,7 @@ namespace PepperDash.Core
if (o.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED)
{
Debug.Console(2, this, "_client connected to {0} on port {1}", o.AddressClientConnectedTo, o.LocalPortNumberOfClient);
this.LogVerbose("_client connected to {0} on port {1}", o.AddressClientConnectedTo, o.LocalPortNumberOfClient);
o.ReceiveDataAsync(Receive);
if (SharedKeyRequired)
@ -532,7 +529,7 @@ namespace PepperDash.Core
WaitForSharedKey = new CTimer(timer =>
{
Debug.Console(1, this, Debug.ErrorLogLevel.Warning, "Shared key exchange timer expired. IsReadyForCommunication={0}", IsReadyForCommunication);
this.LogWarning("Shared key exchange timer expired. IsReadyForCommunication={0}", IsReadyForCommunication);
// Debug.Console(1, this, "Connect attempt failed {0}", c.ClientStatus);
// This is the only case where we should call DisconectFromServer...Event handeler will trigger the cleanup
o.DisconnectFromServer();
@ -552,21 +549,21 @@ namespace PepperDash.Core
}
else
{
Debug.Console(1, this, "Connect attempt failed {0}", o.ClientStatus);
this.LogWarning("Connect attempt failed {0}", o.ClientStatus);
CheckClosedAndTryReconnect();
}
});
}
catch (Exception ex)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "_client connection exception: {0}", ex.Message);
this.LogError("_client connection exception: {0}", ex.Message);
IsTryingToConnect = false;
CheckClosedAndTryReconnect();
}
}
/// <summary>
/// Disconnect method
///
/// </summary>
public void Disconnect()
{
@ -589,20 +586,20 @@ namespace PepperDash.Core
}
/// <summary>
/// DisconnectClient method
/// Does the actual disconnect business
/// </summary>
public void DisconnectClient()
{
if (_client == null) return;
Debug.Console(1, this, "Disconnecting client");
this.LogInformation("Disconnecting client");
if (IsConnected)
_client.DisconnectFromServer();
// close up client. ALWAYS use this when disconnecting.
IsTryingToConnect = false;
Debug.Console(2, this, "Disconnecting _client {0}", DisconnectCalledByUser ? ", Called by user" : "");
this.LogVerbose("Disconnecting _client {0}", DisconnectCalledByUser ? ", Called by user" : "");
_client.SocketStatusChange -= Client_SocketStatusChange;
_client.Dispose();
_client = null;
@ -623,14 +620,14 @@ namespace PepperDash.Core
{
if (_client != null)
{
Debug.Console(2, this, "Cleaning up remotely closed/failed connection.");
this.LogVerbose("Cleaning up remotely closed/failed connection.");
Disconnect();
}
if (!DisconnectCalledByUser && AutoReconnect)
{
var halfInterval = AutoReconnectIntervalMs / 2;
var rndTime = new Random().Next(-halfInterval, halfInterval) + AutoReconnectIntervalMs;
Debug.Console(2, this, "Attempting reconnect in {0} ms, randomized", rndTime);
this.LogVerbose("Attempting reconnect in {0} ms, randomized", rndTime);
if (RetryTimer != null)
{
RetryTimer.Stop();
@ -657,13 +654,13 @@ namespace PepperDash.Core
{
var bytes = client.IncomingDataBuffer.Take(numBytes).ToArray();
str = Encoding.GetEncoding(28591).GetString(bytes, 0, bytes.Length);
Debug.Console(2, this, "_client Received:\r--------\r{0}\r--------", str);
this.LogVerbose("_client Received:\r--------\r{0}\r--------", str);
if (!string.IsNullOrEmpty(checkHeartbeat(str)))
{
if (SharedKeyRequired && str == "SharedKey:")
{
Debug.Console(2, this, "Server asking for shared key, sending");
this.LogVerbose("Server asking for shared key, sending");
SendText(SharedKey + "\n");
}
else if (SharedKeyRequired && str == "Shared Key Match")
@ -671,7 +668,7 @@ namespace PepperDash.Core
StopWaitForSharedKeyTimer();
Debug.Console(2, this, "Shared key confirmed. Ready for communication");
this.LogVerbose("Shared key confirmed. Ready for communication");
OnClientReadyForcommunications(true); // Successful key exchange
}
else
@ -691,7 +688,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(1, this, "Error receiving data: {1}. Error: {0}", ex.Message, str);
this.LogError("Error receiving data: {1}. Error: {0}", str, ex.Message);
}
if (client.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED)
client.ReceiveDataAsync(Receive);
@ -731,7 +728,7 @@ namespace PepperDash.Core
}
catch (Exception e)
{
this.LogException(e, "DequeueEvent error");
this.LogError(e, "DequeueEvent error: {0}", e.Message);
}
// Make sure to leave the CCritical section in case an exception above stops this thread, or we won't be able to restart it.
if (DequeueLock != null)
@ -762,13 +759,13 @@ namespace PepperDash.Core
if (HeartbeatSendTimer != null)
{
Debug.Console(2, this, "Stoping Heartbeat Send");
this.LogVerbose("Stoping Heartbeat Send");
HeartbeatSendTimer.Stop();
HeartbeatSendTimer = null;
}
if (HeartbeatAckTimer != null)
{
Debug.Console(2, this, "Stoping Heartbeat Ack");
this.LogVerbose("Stoping Heartbeat Ack");
HeartbeatAckTimer.Stop();
HeartbeatAckTimer = null;
}
@ -777,7 +774,7 @@ namespace PepperDash.Core
void SendHeartbeat(object notused)
{
this.SendText(HeartbeatString);
Debug.Console(2, this, "Sending Heartbeat");
this.LogVerbose("Sending Heartbeat");
}
@ -802,7 +799,7 @@ namespace PepperDash.Core
{
HeartbeatAckTimer = new CTimer(HeartbeatAckTimerFail, null, (HeartbeatInterval * 2), (HeartbeatInterval * 2));
}
Debug.Console(2, this, "Heartbeat Received: {0}, from Server", HeartbeatString);
this.LogVerbose("Heartbeat Received: {0}, from Server", HeartbeatString);
return remainingText;
}
}
@ -810,7 +807,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(1, this, "Error checking heartbeat: {0}", ex.Message);
this.LogError(ex, "Error checking heartbeat: {0}", ex.Message);
}
return received;
}
@ -824,7 +821,7 @@ namespace PepperDash.Core
if (IsConnected)
{
Debug.Console(1, Debug.ErrorLogLevel.Warning, "Heartbeat not received from Server...DISCONNECTING BECAUSE HEARTBEAT REQUIRED IS TRUE");
this.LogWarning("Heartbeat not received from Server...DISCONNECTING BECAUSE HEARTBEAT REQUIRED IS TRUE");
SendText("Heartbeat not received by server, closing connection");
CheckClosedAndTryReconnect();
}
@ -832,7 +829,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
ErrorLog.Error("Heartbeat timeout Error on _client: {0}, {1}", Key, ex);
this.LogError(ex, "Heartbeat timeout Error on _client: {0}, {1}", Key, ex.Message);
}
}
@ -849,7 +846,7 @@ namespace PepperDash.Core
}
/// <summary>
/// SendText method
/// General send method
/// </summary>
public void SendText(string text)
{
@ -865,20 +862,20 @@ namespace PepperDash.Core
// HOW IN THE HELL DO WE CATCH AN EXCEPTION IN SENDING?????
if (n <= 0)
{
Debug.Console(1, Debug.ErrorLogLevel.Warning, "[{0}] Sent zero bytes. Was there an error?", this.Key);
this.LogWarning("[{0}] Sent zero bytes. Was there an error?", this.Key);
}
});
}
}
catch (Exception ex)
{
Debug.Console(0, this, "Error sending text: {1}. Error: {0}", ex.Message, text);
this.LogError(ex, "Error sending text: {1}. Error: {0}", ex.Message, text);
}
}
}
/// <summary>
/// SendBytes method
///
/// </summary>
public void SendBytes(byte[] bytes)
{
@ -891,7 +888,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(0, this, "Error sending bytes. Error: {0}", ex.Message);
this.LogError(ex, "Error sending bytes. Error: {0}", ex.Message);
}
}
}
@ -910,7 +907,7 @@ namespace PepperDash.Core
}
try
{
Debug.Console(2, this, "Socket status change: {0} ({1})", client.ClientStatus, (ushort)(client.ClientStatus));
this.LogVerbose("Socket status change: {0} ({1})", client.ClientStatus, (ushort)(client.ClientStatus));
OnConnectionChange();
// The client could be null or disposed by this time...
@ -923,7 +920,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Error in socket status change callback. Error: {0}\r\r{1}", ex, ex.InnerException);
this.LogError(ex, "Error in socket status change callback. Error: {0}\r\r{1}", ex, ex.InnerException);
}
}
@ -954,5 +951,3 @@ namespace PepperDash.Core
}
#endregion
}
}

View file

@ -19,8 +19,8 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronSockets;
using PepperDash.Core.Logging;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Generic secure TCP/IP client for server
/// </summary>
@ -80,7 +80,7 @@ namespace PepperDash.Core
public string Hostname { get; set; }
/// <summary>
/// Gets or sets the Port
/// The port number on which the server is listening.
/// </summary>
public int Port { get; set; }
@ -113,7 +113,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the SharedKey
/// SharedKey is sent for verification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
/// </summary>
public string SharedKey { get; set; }
@ -123,7 +123,7 @@ namespace PepperDash.Core
private bool WaitingForSharedKeyResponse { get; set; }
/// <summary>
/// Gets or sets the BufferSize
/// Defaults to 2000
/// </summary>
public int BufferSize { get; set; }
@ -336,8 +336,9 @@ namespace PepperDash.Core
#region Methods
/// <summary>
/// Initialize method
/// Initializes the client's key property, which is used to identify this client instance.
/// </summary>
/// <param name="key">The unique key that identifies this client instance.</param>
public void Initialize(string key)
{
Key = key;
@ -346,7 +347,7 @@ namespace PepperDash.Core
/// <summary>
/// Initialize called by the constructor that accepts a client config object. Can be called later to reset properties of client.
/// </summary>
/// <param name="clientConfigObject"></param>
/// <param name="clientConfigObject">The configuration object containing the client's settings.</param>
public void Initialize(TcpClientConfigObject clientConfigObject)
{
try
@ -387,7 +388,7 @@ namespace PepperDash.Core
{
if (programEventType == eProgramStatusEventType.Stopping || programEventType == eProgramStatusEventType.Paused)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Program stopping. Closing Client connection");
this.LogInformation("Program stopping. Closing Client connection");
ProgramIsStopping = true;
Disconnect();
}
@ -395,22 +396,22 @@ namespace PepperDash.Core
}
/// <summary>
/// Connect method
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
/// </summary>
public void Connect()
{
ConnectionCount++;
Debug.Console(2, this, "Attempting connect Count:{0}", ConnectionCount);
this.LogVerbose("Attempting connect Count:{0}", ConnectionCount);
if (IsConnected)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Already connected. Ignoring.");
this.LogInformation("Already connected. Ignoring.");
return;
}
if (IsTryingToConnect)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Already trying to connect. Ignoring.");
this.LogInformation("Already trying to connect. Ignoring.");
return;
}
try
@ -423,17 +424,17 @@ namespace PepperDash.Core
}
if (string.IsNullOrEmpty(Hostname))
{
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "DynamicTcpClient: No address set");
this.LogWarning("DynamicTcpClient: No address set");
return;
}
if (Port < 1 || Port > 65535)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "DynamicTcpClient: Invalid port");
this.LogWarning("DynamicTcpClient: Invalid port");
return;
}
if (string.IsNullOrEmpty(SharedKey) && SharedKeyRequired)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Warning, "DynamicTcpClient: No Shared Key set");
this.LogWarning("DynamicTcpClient: No Shared Key set");
return;
}
@ -456,7 +457,7 @@ namespace PepperDash.Core
ConnectFailTimer = new CTimer(o =>
{
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Connect attempt has not finished after 30sec Count:{0}", ConnectionCount);
this.LogError("Connect attempt has not finished after 30sec Count:{0}", ConnectionCount);
if (IsTryingToConnect)
{
IsTryingToConnect = false;
@ -470,10 +471,10 @@ namespace PepperDash.Core
}
}, 30000);
Debug.Console(2, this, "Making Connection Count:{0}", ConnectionCount);
this.LogVerbose("Making Connection Count:{0}", ConnectionCount);
Client.ConnectToServerAsync(o =>
{
Debug.Console(2, this, "ConnectToServerAsync Count:{0} Ran!", ConnectionCount);
this.LogVerbose("ConnectToServerAsync Count:{0} Ran!", ConnectionCount);
if (ConnectFailTimer != null)
{
@ -483,7 +484,7 @@ namespace PepperDash.Core
if (o.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED)
{
Debug.Console(2, this, "Client connected to {0} on port {1}", o.AddressClientConnectedTo, o.LocalPortNumberOfClient);
this.LogVerbose("Client connected to {0} on port {1}", o.AddressClientConnectedTo, o.LocalPortNumberOfClient);
o.ReceiveDataAsync(Receive);
if (SharedKeyRequired)
@ -492,7 +493,7 @@ namespace PepperDash.Core
WaitForSharedKey = new CTimer(timer =>
{
Debug.Console(1, this, Debug.ErrorLogLevel.Warning, "Shared key exchange timer expired. IsReadyForCommunication={0}", IsReadyForCommunication);
this.LogWarning("Shared key exchange timer expired. IsReadyForCommunication={0}", IsReadyForCommunication);
// Debug.Console(1, this, "Connect attempt failed {0}", c.ClientStatus);
// This is the only case where we should call DisconectFromServer...Event handeler will trigger the cleanup
o.DisconnectFromServer();
@ -512,21 +513,21 @@ namespace PepperDash.Core
}
else
{
Debug.Console(1, this, "Connect attempt failed {0}", o.ClientStatus);
this.LogWarning("Connect attempt failed {0}", o.ClientStatus);
CheckClosedAndTryReconnect();
}
});
}
catch (Exception ex)
{
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Client connection exception: {0}", ex.Message);
this.LogError("Client connection exception: {0}", ex.Message);
IsTryingToConnect = false;
CheckClosedAndTryReconnect();
}
}
/// <summary>
/// Disconnect method
///
/// </summary>
public void Disconnect()
{
@ -556,7 +557,7 @@ namespace PepperDash.Core
if (Client != null)
{
//SecureClient.DisconnectFromServer();
Debug.Console(2, this, "Disconnecting Client {0}", DisconnectCalledByUser ? ", Called by user" : "");
this.LogVerbose("Disconnecting Client {0}", DisconnectCalledByUser ? ", Called by user" : "");
Client.SocketStatusChange -= Client_SocketStatusChange;
Client.Dispose();
Client = null;
@ -578,14 +579,14 @@ namespace PepperDash.Core
{
if (Client != null)
{
Debug.Console(2, this, "Cleaning up remotely closed/failed connection.");
this.LogVerbose("Cleaning up remotely closed/failed connection.");
Cleanup();
}
if (!DisconnectCalledByUser && AutoReconnect)
{
var halfInterval = AutoReconnectIntervalMs / 2;
var rndTime = new Random().Next(-halfInterval, halfInterval) + AutoReconnectIntervalMs;
Debug.Console(2, this, "Attempting reconnect in {0} ms, randomized", rndTime);
this.LogVerbose("Attempting reconnect in {0} ms, randomized", rndTime);
if (RetryTimer != null)
{
RetryTimer.Stop();
@ -612,13 +613,13 @@ namespace PepperDash.Core
{
var bytes = client.IncomingDataBuffer.Take(numBytes).ToArray();
str = Encoding.GetEncoding(28591).GetString(bytes, 0, bytes.Length);
Debug.Console(2, this, "Client Received:\r--------\r{0}\r--------", str);
this.LogVerbose("Client Received:\r--------\r{0}\r--------", str);
if (!string.IsNullOrEmpty(checkHeartbeat(str)))
{
if (SharedKeyRequired && str == "SharedKey:")
{
Debug.Console(2, this, "Server asking for shared key, sending");
this.LogVerbose("Server asking for shared key, sending");
SendText(SharedKey + "\n");
}
else if (SharedKeyRequired && str == "Shared Key Match")
@ -626,7 +627,7 @@ namespace PepperDash.Core
StopWaitForSharedKeyTimer();
Debug.Console(2, this, "Shared key confirmed. Ready for communication");
this.LogVerbose("Shared key confirmed. Ready for communication");
OnClientReadyForcommunications(true); // Successful key exchange
}
else
@ -646,7 +647,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(1, this, "Error receiving data: {1}. Error: {0}", ex.Message, str);
this.LogError("Error receiving data: {1}. Error: {0}", ex.Message, str);
}
if (client.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED)
client.ReceiveDataAsync(Receive);
@ -686,7 +687,7 @@ namespace PepperDash.Core
}
catch (Exception e)
{
this.LogException(e, "DequeueEvent error");
this.LogError("DequeueEvent error: {0}", e.Message, e);
}
// Make sure to leave the CCritical section in case an exception above stops this thread, or we won't be able to restart it.
if (DequeueLock != null)
@ -699,7 +700,7 @@ namespace PepperDash.Core
{
if (HeartbeatEnabled)
{
Debug.Console(2, this, "Starting Heartbeat");
this.LogVerbose("Starting Heartbeat");
if (HeartbeatSendTimer == null)
{
@ -717,13 +718,13 @@ namespace PepperDash.Core
if (HeartbeatSendTimer != null)
{
Debug.Console(2, this, "Stoping Heartbeat Send");
this.LogVerbose("Stopping Heartbeat Send");
HeartbeatSendTimer.Stop();
HeartbeatSendTimer = null;
}
if (HeartbeatAckTimer != null)
{
Debug.Console(2, this, "Stoping Heartbeat Ack");
this.LogVerbose("Stopping Heartbeat Ack");
HeartbeatAckTimer.Stop();
HeartbeatAckTimer = null;
}
@ -732,7 +733,7 @@ namespace PepperDash.Core
void SendHeartbeat(object notused)
{
this.SendText(HeartbeatString);
Debug.Console(2, this, "Sending Heartbeat");
this.LogVerbose("Sending Heartbeat");
}
@ -757,7 +758,7 @@ namespace PepperDash.Core
{
HeartbeatAckTimer = new CTimer(HeartbeatAckTimerFail, null, (HeartbeatInterval * 2), (HeartbeatInterval * 2));
}
Debug.Console(2, this, "Heartbeat Received: {0}, from Server", HeartbeatString);
this.LogVerbose("Heartbeat Received: {0}, from Server", HeartbeatString);
return remainingText;
}
}
@ -765,7 +766,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(1, this, "Error checking heartbeat: {0}", ex.Message);
this.LogError("Error checking heartbeat: {0}", ex.Message, ex);
}
return received;
}
@ -779,7 +780,7 @@ namespace PepperDash.Core
if (IsConnected)
{
Debug.Console(1, Debug.ErrorLogLevel.Warning, "Heartbeat not received from Server...DISCONNECTING BECAUSE HEARTBEAT REQUIRED IS TRUE");
this.LogWarning("Heartbeat not received from Server...DISCONNECTING BECAUSE HEARTBEAT REQUIRED IS TRUE");
SendText("Heartbeat not received by server, closing connection");
CheckClosedAndTryReconnect();
}
@ -787,7 +788,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
ErrorLog.Error("Heartbeat timeout Error on Client: {0}, {1}", Key, ex);
this.LogError("Heartbeat timeout Error on Client: {0}, {1}", Key, ex);
}
}
@ -804,7 +805,7 @@ namespace PepperDash.Core
}
/// <summary>
/// SendText method
/// General send method
/// </summary>
public void SendText(string text)
{
@ -820,20 +821,20 @@ namespace PepperDash.Core
// HOW IN THE HELL DO WE CATCH AN EXCEPTION IN SENDING?????
if (n <= 0)
{
Debug.Console(1, Debug.ErrorLogLevel.Warning, "[{0}] Sent zero bytes. Was there an error?", this.Key);
this.LogWarning("[{0}] Sent zero bytes. Was there an error?", this.Key);
}
});
}
}
catch (Exception ex)
{
Debug.Console(0, this, "Error sending text: {1}. Error: {0}", ex.Message, text);
this.LogError("Error sending text: {1}. Error: {0}", text, ex.Message);
}
}
}
/// <summary>
/// SendBytes method
///
/// </summary>
public void SendBytes(byte[] bytes)
{
@ -846,7 +847,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(0, this, "Error sending bytes. Error: {0}", ex.Message);
this.LogError("Error sending bytes. Error: {0}", ex.Message, ex);
}
}
}
@ -865,7 +866,7 @@ namespace PepperDash.Core
}
try
{
Debug.Console(2, this, "Socket status change: {0} ({1})", client.ClientStatus, (ushort)(client.ClientStatus));
this.LogDebug("Socket status change: {0} ({1})", client.ClientStatus, (ushort)(client.ClientStatus));
OnConnectionChange();
// The client could be null or disposed by this time...
@ -878,7 +879,7 @@ namespace PepperDash.Core
}
catch (Exception ex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Error in socket status change callback. Error: {0}\r\r{1}", ex, ex.InnerException);
this.LogError("Error in socket status change callback. Error: {0}\r\r{1}", ex, ex.InnerException);
}
}
@ -905,5 +906,3 @@ namespace PepperDash.Core
}
#endregion
}
}

View file

@ -17,8 +17,8 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronSockets;
using PepperDash.Core.Logging;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Generic secure TCP/IP server
/// </summary>
@ -58,7 +58,7 @@ namespace PepperDash.Core
public ServerHasChokedCallbackDelegate ServerHasChoked { get; set; }
/// <summary>
/// Delegate for ServerHasChokedCallbackDelegate
///
/// </summary>
public delegate void ServerHasChokedCallbackDelegate();
@ -104,7 +104,7 @@ namespace PepperDash.Core
int MonitorClientFailureCount;
/// <summary>
/// Gets or sets the MonitorClientMaxFailureCount
/// 3 by default
/// </summary>
public int MonitorClientMaxFailureCount { get; set; }
@ -190,7 +190,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the Port
/// Port Server should listen on
/// </summary>
public int Port { get; set; }
@ -223,7 +223,8 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the SharedKey
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module.
/// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called
/// </summary>
public string SharedKey { get; set; }
@ -247,7 +248,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the HeartbeatRequiredIntervalMs
/// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+
/// </summary>
public int HeartbeatRequiredIntervalMs { get; set; }
@ -257,7 +258,7 @@ namespace PepperDash.Core
public ushort HeartbeatRequiredIntervalInSeconds { set { HeartbeatRequiredIntervalMs = (value * 1000); } }
/// <summary>
/// Gets or sets the HeartbeatStringToMatch
/// String to Match for heartbeat. If null or empty any string will reset heartbeat timer
/// </summary>
public string HeartbeatStringToMatch { get; set; }
@ -275,7 +276,7 @@ namespace PepperDash.Core
public List<uint> ConnectedClientsIndexes = new List<uint>();
/// <summary>
/// Gets or sets the BufferSize
/// Defaults to 2000
/// </summary>
public int BufferSize { get; set; }
@ -338,7 +339,7 @@ namespace PepperDash.Core
#region Methods - Server Actions
/// <summary>
/// KillServer method
/// Disconnects all clients and stops the server
/// </summary>
public void KillServer()
{
@ -355,9 +356,6 @@ namespace PepperDash.Core
/// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+
/// </summary>
/// <param name="key"></param>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@ -397,7 +395,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Listen method
/// Start listening on the specified port
/// </summary>
public void Listen()
{
@ -455,7 +453,7 @@ namespace PepperDash.Core
}
/// <summary>
/// StopListening method
/// Stop Listeneing
/// </summary>
public void StopListening()
{
@ -480,9 +478,6 @@ namespace PepperDash.Core
/// Disconnects Client
/// </summary>
/// <param name="client"></param>
/// <summary>
/// DisconnectClient method
/// </summary>
public void DisconnectClient(uint client)
{
try
@ -496,7 +491,7 @@ namespace PepperDash.Core
}
}
/// <summary>
/// DisconnectAllClientsForShutdown method
/// Disconnect All Clients
/// </summary>
public void DisconnectAllClientsForShutdown()
{
@ -538,9 +533,6 @@ namespace PepperDash.Core
/// Broadcast text from server to all connected clients
/// </summary>
/// <param name="text"></param>
/// <summary>
/// BroadcastText method
/// </summary>
public void BroadcastText(string text)
{
CCriticalSection CCBroadcast = new CCriticalSection();
@ -574,9 +566,6 @@ namespace PepperDash.Core
/// </summary>
/// <param name="text"></param>
/// <param name="clientIndex"></param>
/// <summary>
/// SendTextToClient method
/// </summary>
public void SendTextToClient(string text, uint clientIndex)
{
try
@ -645,9 +634,6 @@ namespace PepperDash.Core
/// </summary>
/// <param name="clientIndex"></param>
/// <returns></returns>
/// <summary>
/// GetClientIPAddress method
/// </summary>
public string GetClientIPAddress(uint clientIndex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex);
@ -911,7 +897,7 @@ namespace PepperDash.Core
}
catch (Exception e)
{
this.LogException(e, "DequeueEvent error");
this.LogError(e, "DequeueEvent error");
}
// Make sure to leave the CCritical section in case an exception above stops this thread, or we won't be able to restart it.
if (DequeueLock != null)
@ -1095,4 +1081,3 @@ namespace PepperDash.Core
}
#endregion
}
}

View file

@ -9,15 +9,14 @@ using PepperDash.Core.Logging;
using Renci.SshNet;
using Renci.SshNet.Common;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// SSH Client
///
/// </summary>
public class GenericSshClient : Device, ISocketStatusWithStreamDebugging, IAutoReconnect
{
private const string SPlusKey = "Uninitialized SshClient";
/// <summary>
/// Object to enable stream debugging
/// </summary>
@ -38,8 +37,13 @@ namespace PepperDash.Core
/// </summary>
public event EventHandler<GenericSocketStatusChageEventArgs> ConnectionChange;
///// <summary>
/////
///// </summary>
//public event GenericSocketStatusChangeEventDelegate SocketStatusChange;
/// <summary>
/// Gets or sets the Hostname
/// Address of server
/// </summary>
public string Hostname { get; set; }
@ -49,12 +53,12 @@ namespace PepperDash.Core
public int Port { get; set; }
/// <summary>
/// Gets or sets the Username
/// Username for server
/// </summary>
public string Username { get; set; }
/// <summary>
/// Gets or sets the Password
/// And... Password for server. That was worth documenting!
/// </summary>
public string Password { get; set; }
@ -64,7 +68,7 @@ namespace PepperDash.Core
public bool IsConnected
{
// returns false if no client or not connected
get { return client != null && ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED; }
get { return Client != null && ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED; }
}
/// <summary>
@ -76,30 +80,20 @@ namespace PepperDash.Core
}
/// <summary>
/// Socket status change event
/// SSH Client
/// </summary>
public SocketStatus ClientStatus
{
get { lock (_stateLock) { return _ClientStatus; } }
get { return _ClientStatus; }
private set
{
bool shouldFireEvent = false;
lock (_stateLock)
{
if (_ClientStatus != value)
{
if (_ClientStatus == value)
return;
_ClientStatus = value;
shouldFireEvent = true;
}
}
// Fire event outside lock to avoid deadlock
if (shouldFireEvent)
OnConnectionChange();
}
}
private SocketStatus _ClientStatus;
private bool _ConnectEnabled;
SocketStatus _ClientStatus;
/// <summary>
/// Contains the familiar Simpl analog status values. This drives the ConnectionChange event
@ -107,7 +101,7 @@ namespace PepperDash.Core
/// </summary>
public ushort UStatus
{
get { lock (_stateLock) { return (ushort)_ClientStatus; } }
get { return (ushort)_ClientStatus; }
}
/// <summary>
@ -118,11 +112,7 @@ namespace PepperDash.Core
/// <summary>
/// Will be set and unset by connect and disconnect only
/// </summary>
public bool ConnectEnabled
{
get { lock (_stateLock) { return _ConnectEnabled; } }
private set { lock (_stateLock) { _ConnectEnabled = value; } }
}
public bool ConnectEnabled { get; private set; }
/// <summary>
/// S+ helper for AutoReconnect
@ -134,29 +124,22 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the AutoReconnectIntervalMs
/// Millisecond value, determines the timeout period in between reconnect attempts.
/// Set to 5000 by default
/// </summary>
public int AutoReconnectIntervalMs { get; set; }
private SshClient client;
SshClient Client;
private ShellStream shellStream;
ShellStream TheStream;
private readonly Timer reconnectTimer;
CTimer ReconnectTimer;
//Lock object to prevent simulatneous connect/disconnect operations
//private CCriticalSection connectLock = new CCriticalSection();
private readonly SemaphoreSlim connectLock = new SemaphoreSlim(1);
private SemaphoreSlim connectLock = new SemaphoreSlim(1);
// Thread-safety lock for state changes
private readonly object _stateLock = new object();
private bool disconnectLogged = false;
/// <summary>
/// When true, turns off echo for the SSH session
/// </summary>
public bool DisableEcho { get; set; }
private bool DisconnectLogged = false;
/// <summary>
/// Typical constructor.
@ -173,13 +156,13 @@ namespace PepperDash.Core
Password = password;
AutoReconnectIntervalMs = 5000;
reconnectTimer = new Timer(o =>
ReconnectTimer = new CTimer(o =>
{
if (ConnectEnabled) // Now thread-safe property access
if (ConnectEnabled)
{
Connect();
}
}, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
}, System.Threading.Timeout.Infinite);
}
/// <summary>
@ -191,23 +174,23 @@ namespace PepperDash.Core
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
AutoReconnectIntervalMs = 5000;
reconnectTimer = new Timer(o =>
ReconnectTimer = new CTimer(o =>
{
if (ConnectEnabled) // Now thread-safe property access
if (ConnectEnabled)
{
Connect();
}
}, null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
}, System.Threading.Timeout.Infinite);
}
/// <summary>
/// Handles closing this up when the program shuts down
/// </summary>
private void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType)
void CrestronEnvironment_ProgramStatusEventHandler(eProgramStatusEventType programEventType)
{
if (programEventType == eProgramStatusEventType.Stopping)
{
if (client != null)
if (Client != null)
{
this.LogDebug("Program stopping. Closing connection");
Disconnect();
@ -216,7 +199,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Connect method
/// Connect to the server, using the provided properties.
/// </summary>
public void Connect()
{
@ -242,10 +225,13 @@ namespace PepperDash.Core
this.LogDebug("Attempting connect");
// Cancel reconnect if running.
StopReconnectTimer();
if (ReconnectTimer != null)
{
ReconnectTimer.Stop();
}
// Cleanup the old client if it already exists
if (client != null)
if (Client != null)
{
this.LogDebug("Cleaning up disconnected client");
KillClient(SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY);
@ -258,90 +244,77 @@ namespace PepperDash.Core
this.LogDebug("Creating new SshClient");
ConnectionInfo connectionInfo = new ConnectionInfo(Hostname, Port, Username, pauth, kauth);
client = new SshClient(connectionInfo);
client.ErrorOccurred += Client_ErrorOccurred;
Client = new SshClient(connectionInfo);
Client.ErrorOccurred += Client_ErrorOccurred;
//Attempt to connect
ClientStatus = SocketStatus.SOCKET_STATUS_WAITING;
try
{
client.Connect();
var modes = new Dictionary<TerminalModes, uint>();
if (DisableEcho)
{
modes.Add(TerminalModes.ECHO, 0);
}
shellStream = client.CreateShellStream("PDTShell", 0, 0, 0, 0, 65534, modes);
if (shellStream.DataAvailable)
Client.Connect();
TheStream = Client.CreateShellStream("PDTShell", 0, 0, 0, 0, 65534);
if (TheStream.DataAvailable)
{
// empty the buffer if there is data
shellStream.Read();
string str = TheStream.Read();
}
shellStream.DataReceived += Stream_DataReceived;
TheStream.DataReceived += Stream_DataReceived;
this.LogInformation("Connected");
ClientStatus = SocketStatus.SOCKET_STATUS_CONNECTED;
disconnectLogged = false;
DisconnectLogged = false;
}
catch (SshConnectionException e)
{
var ie = e.InnerException; // The details are inside!!
var errorLogLevel = DisconnectLogged == true ? Debug.ErrorLogLevel.None : Debug.ErrorLogLevel.Error;
if (ie is SocketException)
{
this.LogError("CONNECTION failure: Cannot reach host");
this.LogVerbose(ie, "Exception details: ");
this.LogException(ie, "CONNECTION failure: Cannot reach host");
}
if (ie is System.Net.Sockets.SocketException socketException)
{
this.LogError("Connection failure: Cannot reach {host} on {port}",
this.LogException(ie, "Connection failure: Cannot reach {host} on {port}",
Hostname, Port);
this.LogVerbose(socketException, "SocketException details: ");
}
if (ie is SshAuthenticationException)
{
this.LogError("Authentication failure for username {userName}", Username);
this.LogVerbose(ie, "AuthenticationException details: ");
this.LogException(ie, "Authentication failure for username {userName}", Username);
}
else
{
this.LogError("Error on connect: {error}", ie.Message);
this.LogVerbose(ie, "Exception details: ");
}
this.LogException(ie, "Error on connect");
disconnectLogged = true;
DisconnectLogged = true;
KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED);
if (AutoReconnect)
{
this.LogDebug("Checking autoreconnect: {autoReconnect}, {autoReconnectInterval}ms", AutoReconnect, AutoReconnectIntervalMs);
StartReconnectTimer();
ReconnectTimer.Reset(AutoReconnectIntervalMs);
}
}
catch (SshOperationTimeoutException ex)
{
this.LogWarning("Connection attempt timed out: {message}", ex.Message);
disconnectLogged = true;
DisconnectLogged = true;
KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED);
if (AutoReconnect)
{
this.LogDebug("Checking autoreconnect: {0}, {1}ms", AutoReconnect, AutoReconnectIntervalMs);
StartReconnectTimer();
ReconnectTimer.Reset(AutoReconnectIntervalMs);
}
}
catch (Exception e)
{
this.LogError("Unhandled exception on connect: {error}", e.Message);
this.LogVerbose(e, "Exception details: ");
disconnectLogged = true;
var errorLogLevel = DisconnectLogged == true ? Debug.ErrorLogLevel.None : Debug.ErrorLogLevel.Error;
this.LogException(e, "Unhandled exception on connect");
DisconnectLogged = true;
KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED);
if (AutoReconnect)
{
this.LogDebug("Checking autoreconnect: {0}, {1}ms", AutoReconnect, AutoReconnectIntervalMs);
StartReconnectTimer();
ReconnectTimer.Reset(AutoReconnectIntervalMs);
}
}
}
@ -359,7 +332,7 @@ namespace PepperDash.Core
{
ConnectEnabled = false;
// Stop trying reconnects, if we are
StopReconnectTimer();
ReconnectTimer.Stop();
KillClient(SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY);
}
@ -373,12 +346,12 @@ namespace PepperDash.Core
try
{
if (client != null)
if (Client != null)
{
client.ErrorOccurred -= Client_ErrorOccurred;
client.Disconnect();
client.Dispose();
client = null;
Client.ErrorOccurred -= Client_ErrorOccurred;
Client.Disconnect();
Client.Dispose();
Client = null;
ClientStatus = status;
this.LogDebug("Disconnected");
}
@ -392,16 +365,16 @@ namespace PepperDash.Core
/// <summary>
/// Kills the stream
/// </summary>
private void KillStream()
void KillStream()
{
try
{
if (shellStream != null)
if (TheStream != null)
{
shellStream.DataReceived -= Stream_DataReceived;
shellStream.Close();
shellStream.Dispose();
shellStream = null;
TheStream.DataReceived -= Stream_DataReceived;
TheStream.Close();
TheStream.Dispose();
TheStream = null;
this.LogDebug("Disconnected stream");
}
}
@ -414,7 +387,7 @@ namespace PepperDash.Core
/// <summary>
/// Handles the keyboard interactive authentication, should it be required.
/// </summary>
private void kauth_AuthenticationPrompt(object sender, AuthenticationPromptEventArgs e)
void kauth_AuthenticationPrompt(object sender, AuthenticationPromptEventArgs e)
{
foreach (AuthenticationPrompt prompt in e.Prompts)
if (prompt.Request.IndexOf("Password:", StringComparison.InvariantCultureIgnoreCase) != -1)
@ -424,7 +397,7 @@ namespace PepperDash.Core
/// <summary>
/// Handler for data receive on ShellStream. Passes data across to queue for line parsing.
/// </summary>
private void Stream_DataReceived(object sender, ShellDataEventArgs e)
void Stream_DataReceived(object sender, ShellDataEventArgs e)
{
if (((ShellStream)sender).Length <= 0L)
{
@ -437,14 +410,18 @@ namespace PepperDash.Core
if (bytesHandler != null)
{
var bytes = Encoding.UTF8.GetBytes(response);
this.PrintReceivedBytes(bytes);
if (StreamDebugging.RxStreamDebuggingIsEnabled)
{
this.LogInformation("Received {1} bytes: '{0}'", ComTextHelper.GetEscapedText(bytes), bytes.Length);
}
bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes));
}
var textHandler = TextReceived;
if (textHandler != null)
{
this.PrintReceivedText(response);
if (StreamDebugging.RxStreamDebuggingIsEnabled)
this.LogInformation("Received: '{0}'", ComTextHelper.GetDebugText(response));
textHandler(this, new GenericCommMethodReceiveTextArgs(response));
}
@ -456,7 +433,7 @@ namespace PepperDash.Core
/// Error event handler for client events - disconnect, etc. Will forward those events via ConnectionChange
/// event
/// </summary>
private void Client_ErrorOccurred(object sender, ExceptionEventArgs e)
void Client_ErrorOccurred(object sender, ExceptionEventArgs e)
{
CrestronInvoke.BeginInvoke(o =>
{
@ -476,7 +453,7 @@ namespace PepperDash.Core
if (AutoReconnect && ConnectEnabled)
{
this.LogDebug("Checking autoreconnect: {0}, {1}ms", AutoReconnect, AutoReconnectIntervalMs);
StartReconnectTimer();
ReconnectTimer.Reset(AutoReconnectIntervalMs);
}
});
}
@ -484,9 +461,10 @@ namespace PepperDash.Core
/// <summary>
/// Helper for ConnectionChange event
/// </summary>
private void OnConnectionChange()
void OnConnectionChange()
{
ConnectionChange?.Invoke(this, new GenericSocketStatusChageEventArgs(this));
if (ConnectionChange != null)
ConnectionChange(this, new GenericSocketStatusChageEventArgs(this));
}
#region IBasicCommunication Members
@ -494,17 +472,21 @@ namespace PepperDash.Core
/// <summary>
/// Sends text to the server
/// </summary>
/// <param name="text">The text to send</param>
/// <param name="text"></param>
public void SendText(string text)
{
try
{
if (client != null && shellStream != null && IsConnected)
if (Client != null && TheStream != null && IsConnected)
{
this.PrintSentText(text);
if (StreamDebugging.TxStreamDebuggingIsEnabled)
this.LogInformation(
"Sending {length} characters of text: '{text}'",
text.Length,
ComTextHelper.GetDebugText(text));
shellStream.Write(text);
shellStream.Flush();
TheStream.Write(text);
TheStream.Flush();
}
else
{
@ -516,7 +498,7 @@ namespace PepperDash.Core
this.LogError("ObjectDisposedException sending '{message}'. Restarting connection...", text.Trim());
KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED);
StartReconnectTimer();
ReconnectTimer.Reset();
}
catch (Exception ex)
{
@ -527,17 +509,18 @@ namespace PepperDash.Core
/// <summary>
/// Sends Bytes to the server
/// </summary>
/// <param name="bytes">The bytes to send</param>
/// <param name="bytes"></param>
public void SendBytes(byte[] bytes)
{
try
{
if (client != null && shellStream != null && IsConnected)
if (Client != null && TheStream != null && IsConnected)
{
this.PrintSentBytes(bytes);
if (StreamDebugging.TxStreamDebuggingIsEnabled)
this.LogInformation("Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
shellStream.Write(bytes, 0, bytes.Length);
shellStream.Flush();
TheStream.Write(bytes, 0, bytes.Length);
TheStream.Flush();
}
else
{
@ -549,7 +532,7 @@ namespace PepperDash.Core
this.LogException(ex, "ObjectDisposedException sending {message}", ComTextHelper.GetEscapedText(bytes));
KillClient(SocketStatus.SOCKET_STATUS_CONNECT_FAILED);
StartReconnectTimer();
ReconnectTimer.Reset();
}
catch (Exception ex)
{
@ -558,89 +541,10 @@ namespace PepperDash.Core
}
#endregion
/// <summary>
/// Safely starts the reconnect timer with exception handling
/// </summary>
private void StartReconnectTimer()
{
try
{
reconnectTimer?.Change(AutoReconnectIntervalMs, System.Threading.Timeout.Infinite);
}
catch (ObjectDisposedException)
{
// Timer was disposed, ignore
this.LogDebug("Attempted to start timer but it was already disposed");
}
}
/// <summary>
/// Safely stops the reconnect timer with exception handling
/// </summary>
private void StopReconnectTimer()
{
try
{
reconnectTimer?.Change(System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite);
}
catch (ObjectDisposedException)
{
// Timer was disposed, ignore
this.LogDebug("Attempted to stop timer but it was already disposed");
}
}
/// <summary>
/// Deactivate method - properly dispose of resources
/// </summary>
public override bool Deactivate()
{
try
{
this.LogDebug("Deactivating SSH client - disposing resources");
// Stop trying reconnects
ConnectEnabled = false;
StopReconnectTimer();
// Disconnect and cleanup client
KillClient(SocketStatus.SOCKET_STATUS_BROKEN_LOCALLY);
// Dispose timer
try
{
reconnectTimer?.Dispose();
}
catch (ObjectDisposedException)
{
// Already disposed, ignore
}
// Dispose semaphore
try
{
connectLock?.Dispose();
}
catch (ObjectDisposedException)
{
// Already disposed, ignore
}
return base.Deactivate();
}
catch (Exception ex)
{
this.LogException(ex, "Error during SSH client deactivation");
return false;
}
}
}
//*****************************************************************************************************
//*****************************************************************************************************
/// <summary>
/// Represents a SshConnectionChangeEventArgs
/// Fired when connection changes
/// </summary>
public class SshConnectionChangeEventArgs : EventArgs
{
@ -650,17 +554,17 @@ namespace PepperDash.Core
public bool IsConnected { get; private set; }
/// <summary>
/// Gets or sets the UIsConnected
/// Connection Status represented as a ushort
/// </summary>
public ushort UIsConnected { get { return (ushort)(Client.IsConnected ? 1 : 0); } }
/// <summary>
/// Gets or sets the Client
/// The client
/// </summary>
public GenericSshClient Client { get; private set; }
/// <summary>
/// Gets or sets the Status
/// Socket Status as represented by
/// </summary>
public ushort Status { get { return Client.UStatus; } }

View file

@ -9,8 +9,8 @@ using Crestron.SimplSharp.CrestronSockets;
using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
using Required = NewtonsoftJson::Newtonsoft.Json.Required;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// A class to handle basic TCP/IP communications with a server
/// </summary>
@ -62,7 +62,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the Port
/// Port on server
/// </summary>
public int Port { get; set; }
@ -235,7 +235,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Initialize method
/// Just to help S+ set the key
/// </summary>
public void Initialize(string key)
{
@ -258,9 +258,6 @@ namespace PepperDash.Core
///
/// </summary>
/// <returns></returns>
/// <summary>
/// Deactivate method
/// </summary>
public override bool Deactivate()
{
RetryTimer.Stop();
@ -274,7 +271,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Connect method
/// Attempts to connect to the server
/// </summary>
public void Connect()
{
@ -341,7 +338,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Disconnect method
/// Attempts to disconnect the client
/// </summary>
public void Disconnect()
{
@ -361,7 +358,7 @@ namespace PepperDash.Core
}
/// <summary>
/// DisconnectClient method
/// Does the actual disconnect business
/// </summary>
public void DisconnectClient()
{
@ -429,7 +426,10 @@ namespace PepperDash.Core
var bytesHandler = BytesReceived;
if (bytesHandler != null)
{
this.PrintReceivedBytes(bytes);
if (StreamDebugging.RxStreamDebuggingIsEnabled)
{
Debug.Console(0, this, "Received {1} bytes: '{0}'", ComTextHelper.GetEscapedText(bytes), bytes.Length);
}
bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes));
}
var textHandler = TextReceived;
@ -437,7 +437,10 @@ namespace PepperDash.Core
{
var str = Encoding.GetEncoding(28591).GetString(bytes, 0, bytes.Length);
this.PrintReceivedText(str);
if (StreamDebugging.RxStreamDebuggingIsEnabled)
{
Debug.Console(0, this, "Received {1} characters of text: '{0}'", ComTextHelper.GetDebugText(str), str.Length);
}
textHandler(this, new GenericCommMethodReceiveTextArgs(str));
}
@ -447,13 +450,14 @@ namespace PepperDash.Core
}
/// <summary>
/// SendText method
/// General send method
/// </summary>
public void SendText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
// Check debug level before processing byte array
this.PrintSentText(text);
if (StreamDebugging.TxStreamDebuggingIsEnabled)
Debug.Console(0, this, "Sending {0} characters of text: '{1}'", text.Length, ComTextHelper.GetDebugText(text));
if (_client != null)
_client.SendData(bytes, bytes.Length);
}
@ -475,12 +479,10 @@ namespace PepperDash.Core
/// Sends Bytes to the server
/// </summary>
/// <param name="bytes"></param>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
this.PrintSentBytes(bytes);
if (StreamDebugging.TxStreamDebuggingIsEnabled)
Debug.Console(0, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
if (_client != null)
_client.SendData(bytes, bytes.Length);
}
@ -510,7 +512,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Represents a TcpSshPropertiesConfig
/// Configuration properties for TCP/SSH Connections
/// </summary>
public class TcpSshPropertiesConfig
{
@ -531,7 +533,7 @@ namespace PepperDash.Core
/// </summary>
public string Username { get; set; }
/// <summary>
/// Gets or sets the Password
/// Passord credential
/// </summary>
public string Password { get; set; }
@ -566,7 +568,6 @@ namespace PepperDash.Core
AutoReconnectIntervalMs = 5000;
Username = "";
Password = "";
DisableSshEcho = false;
}
}
}

View file

@ -19,8 +19,8 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronSockets;
using PepperDash.Core.Logging;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Generic TCP/IP client for server
/// </summary>
@ -69,7 +69,7 @@ namespace PepperDash.Core
public string Hostname { get; set; }
/// <summary>
/// Gets or sets the Port
/// Port on server
/// </summary>
public int Port { get; set; }
@ -102,7 +102,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the SharedKey
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module
/// </summary>
public string SharedKey { get; set; }
@ -112,7 +112,7 @@ namespace PepperDash.Core
private bool WaitingForSharedKeyResponse { get; set; }
/// <summary>
/// Gets or sets the BufferSize
/// Defaults to 2000
/// </summary>
public int BufferSize { get; set; }
@ -289,7 +289,7 @@ namespace PepperDash.Core
#region Methods
/// <summary>
/// Initialize method
/// Just to help S+ set the key
/// </summary>
public void Initialize(string key)
{
@ -311,7 +311,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Connect method
/// Connect Method. Will return if already connected. Will write errors if missing address, port, or unique key/name.
/// </summary>
public void Connect()
{
@ -442,7 +442,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Disconnect method
///
/// </summary>
public void Disconnect()
{
@ -669,7 +669,7 @@ namespace PepperDash.Core
}
/// <summary>
/// SendText method
/// General send method
/// </summary>
public void SendText(string text)
{
@ -698,7 +698,7 @@ namespace PepperDash.Core
}
/// <summary>
/// SendBytes method
///
/// </summary>
public void SendBytes(byte[] bytes)
{
@ -771,5 +771,3 @@ namespace PepperDash.Core
}
#endregion
}
}

View file

@ -17,8 +17,8 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronSockets;
using PepperDash.Core.Logging;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Generic TCP/IP server device
/// </summary>
@ -52,7 +52,7 @@ namespace PepperDash.Core
public ServerHasChokedCallbackDelegate ServerHasChoked { get; set; }
/// <summary>
/// Delegate for ServerHasChokedCallbackDelegate
///
/// </summary>
public delegate void ServerHasChokedCallbackDelegate();
@ -82,7 +82,7 @@ namespace PepperDash.Core
int MonitorClientFailureCount;
/// <summary>
/// Gets or sets the MonitorClientMaxFailureCount
/// 3 by default
/// </summary>
public int MonitorClientMaxFailureCount { get; set; }
@ -171,7 +171,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the Port
/// Port Server should listen on
/// </summary>
public int Port { get; set; }
@ -204,7 +204,8 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the SharedKey
/// SharedKey is sent for varification to the server. Shared key can be any text (255 char limit in SIMPL+ Module), but must match the Shared Key on the Server module.
/// If SharedKey changes while server is listening or clients are connected, disconnect and stop listening will be called
/// </summary>
public string SharedKey { get; set; }
@ -228,7 +229,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Gets or sets the HeartbeatRequiredIntervalMs
/// Milliseconds before server expects another heartbeat. Set by property HeartbeatRequiredIntervalInSeconds which is driven from S+
/// </summary>
public int HeartbeatRequiredIntervalMs { get; set; }
@ -238,7 +239,7 @@ namespace PepperDash.Core
public ushort HeartbeatRequiredIntervalInSeconds { set { HeartbeatRequiredIntervalMs = (value * 1000); } }
/// <summary>
/// Gets or sets the HeartbeatStringToMatch
/// String to Match for heartbeat. If null or empty any string will reset heartbeat timer
/// </summary>
public string HeartbeatStringToMatch { get; set; }
@ -256,7 +257,7 @@ namespace PepperDash.Core
public List<uint> ConnectedClientsIndexes = new List<uint>();
/// <summary>
/// Gets or sets the BufferSize
/// Defaults to 2000
/// </summary>
public int BufferSize { get; set; }
@ -319,7 +320,7 @@ namespace PepperDash.Core
#region Methods - Server Actions
/// <summary>
/// KillServer method
/// Disconnects all clients and stops the server
/// </summary>
public void KillServer()
{
@ -336,9 +337,6 @@ namespace PepperDash.Core
/// Initialize Key for device using client name from SIMPL+. Called on Listen from SIMPL+
/// </summary>
/// <param name="key"></param>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key)
{
Key = key;
@ -377,7 +375,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Listen method
/// Start listening on the specified port
/// </summary>
public void Listen()
{
@ -434,7 +432,7 @@ namespace PepperDash.Core
}
/// <summary>
/// StopListening method
/// Stop Listening
/// </summary>
public void StopListening()
{
@ -459,9 +457,6 @@ namespace PepperDash.Core
/// Disconnects Client
/// </summary>
/// <param name="client"></param>
/// <summary>
/// DisconnectClient method
/// </summary>
public void DisconnectClient(uint client)
{
try
@ -475,7 +470,7 @@ namespace PepperDash.Core
}
}
/// <summary>
/// DisconnectAllClientsForShutdown method
/// Disconnect All Clients
/// </summary>
public void DisconnectAllClientsForShutdown()
{
@ -517,9 +512,6 @@ namespace PepperDash.Core
/// Broadcast text from server to all connected clients
/// </summary>
/// <param name="text"></param>
/// <summary>
/// BroadcastText method
/// </summary>
public void BroadcastText(string text)
{
CCriticalSection CCBroadcast = new CCriticalSection();
@ -553,9 +545,6 @@ namespace PepperDash.Core
/// </summary>
/// <param name="text"></param>
/// <param name="clientIndex"></param>
/// <summary>
/// SendTextToClient method
/// </summary>
public void SendTextToClient(string text, uint clientIndex)
{
try
@ -624,9 +613,6 @@ namespace PepperDash.Core
/// </summary>
/// <param name="clientIndex"></param>
/// <returns>IP address of the client</returns>
/// <summary>
/// GetClientIPAddress method
/// </summary>
public string GetClientIPAddress(uint clientIndex)
{
Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "GetClientIPAddress Index: {0}", clientIndex);
@ -1022,4 +1008,3 @@ namespace PepperDash.Core
}
#endregion
}
}

View file

@ -11,8 +11,8 @@ using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
using PepperDash.Core.Logging;
using Required = NewtonsoftJson::Newtonsoft.Json.Required;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Generic UDP Server device
/// </summary>
@ -60,7 +60,7 @@ namespace PepperDash.Core
}
/// <summary>
///
/// Represents a GenericUdpReceiveTextExtraArgs
/// </summary>
public ushort UStatus
{
@ -134,14 +134,14 @@ namespace PepperDash.Core
/// <param name="key"></param>
/// <param name="address"></param>
/// <param name="port"></param>
/// <param name="bufferSize"></param>
public GenericUdpServer(string key, string address, int port, int bufferSize)
/// <param name="buffefSize"></param>
public GenericUdpServer(string key, string address, int port, int buffefSize)
: base(key)
{
StreamDebugging = new CommunicationStreamDebugging(key);
Hostname = address;
Port = port;
BufferSize = bufferSize;
BufferSize = buffefSize;
CrestronEnvironment.ProgramStatusEventHandler += new ProgramStatusEventHandler(CrestronEnvironment_ProgramStatusEventHandler);
CrestronEnvironment.EthernetEventHandler += new EthernetEventHandler(CrestronEnvironment_EthernetEventHandler);
@ -153,9 +153,6 @@ namespace PepperDash.Core
/// <param name="key"></param>
/// <param name="address"></param>
/// <param name="port"></param>
/// <summary>
/// Initialize method
/// </summary>
public void Initialize(string key, string address, ushort port)
{
Key = key;
@ -191,29 +188,15 @@ namespace PepperDash.Core
}
/// <summary>
/// Connect method
/// Enables the UDP Server
/// </summary>
public void Connect()
{
if (Server == null)
{
try
{
var address = IPAddress.Parse(Hostname);
Server = new UDPServer(address, Port, BufferSize);
}
catch (Exception ex)
{
this.LogError("Error parsing IP Address '{ipAddress}': message: {message}", Hostname, ex.Message);
this.LogInformation("Creating UDPServer with default buffersize");
Server = new UDPServer();
}
}
if (string.IsNullOrEmpty(Hostname))
{
Debug.Console(1, Debug.ErrorLogLevel.Warning, "GenericUdpServer '{0}': No address set", Key);
@ -242,7 +225,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Disconnect method
/// Disabled the UDP Server
/// </summary>
public void Disconnect()
{
@ -284,13 +267,17 @@ namespace PepperDash.Core
var bytesHandler = BytesReceived;
if (bytesHandler != null)
{
this.PrintReceivedBytes(bytes);
if (StreamDebugging.RxStreamDebuggingIsEnabled)
{
Debug.Console(0, this, "Received {1} bytes: '{0}'", ComTextHelper.GetEscapedText(bytes), bytes.Length);
}
bytesHandler(this, new GenericCommMethodReceiveBytesArgs(bytes));
}
var textHandler = TextReceived;
if (textHandler != null)
{
this.PrintReceivedText(str);
if (StreamDebugging.RxStreamDebuggingIsEnabled)
Debug.Console(0, this, "Received {1} characters of text: '{0}'", ComTextHelper.GetDebugText(str), str.Length);
textHandler(this, new GenericCommMethodReceiveTextArgs(str));
}
}
@ -308,16 +295,14 @@ namespace PepperDash.Core
/// General send method
/// </summary>
/// <param name="text"></param>
/// <summary>
/// SendText method
/// </summary>
public void SendText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
if (IsConnected && Server != null)
{
this.PrintSentText(text);
if (StreamDebugging.TxStreamDebuggingIsEnabled)
Debug.Console(0, this, "Sending {0} characters of text: '{1}'", text.Length, ComTextHelper.GetDebugText(text));
Server.SendData(bytes, bytes.Length);
}
@ -327,12 +312,10 @@ namespace PepperDash.Core
///
/// </summary>
/// <param name="bytes"></param>
/// <summary>
/// SendBytes method
/// </summary>
public void SendBytes(byte[] bytes)
{
this.PrintSentBytes(bytes);
if (StreamDebugging.TxStreamDebuggingIsEnabled)
Debug.Console(0, this, "Sending {0} bytes: '{1}'", bytes.Length, ComTextHelper.GetEscapedText(bytes));
if (IsConnected && Server != null)
Server.SendData(bytes, bytes.Length);
@ -341,7 +324,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Represents a GenericUdpReceiveTextExtraArgs
///
/// </summary>
public class GenericUdpReceiveTextExtraArgs : EventArgs
{
@ -413,4 +396,3 @@ namespace PepperDash.Core
BufferSize = 32768;
}
}
}

View file

@ -2,10 +2,10 @@
using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Represents a TcpClientConfigObject
/// Client config object for TCP client with server that inherits from TcpSshPropertiesConfig and adds properties for shared key and heartbeat
/// </summary>
public class TcpClientConfigObject
{
@ -58,4 +58,3 @@ namespace PepperDash.Core
[JsonProperty("receiveQueueSize")]
public int ReceiveQueueSize { get; set; }
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Tcp Server Config object with properties for a tcp server with shared key and heartbeat capabilities
/// </summary>
@ -57,4 +57,3 @@ namespace PepperDash.Core
/// </summary>
public int ReceiveQueueSize { get; set; }
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Crestron Control Methods for a comm object
/// </summary>
@ -76,12 +76,11 @@ namespace PepperDash.Core
/// </summary>
SecureTcpIp,
/// <summary>
/// Used when comms needs to be handled in SIMPL and bridged opposite the normal direction
/// Crestron COM bridge
/// </summary>
ComBridge,
/// <summary>
/// InfinetEX control
/// Crestron Infinet EX device
/// </summary>
InfinetEx
}
}

View file

@ -1,28 +0,0 @@
using System;
namespace PepperDash.Core
{
/// <summary>
/// The available settings for stream debugging
/// </summary>
[Flags]
public enum eStreamDebuggingSetting
{
/// <summary>
/// Debug off
/// </summary>
Off = 0,
/// <summary>
/// Debug received data
/// </summary>
Rx = 1,
/// <summary>
/// Debug transmitted data
/// </summary>
Tx = 2,
/// <summary>
/// Debug both received and transmitted data
/// </summary>
Both = Rx | Tx
}
}

View file

@ -2,14 +2,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Crestron.SimplSharp;
using Crestron.SimplSharp.CrestronSockets;
using JsonConverter = NewtonsoftJson::Newtonsoft.Json.JsonConverterAttribute;
using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
using StringEnumConverter = NewtonsoftJson::Newtonsoft.Json.Converters.StringEnumConverter;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// An incoming communication stream
/// </summary>
@ -40,7 +43,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Defines the contract for IBasicCommunication
/// Extends <see cref="ICommunicationReceiver"/> with methods for sending text and bytes to a device.
/// </summary>
public interface IBasicCommunication : ICommunicationReceiver
{
@ -144,17 +147,17 @@ namespace PepperDash.Core
public delegate void GenericCommMethodStatusHandler(IBasicCommunication comm, eGenericCommMethodStatusChangeType status);
/// <summary>
///
/// Event args for bytes received from a communication method
/// </summary>
public class GenericCommMethodReceiveBytesArgs : EventArgs
{
/// <summary>
/// Gets or sets the Bytes
/// The bytes received
/// </summary>
public byte[] Bytes { get; private set; }
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="bytes"></param>
public GenericCommMethodReceiveBytesArgs(byte[] bytes)
@ -169,20 +172,21 @@ namespace PepperDash.Core
}
/// <summary>
///
/// Event args for text received
/// </summary>
public class GenericCommMethodReceiveTextArgs : EventArgs
{
/// <summary>
///
/// The text received
/// </summary>
public string Text { get; private set; }
/// <summary>
///
/// The delimiter used to determine the end of a message, if applicable
/// </summary>
public string Delimiter { get; private set; }
/// <summary>
///
/// Constructor
/// </summary>
/// <param name="text"></param>
public GenericCommMethodReceiveTextArgs(string text)
@ -206,4 +210,42 @@ namespace PepperDash.Core
/// </summary>
public GenericCommMethodReceiveTextArgs() { }
}
/// <summary>
/// Helper class to get escaped text for debugging communication streams
/// </summary>
public class ComTextHelper
{
/// <summary>
/// Gets escaped text for a byte array
/// </summary>
/// <param name="bytes"></param>
/// <returns></returns>
public static string GetEscapedText(byte[] bytes)
{
return String.Concat(bytes.Select(b => string.Format(@"[{0:X2}]", (int)b)).ToArray());
}
/// <summary>
/// Gets escaped text for a string
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
public static string GetEscapedText(string text)
{
var bytes = Encoding.GetEncoding(28591).GetBytes(text);
return String.Concat(bytes.Select(b => string.Format(@"[{0:X2}]", (int)b)).ToArray());
}
/// <summary>
/// Gets debug text for a string
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
public static string GetDebugText(string text)
{
return Regex.Replace(text, @"[^\u0020-\u007E]", a => GetEscapedText(a.Value));
}
}

View file

@ -11,11 +11,7 @@ using JToken = NewtonsoftJson::Newtonsoft.Json.Linq.JToken;
using PepperDash.Core;
using Serilog.Events;
namespace PepperDash.Core.Config
{
namespace PepperDash.Core.Config;
/// <summary>
/// Reads a Portal formatted config file
@ -128,31 +124,31 @@ namespace PepperDash.Core.Config
Merge(template[destinationLists], system[destinationLists], destinationLists));
if (system[cameraLists] == null)
merged.Add(cameraLists, template[cameraLists]);
if (system["cameraLists"] == null)
merged.Add("cameraLists", template["cameraLists"]);
else
merged.Add(cameraLists, Merge(template[cameraLists], system[cameraLists], cameraLists));
merged.Add("cameraLists", Merge(template["cameraLists"], system["cameraLists"], "cameraLists"));
if (system[audioControlPointLists] == null)
merged.Add(audioControlPointLists, template[audioControlPointLists]);
if (system["audioControlPointLists"] == null)
merged.Add("audioControlPointLists", template["audioControlPointLists"]);
else
merged.Add(audioControlPointLists,
Merge(template[audioControlPointLists], system[audioControlPointLists], audioControlPointLists));
merged.Add("audioControlPointLists",
Merge(template["audioControlPointLists"], system["audioControlPointLists"], "audioControlPointLists"));
// Template tie lines take precedence. Config tool doesn't do them at system
// level anyway...
if (template[tieLines] != null)
merged.Add(tieLines, template[tieLines]);
else if (system[tieLines] != null)
merged.Add(tieLines, system[tieLines]);
if (template["tieLines"] != null)
merged.Add("tieLines", template["tieLines"]);
else if (system["tieLines"] != null)
merged.Add("tieLines", system["tieLines"]);
else
merged.Add(tieLines, new JArray());
if (template[joinMaps] != null)
merged.Add(joinMaps, template[joinMaps]);
if (template["joinMaps"] != null)
merged.Add("joinMaps", template["joinMaps"]);
else
merged.Add(joinMaps, new JObject());
merged.Add("joinMaps", new JObject());
if (system[global] != null)
merged.Add(global, Merge(template[global], system[global], global));
@ -260,4 +256,3 @@ namespace PepperDash.Core.Config
return o1;
}
}
}

View file

@ -4,28 +4,18 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core
{
/// <summary>
/// Represents a EncodingHelper
/// </summary>
namespace PepperDash.Core;
public class EncodingHelper
{
/// <summary>
/// ConvertUtf8ToAscii method
/// </summary>
public static string ConvertUtf8ToAscii(string utf8String)
{
return Encoding.ASCII.GetString(Encoding.UTF8.GetBytes(utf8String), 0, utf8String.Length);
}
/// <summary>
/// ConvertUtf8ToUtf16 method
/// </summary>
public static string ConvertUtf8ToUtf16(string utf8String)
{
return Encoding.Unicode.GetString(Encoding.UTF8.GetBytes(utf8String), 0, utf8String.Length);
}
}
}

View file

@ -8,8 +8,8 @@ using Crestron.SimplSharp;
using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
using Serilog;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Unique key interface to require a unique key for the class
/// </summary>
@ -33,5 +33,3 @@ namespace PepperDash.Core
[JsonProperty("name")]
string Name { get; }
}
}

View file

@ -2,8 +2,8 @@
using System.Collections.Generic;
using Serilog.Events;
namespace PepperDash.Core
{
namespace PepperDash.Core;
//*********************************************************************************************************
/// <summary>
/// Represents a Device
@ -188,12 +188,8 @@ namespace PepperDash.Core
/// <remarks>The returned string is formatted as "{Key} - {Name}". If the <c>Name</c> property is
/// null or empty, "---" is used in place of the name.</remarks>
/// <returns>A string that represents the object, containing the key and name in the format "{Key} - {Name}".</returns>
/// <summary>
/// ToString method
/// </summary>
public override string ToString()
{
return string.Format("{0} - {1}", Key, string.IsNullOrEmpty(Name) ? "---" : Name);
}
}
}

View file

@ -4,10 +4,10 @@ using Crestron.SimplSharp;
using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
using Serilog.Events;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Represents a EthernetHelper
/// Represents an EthernetHelper.
/// </summary>
public class EthernetHelper
{
@ -116,4 +116,3 @@ namespace PepperDash.Core
}
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Bool change event args
/// </summary>
@ -169,4 +169,3 @@ namespace PepperDash.Core
Index = index;
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.GenericRESTfulCommunications
{
namespace PepperDash.Core.GenericRESTfulCommunications;
/// <summary>
/// Constants
/// </summary>
@ -36,4 +36,3 @@ namespace PepperDash.Core.GenericRESTfulCommunications
/// </summary>
public const ushort ErrorStringChange = 203;
}
}

View file

@ -6,8 +6,8 @@ using Crestron.SimplSharp;
using Crestron.SimplSharp.Net.Http;
using Crestron.SimplSharp.Net.Https;
namespace PepperDash.Core.GenericRESTfulCommunications
{
namespace PepperDash.Core.GenericRESTfulCommunications;
/// <summary>
/// Generic RESTful communication class
/// </summary>
@ -253,4 +253,3 @@ namespace PepperDash.Core.GenericRESTfulCommunications
}
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.JsonStandardObjects
{
namespace PepperDash.Core.JsonStandardObjects;
/// <summary>
/// Constants for simpl modules
/// </summary>
@ -74,4 +74,3 @@ namespace PepperDash.Core.JsonStandardObjects
Index = index;
}
}
}

View file

@ -4,8 +4,8 @@ using Crestron.SimplSharp;
using PepperDash.Core.JsonToSimpl;
using Serilog.Events;
namespace PepperDash.Core.JsonStandardObjects
{
namespace PepperDash.Core.JsonStandardObjects;
/// <summary>
/// Device class
/// </summary>
@ -183,4 +183,3 @@ namespace PepperDash.Core.JsonStandardObjects
#endregion EventHandler Helpers
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.JsonStandardObjects
{
namespace PepperDash.Core.JsonStandardObjects;
/*
Convert JSON snippt to C#: http://json2csharp.com/#
@ -53,7 +53,7 @@ namespace PepperDash.Core.JsonStandardObjects
public class ComParamsConfig
{
/// <summary>
/// Gets or sets the baudRate
///
/// </summary>
public int baudRate { get; set; }
/// <summary>
@ -87,11 +87,11 @@ namespace PepperDash.Core.JsonStandardObjects
// convert properties for simpl
/// <summary>
/// Gets or sets the simplBaudRate
///
/// </summary>
public ushort simplBaudRate { get { return Convert.ToUInt16(baudRate); } }
/// <summary>
/// Gets or sets the simplDataBits
///
/// </summary>
public ushort simplDataBits { get { return Convert.ToUInt16(dataBits); } }
/// <summary>
@ -144,11 +144,11 @@ namespace PepperDash.Core.JsonStandardObjects
// convert properties for simpl
/// <summary>
/// Gets or sets the simplPort
///
/// </summary>
public ushort simplPort { get { return Convert.ToUInt16(port); } }
/// <summary>
/// Gets or sets the simplAutoReconnect
///
/// </summary>
public ushort simplAutoReconnect { get { return (ushort)(autoReconnect ? 1 : 0); } }
/// <summary>
@ -193,7 +193,7 @@ namespace PepperDash.Core.JsonStandardObjects
// convert properties for simpl
/// <summary>
/// Gets or sets the simplControlPortNumber
///
/// </summary>
public ushort simplControlPortNumber { get { return Convert.ToUInt16(controlPortNumber); } }
@ -227,11 +227,11 @@ namespace PepperDash.Core.JsonStandardObjects
// convert properties for simpl
/// <summary>
/// Gets or sets the simplDeviceId
///
/// </summary>
public ushort simplDeviceId { get { return Convert.ToUInt16(deviceId); } }
/// <summary>
/// Gets or sets the simplEnabled
///
/// </summary>
public ushort simplEnabled { get { return (ushort)(enabled ? 1 : 0); } }
@ -254,4 +254,3 @@ namespace PepperDash.Core.JsonStandardObjects
/// </summary>
public List<DeviceConfig> devices { get; set; }
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Constants for Simpl modules
/// </summary>
@ -89,7 +89,7 @@ namespace PepperDash.Core.JsonToSimpl
public class SPlusValueWrapper
{
/// <summary>
/// Gets or sets the ValueType
///
/// </summary>
public SPlusType ValueType { get; private set; }
/// <summary>
@ -140,4 +140,3 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
String
}
}

View file

@ -7,8 +7,8 @@ using Serilog.Events;
//using PepperDash.Core;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// The global class to manage all the instances of JsonToSimplMaster
/// </summary>
@ -23,9 +23,6 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
/// <param name="master">New master to add</param>
///
/// <summary>
/// AddMaster method
/// </summary>
public static void AddMaster(JsonToSimplMaster master)
{
if (master == null)
@ -60,4 +57,3 @@ namespace PepperDash.Core.JsonToSimpl
return Masters.FirstOrDefault(m => m.UniqueID.Equals(file, StringComparison.OrdinalIgnoreCase));
}
}
}

View file

@ -5,10 +5,10 @@ using System.Linq;
using JArray = NewtonsoftJson::Newtonsoft.Json.Linq.JArray;
using Serilog.Events;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Represents a JsonToSimplArrayLookupChild
/// Used to interact with an array of values with the S+ modules
/// </summary>
public class JsonToSimplArrayLookupChild : JsonToSimplChildObjectBase
{
@ -79,9 +79,8 @@ namespace PepperDash.Core.JsonToSimpl
}
/// <summary>
/// ProcessAll method
/// Process all values
/// </summary>
/// <inheritdoc />
public override void ProcessAll()
{
if (FindInArray())
@ -162,4 +161,3 @@ namespace PepperDash.Core.JsonToSimpl
return false;
}
}
}

View file

@ -5,8 +5,8 @@ using System.Collections.Generic;
using System.Linq;
using JValue = NewtonsoftJson::Newtonsoft.Json.Linq.JValue;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Base class for JSON objects
/// </summary>
@ -36,7 +36,7 @@ namespace PepperDash.Core.JsonToSimpl
public SPlusValuesDelegate SetAllPathsDelegate { get; set; }
/// <summary>
/// Gets or sets the Key
/// Unique identifier for instance
/// </summary>
public string Key { get; protected set; }
@ -52,7 +52,7 @@ namespace PepperDash.Core.JsonToSimpl
public string PathSuffix { get; protected set; }
/// <summary>
/// Gets or sets the LinkedToObject
/// Indicates if the instance is linked to an object
/// </summary>
public bool LinkedToObject { get; protected set; }
@ -98,9 +98,6 @@ namespace PepperDash.Core.JsonToSimpl
/// Sets the path prefix for the object
/// </summary>
/// <param name="pathPrefix"></param>
/// <summary>
/// SetPathPrefix method
/// </summary>
public void SetPathPrefix(string pathPrefix)
{
PathPrefix = pathPrefix;
@ -282,9 +279,6 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
/// <param name="key"></param>
/// <param name="theValue"></param>
/// <summary>
/// USetBoolValue method
/// </summary>
public void USetBoolValue(ushort key, ushort theValue)
{
SetBoolValue(key, theValue == 1);
@ -295,9 +289,6 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
/// <param name="key"></param>
/// <param name="theValue"></param>
/// <summary>
/// SetBoolValue method
/// </summary>
public void SetBoolValue(ushort key, bool theValue)
{
if (BoolPaths.ContainsKey(key))
@ -309,9 +300,6 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
/// <param name="key"></param>
/// <param name="theValue"></param>
/// <summary>
/// SetUShortValue method
/// </summary>
public void SetUShortValue(ushort key, ushort theValue)
{
if (UshortPaths.ContainsKey(key))
@ -323,9 +311,6 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
/// <param name="key"></param>
/// <param name="theValue"></param>
/// <summary>
/// SetStringValue method
/// </summary>
public void SetStringValue(ushort key, string theValue)
{
if (StringPaths.ContainsKey(key))
@ -337,9 +322,6 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
/// <param name="keyPath"></param>
/// <param name="valueToSave"></param>
/// <summary>
/// SetValueOnMaster method
/// </summary>
public void SetValueOnMaster(string keyPath, JValue valueToSave)
{
var path = GetFullPath(keyPath);
@ -421,4 +403,3 @@ namespace PepperDash.Core.JsonToSimpl
}
}
}
}

View file

@ -11,8 +11,8 @@ using Formatting = NewtonsoftJson::Newtonsoft.Json.Formatting;
using JObject = NewtonsoftJson::Newtonsoft.Json.Linq.JObject;
using JValue = NewtonsoftJson::Newtonsoft.Json.Linq.JValue;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Represents a JSON file that can be read and written to
/// </summary>
@ -24,12 +24,12 @@ namespace PepperDash.Core.JsonToSimpl
public string Filepath { get; private set; }
/// <summary>
/// Gets or sets the ActualFilePath
/// Filepath to the actual file that will be read (Portal or local)
/// </summary>
public string ActualFilePath { get; private set; }
/// <summary>
/// Gets or sets the Filename
///
/// </summary>
public string Filename { get; private set; }
/// <summary>
@ -198,9 +198,6 @@ namespace PepperDash.Core.JsonToSimpl
/// Sets the debug level
/// </summary>
/// <param name="level"></param>
/// <summary>
/// setDebugLevel method
/// </summary>
public void setDebugLevel(uint level)
{
Debug.SetDebugLevel(level);
@ -293,4 +290,3 @@ namespace PepperDash.Core.JsonToSimpl
}
}
}
}

View file

@ -1,9 +1,9 @@

namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Represents a JsonToSimplFixedPathObject
///
/// </summary>
public class JsonToSimplFixedPathObject : JsonToSimplChildObjectBase
{
@ -15,4 +15,3 @@ namespace PepperDash.Core.JsonToSimpl
this.LinkedToObject = true;
}
}
}

View file

@ -6,10 +6,10 @@ using Crestron.SimplSharp;
using JObject = NewtonsoftJson::Newtonsoft.Json.Linq.JObject;
using JValue = NewtonsoftJson::Newtonsoft.Json.Linq.JValue;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Represents a JsonToSimplGenericMaster
/// Generic Master
/// </summary>
public class JsonToSimplGenericMaster : JsonToSimplMaster
{
@ -24,7 +24,7 @@ namespace PepperDash.Core.JsonToSimpl
static object WriteLock = new object();
/// <summary>
/// Gets or sets the SaveCallback
/// Callback action for saving
/// </summary>
public Action<string> SaveCallback { get; set; }
@ -122,4 +122,3 @@ namespace PepperDash.Core.JsonToSimpl
Debug.Console(0, this, "WARNING: No save callback defined.");
}
}
}

View file

@ -11,8 +11,8 @@ using JValue = NewtonsoftJson::Newtonsoft.Json.Linq.JValue;
using JsonSerializationException = NewtonsoftJson::Newtonsoft.Json.JsonSerializationException;
using JsonTextReader = NewtonsoftJson::Newtonsoft.Json.JsonTextReader;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Abstract base class for JsonToSimpl interactions
/// </summary>
@ -44,7 +44,7 @@ namespace PepperDash.Core.JsonToSimpl
public string Key { get { return UniqueID; } }
/// <summary>
/// Gets or sets the UniqueID
/// A unique ID
/// </summary>
public string UniqueID { get; protected set; }
@ -88,7 +88,7 @@ namespace PepperDash.Core.JsonToSimpl
}
/// <summary>
/// Gets or sets the JsonObject
///
/// </summary>
public JObject JsonObject { get; protected set; }
@ -182,9 +182,6 @@ namespace PepperDash.Core.JsonToSimpl
/// </summary>
/// <param name="json"></param>
/// <returns></returns>
/// <summary>
/// ParseArray method
/// </summary>
public static JArray ParseArray(string json)
{
@ -247,4 +244,3 @@ namespace PepperDash.Core.JsonToSimpl
}
}
}
}

View file

@ -9,8 +9,8 @@ using JObject = NewtonsoftJson::Newtonsoft.Json.Linq.JObject;
using JValue = NewtonsoftJson::Newtonsoft.Json.Linq.JValue;
using PepperDash.Core.Config;
namespace PepperDash.Core.JsonToSimpl
{
namespace PepperDash.Core.JsonToSimpl;
/// <summary>
/// Portal File Master
/// </summary>
@ -22,7 +22,7 @@ namespace PepperDash.Core.JsonToSimpl
public string PortalFilepath { get; private set; }
/// <summary>
/// Gets or sets the ActualFilePath
/// File path of the actual file being read (Portal or local)
/// </summary>
public string ActualFilePath { get; private set; }
@ -194,4 +194,3 @@ namespace PepperDash.Core.JsonToSimpl
}
}
}
}

View file

@ -7,11 +7,8 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PepperDash.Core.Logging
{
/// <summary>
/// Represents a CrestronEnricher
/// </summary>
namespace PepperDash.Core.Logging;
public class CrestronEnricher : ILogEventEnricher
{
static readonly string _appName;
@ -30,9 +27,6 @@ namespace PepperDash.Core.Logging
}
/// <summary>
/// Enrich method
/// </summary>
public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
{
var property = propertyFactory.CreateProperty("App", _appName);
@ -40,4 +34,3 @@ namespace PepperDash.Core.Logging
logEvent.AddOrUpdateProperty(property);
}
}
}

View file

@ -20,8 +20,8 @@ using Serilog.Formatting.Compact;
using Serilog.Formatting.Json;
using Serilog.Templates;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// </summary>
public static class Debug
@ -1240,4 +1240,3 @@ namespace PepperDash.Core
None,
}
}
}

View file

@ -9,18 +9,12 @@ using System.IO;
using System.Text;
namespace PepperDash.Core
{
/// <summary>
/// Represents a DebugConsoleSink
/// </summary>
namespace PepperDash.Core;
public class DebugConsoleSink : ILogEventSink
{
private readonly ITextFormatter _textFormatter;
/// <summary>
/// Emit method
/// </summary>
public void Emit(LogEvent logEvent)
{
if (!Debug.IsRunningOnAppliance) return;
@ -50,9 +44,6 @@ namespace PepperDash.Core
public static class DebugConsoleSinkExtensions
{
/// <summary>
/// DebugConsoleSink method
/// </summary>
public static LoggerConfiguration DebugConsoleSink(
this LoggerSinkConfiguration loggerConfiguration,
ITextFormatter formatProvider = null)
@ -60,5 +51,3 @@ namespace PepperDash.Core
return loggerConfiguration.Sink(new DebugConsoleSink(formatProvider));
}
}
}

View file

@ -9,8 +9,8 @@ using Formatting = NewtonsoftJson::Newtonsoft.Json.Formatting;
using JsonConvert = NewtonsoftJson::Newtonsoft.Json.JsonConvert;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Represents a debugging context
/// </summary>
@ -22,9 +22,9 @@ namespace PepperDash.Core
/// </summary>
public string Key { get; private set; }
/// <summary>
/// The name of the file containing the current debug settings.
/// </summary>
///// <summary>
///// The name of the file containing the current debug settings.
///// </summary>
//string FileName = string.Format(@"\nvram\debug\app{0}Debug.json", InitialParametersClass.ApplicationNumber);
DebugContextSaveData SaveData;
@ -41,9 +41,6 @@ namespace PepperDash.Core
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
/// <summary>
/// GetDebugContext method
/// </summary>
public static DebugContext GetDebugContext(string key)
{
var context = Contexts.FirstOrDefault(c => c.Key.Equals(key, StringComparison.OrdinalIgnoreCase));
@ -98,9 +95,6 @@ namespace PepperDash.Core
/// Callback for console command
/// </summary>
/// <param name="levelString"></param>
/// <summary>
/// SetDebugFromConsole method
/// </summary>
public void SetDebugFromConsole(string levelString)
{
try
@ -123,9 +117,6 @@ namespace PepperDash.Core
/// Sets the debug level
/// </summary>
/// <param name="level"> Valid values 0 (no debug), 1 (critical), 2 (all messages)</param>
/// <summary>
/// SetDebugLevel method
/// </summary>
public void SetDebugLevel(int level)
{
if (level <= 2)
@ -153,7 +144,7 @@ namespace PepperDash.Core
}
/// <summary>
/// Console method
/// Appends a device Key to the beginning of a message
/// </summary>
public void Console(uint level, IKeyed dev, string format, params object[] items)
{
@ -203,9 +194,6 @@ namespace PepperDash.Core
/// </summary>
/// <param name="errorLogLevel"></param>
/// <param name="str"></param>
/// <summary>
/// LogError method
/// </summary>
public void LogError(Debug.ErrorLogLevel errorLogLevel, string str)
{
string msg = string.Format("App {0}:{1}", InitialParametersClass.ApplicationNumber, str);
@ -293,4 +281,3 @@ namespace PepperDash.Core
/// </summary>
public int Level { get; set; }
}
}

View file

@ -3,16 +3,10 @@ using Crestron.SimplSharp.CrestronLogger;
using Serilog.Core;
using Serilog.Events;
namespace PepperDash.Core.Logging
{
/// <summary>
/// Represents a DebugCrestronLoggerSink
/// </summary>
namespace PepperDash.Core.Logging;
public class DebugCrestronLoggerSink : ILogEventSink
{
/// <summary>
/// Emit method
/// </summary>
public void Emit(LogEvent logEvent)
{
if (!Debug.IsRunningOnAppliance) return;
@ -32,4 +26,3 @@ namespace PepperDash.Core.Logging
CrestronLogger.Initialize(1, LoggerModeEnum.RM);
}
}
}

View file

@ -9,11 +9,8 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PepperDash.Core.Logging
{
/// <summary>
/// Represents a DebugErrorLogSink
/// </summary>
namespace PepperDash.Core.Logging;
public class DebugErrorLogSink : ILogEventSink
{
private ITextFormatter _formatter;
@ -27,9 +24,6 @@ namespace PepperDash.Core.Logging
{LogEventLevel.Error, (msg) => ErrorLog.Error(msg) },
{LogEventLevel.Fatal, (msg) => ErrorLog.Error(msg) }
};
/// <summary>
/// Emit method
/// </summary>
public void Emit(LogEvent logEvent)
{
string message;
@ -68,4 +62,3 @@ namespace PepperDash.Core.Logging
_formatter = formatter;
}
}
}

View file

@ -2,112 +2,72 @@
using Serilog.Events;
using Log = PepperDash.Core.Debug;
namespace PepperDash.Core.Logging
{
namespace PepperDash.Core.Logging;
public static class DebugExtensions
{
/// <summary>
/// LogException method
/// </summary>
public static void LogException(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogMessage(ex, message, device: device, args);
Log.LogMessage(ex, message, device, args);
}
/// <summary>
/// LogVerbose method
/// </summary>
public static void LogVerbose(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogVerbose(ex, device, message, args);
Log.LogMessage(LogEventLevel.Verbose, ex, message, device, args);
}
/// <summary>
/// LogVerbose method
/// </summary>
public static void LogVerbose(this IKeyed device, string message, params object[] args)
{
Log.LogVerbose(device, message, args);
Log.LogMessage(LogEventLevel.Verbose, device, message, args);
}
/// <summary>
/// LogDebug method
/// </summary>
public static void LogDebug(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogDebug(ex, device, message, args);
Log.LogMessage(LogEventLevel.Debug, ex, message, device, args);
}
/// <summary>
/// LogDebug method
/// </summary>
public static void LogDebug(this IKeyed device, string message, params object[] args)
{
Log.LogDebug(device, message, args);
Log.LogMessage(LogEventLevel.Debug, device, message, args);
}
/// <summary>
/// LogInformation method
/// </summary>
public static void LogInformation(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogInformation(ex, device, message, args);
Log.LogMessage(LogEventLevel.Information, ex, message, device, args);
}
/// <summary>
/// LogInformation method
/// </summary>
public static void LogInformation(this IKeyed device, string message, params object[] args)
{
Log.LogInformation(device, message, args);
Log.LogMessage(LogEventLevel.Information, device, message, args);
}
/// <summary>
/// LogWarning method
/// </summary>
public static void LogWarning(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogWarning(ex, device, message, args);
Log.LogMessage(LogEventLevel.Warning, ex, message, device, args);
}
/// <summary>
/// LogWarning method
/// </summary>
public static void LogWarning(this IKeyed device, string message, params object[] args)
{
Log.LogWarning(device, message, args);
Log.LogMessage(LogEventLevel.Warning, device, message, args);
}
/// <summary>
/// LogError method
/// </summary>
public static void LogError(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogError(ex, device, message, args);
Log.LogMessage(LogEventLevel.Error, ex, message, device, args);
}
/// <summary>
/// LogError method
/// </summary>
public static void LogError(this IKeyed device, string message, params object[] args)
{
Log.LogError(device, message, args);
Log.LogMessage(LogEventLevel.Error, device, message, args);
}
/// <summary>
/// LogFatal method
/// </summary>
public static void LogFatal(this IKeyed device, Exception ex, string message, params object[] args)
{
Log.LogFatal(ex, device, message, args);
Log.LogMessage(LogEventLevel.Fatal, ex, message, device, args);
}
/// <summary>
/// LogFatal method
/// </summary>
public static void LogFatal(this IKeyed device, string message, params object[] args)
{
Log.LogFatal(device, message, args);
}
Log.LogMessage(LogEventLevel.Fatal, device, message, args);
}
}

View file

@ -4,10 +4,10 @@ using System.Collections.Generic;
using Crestron.SimplSharp;
using JsonProperty = NewtonsoftJson::Newtonsoft.Json.JsonPropertyAttribute;
namespace PepperDash.Core.Logging
{
namespace PepperDash.Core.Logging;
/// <summary>
/// Represents a DebugContextCollection
/// Class to persist current Debug settings across program restarts
/// </summary>
public class DebugContextCollection
{
@ -73,9 +73,6 @@ namespace PepperDash.Core.Logging
/// <param name="deviceKey"></param>
/// <param name="settings"></param>
/// <returns></returns>
/// <summary>
/// SetDebugSettingsForKey method
/// </summary>
public void SetDebugSettingsForKey(string deviceKey, object settings)
{
try
@ -100,9 +97,6 @@ namespace PepperDash.Core.Logging
/// </summary>
/// <param name="deviceKey"></param>
/// <returns></returns>
/// <summary>
/// GetDebugSettingsForKey method
/// </summary>
public object GetDebugSettingsForKey(string deviceKey)
{
return DeviceDebugSettings[deviceKey];
@ -126,4 +120,3 @@ namespace PepperDash.Core.Logging
[JsonProperty("doNotLoadOnNextBoot")]
public bool DoNotLoadOnNextBoot { get; set; }
}
}

View file

@ -1,10 +1,6 @@
extern alias NewtonsoftJson;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Crestron.SimplSharp;
using Org.BouncyCastle.Asn1.X509;
using Serilog;

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Not in use
/// </summary>
@ -18,5 +18,3 @@ namespace PepperDash.Core
{
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.PasswordManagement
{
namespace PepperDash.Core.PasswordManagement;
/// <summary>
/// JSON password configuration
/// </summary>
@ -23,4 +23,3 @@ namespace PepperDash.Core.PasswordManagement
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.PasswordManagement
{
namespace PepperDash.Core.PasswordManagement;
/// <summary>
/// Constants
/// </summary>
@ -54,4 +54,3 @@ namespace PepperDash.Core.PasswordManagement
/// </summary>
public const ushort StringValueChange = 201;
}
}

View file

@ -1,9 +1,9 @@
using System;
namespace PepperDash.Core.PasswordManagement
{
namespace PepperDash.Core.PasswordManagement;
/// <summary>
/// Represents a PasswordClient
/// A class to allow user interaction with the PasswordManager
/// </summary>
public class PasswordClient
{
@ -193,4 +193,3 @@ namespace PepperDash.Core.PasswordManagement
}
}
}
}

View file

@ -2,10 +2,10 @@
using System.Collections.Generic;
using Crestron.SimplSharp;
namespace PepperDash.Core.PasswordManagement
{
namespace PepperDash.Core.PasswordManagement;
/// <summary>
/// Represents a PasswordManager
/// Allows passwords to be stored and managed
/// </summary>
public class PasswordManager
{
@ -244,4 +244,3 @@ namespace PepperDash.Core.PasswordManagement
}
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.SystemInfo
{
namespace PepperDash.Core.SystemInfo;
/// <summary>
/// Constants
/// </summary>
@ -261,4 +261,3 @@ namespace PepperDash.Core.SystemInfo
Index = index;
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.SystemInfo
{
namespace PepperDash.Core.SystemInfo;
/// <summary>
/// Processor info class
/// </summary>
@ -201,4 +201,3 @@ namespace PepperDash.Core.SystemInfo
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.SystemInfo
{
namespace PepperDash.Core.SystemInfo;
/// <summary>
/// System Info class
/// </summary>
@ -468,4 +468,3 @@ namespace PepperDash.Core.SystemInfo
}
}
}
}

View file

@ -20,8 +20,8 @@ using Org.BouncyCastle.Crypto.Operators;
using BigInteger = Org.BouncyCastle.Math.BigInteger;
using X509Certificate = Org.BouncyCastle.X509.X509Certificate;
namespace PepperDash.Core
{
namespace PepperDash.Core;
/// <summary>
/// Taken From https://github.com/rlipscombe/bouncy-castle-csharp/
/// </summary>
@ -35,9 +35,6 @@ namespace PepperDash.Core
return issuerCertificate;
}
/// <summary>
/// IssueCertificate method
/// </summary>
public X509Certificate2 IssueCertificate(string subjectName, X509Certificate2 issuerCertificate, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@ -59,9 +56,6 @@ namespace PepperDash.Core
return ConvertCertificate(certificate, subjectKeyPair, random);
}
/// <summary>
/// CreateCertificateAuthorityCertificate method
/// </summary>
public X509Certificate2 CreateCertificateAuthorityCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@ -84,9 +78,6 @@ namespace PepperDash.Core
return ConvertCertificate(certificate, subjectKeyPair, random);
}
/// <summary>
/// CreateSelfSignedCertificate method
/// </summary>
public X509Certificate2 CreateSelfSignedCertificate(string subjectName, string[] subjectAlternativeNames, KeyPurposeID[] usages)
{
// It's self-signed, so these are the same.
@ -314,9 +305,6 @@ namespace PepperDash.Core
return convertedCertificate;
}
/// <summary>
/// WriteCertificate method
/// </summary>
public void WriteCertificate(X509Certificate2 certificate, string outputDirectory, string certName)
{
// This password is the one attached to the PFX file. Use 'null' for no password.
@ -344,9 +332,6 @@ namespace PepperDash.Core
}
}
}
/// <summary>
/// AddCertToStore method
/// </summary>
public bool AddCertToStore(X509Certificate2 cert, System.Security.Cryptography.X509Certificates.StoreName st, System.Security.Cryptography.X509Certificates.StoreLocation sl)
{
bool bRet = false;
@ -368,4 +353,3 @@ namespace PepperDash.Core
return bRet;
}
}
}

View file

@ -1,9 +1,9 @@
using Crestron.SimplSharp.WebScripting;
namespace PepperDash.Core.Web.RequestHandlers
{
namespace PepperDash.Core.Web.RequestHandlers;
/// <summary>
/// Represents a DefaultRequestHandler
/// Web API default request handler
/// </summary>
public class DefaultRequestHandler : WebApiBaseRequestHandler
{
@ -14,4 +14,3 @@ namespace PepperDash.Core.Web.RequestHandlers
: base(true)
{ }
}
}

View file

@ -3,8 +3,8 @@ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace PepperDash.Core.Web.RequestHandlers
{
namespace PepperDash.Core.Web.RequestHandlers;
public abstract class WebApiBaseRequestAsyncHandler:IHttpCwsHandler
{
private readonly Dictionary<string, Func<HttpCwsContext, Task>> _handlers;
@ -142,9 +142,6 @@ namespace PepperDash.Core.Web.RequestHandlers
/// Process request
/// </summary>
/// <param name="context"></param>
/// <summary>
/// ProcessRequest method
/// </summary>
public void ProcessRequest(HttpCwsContext context)
{
if (!_handlers.TryGetValue(context.Request.HttpMethod, out Func<HttpCwsContext, Task> handler))
@ -163,4 +160,3 @@ namespace PepperDash.Core.Web.RequestHandlers
handlerTask.GetAwaiter().GetResult();
}
}
}

View file

@ -2,8 +2,8 @@
using System.Collections.Generic;
using Crestron.SimplSharp.WebScripting;
namespace PepperDash.Core.Web.RequestHandlers
{
namespace PepperDash.Core.Web.RequestHandlers;
/// <summary>
/// CWS Base Handler, implements IHttpCwsHandler
/// </summary>
@ -165,4 +165,3 @@ namespace PepperDash.Core.Web.RequestHandlers
handler(context);
}
}
}

View file

@ -10,8 +10,8 @@ using JsonConvert = NewtonsoftJson::Newtonsoft.Json.JsonConvert;
using JObject = NewtonsoftJson::Newtonsoft.Json.Linq.JObject;
using PepperDash.Core.Web.RequestHandlers;
namespace PepperDash.Core.Web
{
namespace PepperDash.Core.Web;
/// <summary>
/// Web API server
/// </summary>
@ -287,4 +287,3 @@ namespace PepperDash.Core.Web
}
}
}
}

View file

@ -1,9 +1,9 @@
using System;
namespace PepperDash.Core.WebApi.Presets
{
namespace PepperDash.Core.WebApi.Presets;
/// <summary>
/// Represents a Preset
/// Represents a preset
/// </summary>
public class Preset
{
@ -13,27 +13,27 @@ namespace PepperDash.Core.WebApi.Presets
public int Id { get; set; }
/// <summary>
/// Gets or sets the UserId
/// User ID
/// </summary>
public int UserId { get; set; }
/// <summary>
/// Gets or sets the RoomTypeId
/// Room Type ID
/// </summary>
public int RoomTypeId { get; set; }
/// <summary>
/// Gets or sets the PresetName
/// Preset Name
/// </summary>
public string PresetName { get; set; }
/// <summary>
/// Gets or sets the PresetNumber
/// Preset Number
/// </summary>
public int PresetNumber { get; set; }
/// <summary>
/// Gets or sets the Data
/// Preset Data
/// </summary>
public string Data { get; set; }
@ -59,12 +59,12 @@ namespace PepperDash.Core.WebApi.Presets
public bool LookupSuccess { get; private set; }
/// <summary>
/// Gets or sets the ULookupSuccess
/// S+ helper
/// </summary>
public ushort ULookupSuccess { get { return (ushort)(LookupSuccess ? 1 : 0); } }
/// <summary>
/// Gets or sets the Preset
/// The preset
/// </summary>
public Preset Preset { get; private set; }
@ -84,4 +84,3 @@ namespace PepperDash.Core.WebApi.Presets
Preset = preset;
}
}
}

View file

@ -4,8 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
namespace PepperDash.Core.WebApi.Presets
{
namespace PepperDash.Core.WebApi.Presets;
/// <summary>
///
/// </summary>
@ -17,17 +17,17 @@ namespace PepperDash.Core.WebApi.Presets
public int Id { get; set; }
/// <summary>
/// Gets or sets the ExternalId
///
/// </summary>
public string ExternalId { get; set; }
/// <summary>
/// Gets or sets the FirstName
///
/// </summary>
public string FirstName { get; set; }
/// <summary>
/// Gets or sets the LastName
///
/// </summary>
public string LastName { get; set; }
}
@ -44,12 +44,12 @@ namespace PepperDash.Core.WebApi.Presets
public bool LookupSuccess { get; private set; }
/// <summary>
/// Gets or sets the ULookupSuccess
/// For stupid S+
/// </summary>
public ushort ULookupSuccess { get { return (ushort)(LookupSuccess ? 1 : 0); } }
/// <summary>
/// Gets or sets the User
///
/// </summary>
public User User { get; private set; }
@ -81,13 +81,12 @@ namespace PepperDash.Core.WebApi.Presets
public int UserId { get; set; }
/// <summary>
/// Gets or sets the RoomTypeId
///
/// </summary>
public int RoomTypeId { get; set; }
/// <summary>
/// Gets or sets the PresetNumber
///
/// </summary>
public int PresetNumber { get; set; }
}
}

View file

@ -10,8 +10,8 @@ using JObject = NewtonsoftJson::Newtonsoft.Json.Linq.JObject;
using PepperDash.Core.JsonToSimpl;
namespace PepperDash.Core.WebApi.Presets
{
namespace PepperDash.Core.WebApi.Presets;
/// <summary>
/// Passcode client for the WebApi
/// </summary>
@ -28,7 +28,7 @@ namespace PepperDash.Core.WebApi.Presets
public event EventHandler<PresetReceivedEventArgs> PresetReceived;
/// <summary>
/// Gets or sets the Key
/// Unique identifier for this instance
/// </summary>
public string Key { get; private set; }
@ -79,9 +79,6 @@ namespace PepperDash.Core.WebApi.Presets
/// Gets the user for a passcode
/// </summary>
/// <param name="passcode"></param>
/// <summary>
/// GetUserForPasscode method
/// </summary>
public void GetUserForPasscode(string passcode)
{
// Bullshit duplicate code here... These two cases should be the same
@ -281,4 +278,3 @@ namespace PepperDash.Core.WebApi.Presets
}
}
}
}

View file

@ -1,8 +1,8 @@
using System.Collections.Generic;
using PepperDash.Core.Intersystem.Tokens;
namespace PepperDash.Core.Intersystem.Serialization
{
namespace PepperDash.Core.Intersystem.Serialization;
/// <summary>
/// Interface to determine XSig serialization for an object.
/// </summary>
@ -22,4 +22,3 @@ namespace PepperDash.Core.Intersystem.Serialization
/// <returns></returns>
T Deserialize<T>(IEnumerable<XSigToken> tokens) where T : class, IXSigSerialization;
}
}

View file

@ -1,7 +1,7 @@
using System;
namespace PepperDash.Core.Intersystem.Serialization
{
namespace PepperDash.Core.Intersystem.Serialization;
/// <summary>
/// Class to handle this specific exception type
/// </summary>
@ -25,4 +25,3 @@ namespace PepperDash.Core.Intersystem.Serialization
/// <param name="inner"></param>
public XSigSerializationException(string message, Exception inner) : base(message, inner) { }
}
}

View file

@ -1,7 +1,7 @@
using System;
namespace PepperDash.Core.Intersystem.Tokens
{
namespace PepperDash.Core.Intersystem.Tokens;
/// <summary>
/// Represents an XSigAnalogToken
/// </summary>
@ -59,9 +59,6 @@ namespace PepperDash.Core.Intersystem.Tokens
/// </summary>
/// <param name="offset"></param>
/// <returns></returns>
/// <summary>
/// GetTokenWithOffset method
/// </summary>
public override XSigToken GetTokenWithOffset(int offset)
{
if (offset == 0) return this;
@ -72,10 +69,6 @@ namespace PepperDash.Core.Intersystem.Tokens
///
/// </summary>
/// <returns></returns>
/// <summary>
/// ToString method
/// </summary>
/// <inheritdoc />
public override string ToString()
{
return Index + " = 0x" + Value.ToString("X4");
@ -87,12 +80,8 @@ namespace PepperDash.Core.Intersystem.Tokens
/// <param name="format"></param>
/// <param name="formatProvider"></param>
/// <returns></returns>
/// <summary>
/// ToString method
/// </summary>
public string ToString(string format, IFormatProvider formatProvider)
{
return Value.ToString(format, formatProvider);
}
}
}

View file

@ -1,7 +1,7 @@
using System;
namespace PepperDash.Core.Intersystem.Tokens
{
namespace PepperDash.Core.Intersystem.Tokens;
/// <summary>
/// Represents an XSigDigitalToken
/// </summary>
@ -57,9 +57,6 @@ namespace PepperDash.Core.Intersystem.Tokens
/// </summary>
/// <param name="offset"></param>
/// <returns></returns>
/// <summary>
/// GetTokenWithOffset method
/// </summary>
public override XSigToken GetTokenWithOffset(int offset)
{
if (offset == 0) return this;
@ -70,10 +67,6 @@ namespace PepperDash.Core.Intersystem.Tokens
///
/// </summary>
/// <returns></returns>
/// <summary>
/// ToString method
/// </summary>
/// <inheritdoc />
public override string ToString()
{
return Index + " = " + (Value ? "High" : "Low");
@ -84,12 +77,8 @@ namespace PepperDash.Core.Intersystem.Tokens
/// </summary>
/// <param name="formatProvider"></param>
/// <returns></returns>
/// <summary>
/// ToString method
/// </summary>
public string ToString(IFormatProvider formatProvider)
{
return Value.ToString(formatProvider);
}
}
}

View file

@ -1,8 +1,8 @@
using System;
using System.Text;
namespace PepperDash.Core.Intersystem.Tokens
{
namespace PepperDash.Core.Intersystem.Tokens;
/// <summary>
/// Represents an XSigSerialToken
/// </summary>
@ -63,9 +63,6 @@ namespace PepperDash.Core.Intersystem.Tokens
/// </summary>
/// <param name="offset"></param>
/// <returns></returns>
/// <summary>
/// GetTokenWithOffset method
/// </summary>
public override XSigToken GetTokenWithOffset(int offset)
{
if (offset == 0) return this;
@ -76,13 +73,8 @@ namespace PepperDash.Core.Intersystem.Tokens
///
/// </summary>
/// <returns></returns>
/// <summary>
/// ToString method
/// </summary>
/// <inheritdoc />
public override string ToString()
{
return Index + " = \"" + Value + "\"";
}
}
}

View file

@ -1,5 +1,5 @@
namespace PepperDash.Core.Intersystem.Tokens
{
namespace PepperDash.Core.Intersystem.Tokens;
/// <summary>
/// Represents the base class for all XSig datatypes.
/// </summary>
@ -42,4 +42,3 @@ namespace PepperDash.Core.Intersystem.Tokens
/// <returns>XSigToken</returns>
public abstract XSigToken GetTokenWithOffset(int offset);
}
}

View file

@ -1,5 +1,5 @@
namespace PepperDash.Core.Intersystem.Tokens
{
namespace PepperDash.Core.Intersystem.Tokens;
/// <summary>
/// XSig token types.
/// </summary>
@ -20,4 +20,3 @@ namespace PepperDash.Core.Intersystem.Tokens
/// </summary>
Serial
}
}

View file

@ -18,8 +18,8 @@ using PepperDash.Core.Intersystem.Tokens;
11111111 <- denotes end of data
*/
namespace PepperDash.Core.Intersystem
{
namespace PepperDash.Core.Intersystem;
/// <summary>
/// Helper methods for creating XSig byte sequences compatible with the Intersystem Communications (ISC) symbol.
/// </summary>
@ -52,9 +52,6 @@ namespace PepperDash.Core.Intersystem
/// </summary>
/// <param name="xSigSerialization">XSig state resolver.</param>
/// <returns>Bytes in XSig format for each token within the state representation.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(IXSigSerialization xSigSerialization)
{
return GetBytes(xSigSerialization, 0);
@ -66,9 +63,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="xSigSerialization">XSig state resolver.</param>
/// <param name="offset">Offset to which the data will be aligned.</param>
/// <returns>Bytes in XSig format for each token within the state representation.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(IXSigSerialization xSigSerialization, int offset)
{
var tokens = xSigSerialization.Serialize();
@ -88,9 +82,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="index">1-based digital index</param>
/// <param name="value">Digital data to be encoded</param>
/// <returns>Bytes in XSig format for digtial information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int index, bool value)
{
return GetBytes(index, 0, value);
@ -103,9 +94,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="offset">Index offset.</param>
/// <param name="value">Digital data to be encoded</param>
/// <returns>Bytes in XSig format for digtial information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int index, int offset, bool value)
{
return new XSigDigitalToken(index + offset, value).GetBytes();
@ -117,9 +105,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="startIndex">Starting index of the sequence.</param>
/// <param name="values">Digital signal value array.</param>
/// <returns>Byte sequence in XSig format for digital signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int startIndex, bool[] values)
{
return GetBytes(startIndex, 0, values);
@ -132,9 +117,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="offset">Index offset.</param>
/// <param name="values">Digital signal value array.</param>
/// <returns>Byte sequence in XSig format for digital signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int startIndex, int offset, bool[] values)
{
// Digital XSig data is 2 bytes per value
@ -152,9 +134,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="index">1-based analog index</param>
/// <param name="value">Analog data to be encoded</param>
/// <returns>Bytes in XSig format for analog signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int index, ushort value)
{
return GetBytes(index, 0, value);
@ -167,9 +146,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="offset">Index offset.</param>
/// <param name="value">Analog data to be encoded</param>
/// <returns>Bytes in XSig format for analog signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int index, int offset, ushort value)
{
return new XSigAnalogToken(index + offset, value).GetBytes();
@ -181,9 +157,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="startIndex">Starting index of the sequence.</param>
/// <param name="values">Analog signal value array.</param>
/// <returns>Byte sequence in XSig format for analog signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int startIndex, ushort[] values)
{
return GetBytes(startIndex, 0, values);
@ -196,9 +169,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="offset">Index offset.</param>
/// <param name="values">Analog signal value array.</param>
/// <returns>Byte sequence in XSig format for analog signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int startIndex, int offset, ushort[] values)
{
// Analog XSig data is 4 bytes per value
@ -216,9 +186,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="index">1-based serial index</param>
/// <param name="value">Serial data to be encoded</param>
/// <returns>Bytes in XSig format for serial signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int index, string value)
{
return GetBytes(index, 0, value);
@ -231,9 +198,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="offset">Index offset.</param>
/// <param name="value">Serial data to be encoded</param>
/// <returns>Bytes in XSig format for serial signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int index, int offset, string value)
{
return new XSigSerialToken(index + offset, value).GetBytes();
@ -245,9 +209,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="startIndex">Starting index of the sequence.</param>
/// <param name="values">Serial signal value array.</param>
/// <returns>Byte sequence in XSig format for serial signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int startIndex, string[] values)
{
return GetBytes(startIndex, 0, values);
@ -260,9 +221,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="offset">Index offset.</param>
/// <param name="values">Serial signal value array.</param>
/// <returns>Byte sequence in XSig format for serial signal information.</returns>
/// <summary>
/// GetBytes method
/// </summary>
public static byte[] GetBytes(int startIndex, int offset, string[] values)
{
// Serial XSig data is not fixed-length like the other formats
@ -278,4 +236,3 @@ namespace PepperDash.Core.Intersystem
return bytes;
}
}
}

View file

@ -4,8 +4,8 @@ using Crestron.SimplSharp.CrestronIO;
using PepperDash.Core.Intersystem.Serialization;
using PepperDash.Core.Intersystem.Tokens;
namespace PepperDash.Core.Intersystem
{
namespace PepperDash.Core.Intersystem;
/// <summary>
/// XSigToken stream reader.
/// </summary>
@ -48,9 +48,6 @@ namespace PepperDash.Core.Intersystem
/// <param name="stream">Input stream</param>
/// <param name="value">Result</param>
/// <returns>True if successful, otherwise false.</returns>
/// <summary>
/// TryReadUInt16BE method
/// </summary>
public static bool TryReadUInt16BE(Stream stream, out ushort value)
{
value = 0;
@ -68,9 +65,6 @@ namespace PepperDash.Core.Intersystem
/// </summary>
/// <returns>XSigToken</returns>
/// <exception cref="ArgumentOutOfRangeException">Offset is less than 0.</exception>
/// <summary>
/// ReadXSigToken method
/// </summary>
public XSigToken ReadXSigToken()
{
ushort prefix;
@ -120,9 +114,6 @@ namespace PepperDash.Core.Intersystem
/// Reads all available XSig tokens from the stream.
/// </summary>
/// <returns>XSigToken collection.</returns>
/// <summary>
/// ReadAllXSigTokens method
/// </summary>
public IEnumerable<XSigToken> ReadAllXSigTokens()
{
var tokens = new List<XSigToken>();
@ -153,4 +144,3 @@ namespace PepperDash.Core.Intersystem
_stream.Dispose();
}
}
}

View file

@ -5,8 +5,8 @@ using Crestron.SimplSharp.CrestronIO;
using PepperDash.Core.Intersystem.Serialization;
using PepperDash.Core.Intersystem.Tokens;
namespace PepperDash.Core.Intersystem
{
namespace PepperDash.Core.Intersystem;
/// <summary>
/// XSigToken stream writer.
/// </summary>
@ -47,9 +47,6 @@ namespace PepperDash.Core.Intersystem
/// Write XSig data gathered from an IXSigStateResolver to the stream.
/// </summary>
/// <param name="xSigSerialization">IXSigStateResolver object.</param>
/// <summary>
/// WriteXSigData method
/// </summary>
public void WriteXSigData(IXSigSerialization xSigSerialization)
{
WriteXSigData(xSigSerialization, 0);
@ -60,9 +57,6 @@ namespace PepperDash.Core.Intersystem
/// </summary>
/// <param name="xSigSerialization">IXSigStateResolver object.</param>
/// <param name="offset">Index offset for each XSigToken.</param>
/// <summary>
/// WriteXSigData method
/// </summary>
public void WriteXSigData(IXSigSerialization xSigSerialization, int offset)
{
if (xSigSerialization == null)
@ -76,9 +70,6 @@ namespace PepperDash.Core.Intersystem
/// Write XSigToken to the stream.
/// </summary>
/// <param name="token">XSigToken object.</param>
/// <summary>
/// WriteXSigData method
/// </summary>
public void WriteXSigData(XSigToken token)
{
WriteXSigData(token, 0);
@ -89,9 +80,6 @@ namespace PepperDash.Core.Intersystem
/// </summary>
/// <param name="token">XSigToken object.</param>
/// <param name="offset">Index offset for each XSigToken.</param>
/// <summary>
/// WriteXSigData method
/// </summary>
public void WriteXSigData(XSigToken token, int offset)
{
WriteXSigData(new[] { token }, offset);
@ -120,9 +108,6 @@ namespace PepperDash.Core.Intersystem
/// </summary>
/// <param name="tokens">XSigToken objects.</param>
/// <param name="offset">Index offset for each XSigToken.</param>
/// <summary>
/// WriteXSigData method
/// </summary>
public void WriteXSigData(IEnumerable<XSigToken> tokens, int offset)
{
if (offset < 0)
@ -140,7 +125,7 @@ namespace PepperDash.Core.Intersystem
}
/// <summary>
/// Dispose method
/// Disposes of the internal stream if specified to not leave open.
/// </summary>
public void Dispose()
{
@ -148,4 +133,3 @@ namespace PepperDash.Core.Intersystem
_stream.Dispose();
}
}
}

View file

@ -13,18 +13,13 @@ using PepperDash.Essentials.Core.Config;
using Serilog.Events;
namespace PepperDash.Essentials.Core.Bridges
{
namespace PepperDash.Essentials.Core.Bridges;
/// <summary>
/// Base class for bridge API variants
/// </summary>
[Obsolete("Will be removed in v3.0.0")]
public abstract class BridgeApi : EssentialsDevice
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="key">Device key</param>
protected BridgeApi(string key) :
base(key)
{
@ -33,36 +28,23 @@ namespace PepperDash.Essentials.Core.Bridges
}
/// <summary>
/// Class to link devices and rooms to an EISC Instance
/// Bridge API using EISC
/// </summary>
public class EiscApiAdvanced : BridgeApi, ICommunicationMonitor
{
/// <summary>
/// Gets the PropertiesConfig
/// </summary>
public EiscApiPropertiesConfig PropertiesConfig { get; private set; }
/// <summary>
/// Gets the JoinMaps dictionary
/// </summary>
public Dictionary<string, JoinMapBaseAdvanced> JoinMaps { get; private set; }
/// <summary>
/// Gets the EISC instance
/// </summary>
public BasicTriList Eisc { get; private set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="dc">Device configuration</param>
/// <param name="eisc">EISC instance</param>
public EiscApiAdvanced(DeviceConfig dc, BasicTriList eisc) :
base(dc.Key)
{
JoinMaps = new Dictionary<string, JoinMapBaseAdvanced>();
PropertiesConfig = dc.Properties.ToObject<EiscApiPropertiesConfig>();
//PropertiesConfig = JsonConvert.DeserializeObject<EiscApiPropertiesConfig>(dc.Properties.ToString());
Eisc = eisc;
@ -75,18 +57,12 @@ namespace PepperDash.Essentials.Core.Bridges
AddPostActivationAction(RegisterEisc);
}
/// <summary>
/// CustomActivate method
/// </summary>
public override bool CustomActivate()
{
CommunicationMonitor.Start();
return base.CustomActivate();
}
/// <summary>
/// Deactivate method
/// </summary>
public override bool Deactivate()
{
CommunicationMonitor.Stop();
@ -99,7 +75,7 @@ namespace PepperDash.Essentials.Core.Bridges
if (PropertiesConfig.Devices == null)
{
this.LogDebug("No devices linked to this bridge");
Debug.LogMessage(LogEventLevel.Debug, this, "No devices linked to this bridge");
return;
}
@ -120,7 +96,9 @@ namespace PepperDash.Essentials.Core.Bridges
continue;
}
this.LogWarning("{deviceKey} is not compatible with this bridge type. Please update the device.", device.Key);
Debug.LogMessage(LogEventLevel.Information, this,
"{0} is not compatible with this bridge type. Please use 'eiscapi' instead, or updae the device.",
device.Key);
}
}
@ -135,31 +113,31 @@ namespace PepperDash.Essentials.Core.Bridges
if (registerResult != eDeviceRegistrationUnRegistrationResponse.Success)
{
this.LogVerbose("Registration result: {registerResult}", registerResult);
Debug.LogMessage(LogEventLevel.Verbose, this, "Registration result: {0}", registerResult);
return;
}
this.LogDebug("EISC registration successful");
Debug.LogMessage(LogEventLevel.Debug, this, "EISC registration successful");
}
/// <summary>
/// Link rooms to this EISC. Rooms MUST implement IBridgeAdvanced
/// </summary>
public void LinkRooms()
{
this.LogDebug("Linking Rooms...");
Debug.LogMessage(LogEventLevel.Debug, this, "Linking Rooms...");
if (PropertiesConfig.Rooms == null)
{
this.LogDebug("No rooms linked to this bridge.");
Debug.LogMessage(LogEventLevel.Debug, this, "No rooms linked to this bridge.");
return;
}
foreach (var room in PropertiesConfig.Rooms)
{
if (!(DeviceManager.GetDeviceForKey(room.RoomKey) is IBridgeAdvanced rm))
var rm = DeviceManager.GetDeviceForKey(room.RoomKey) as IBridgeAdvanced;
if (rm == null)
{
this.LogDebug("Room {roomKey} does not implement IBridgeAdvanced. Skipping...", room.RoomKey);
Debug.LogMessage(LogEventLevel.Debug, this,
"Room {0} does not implement IBridgeAdvanced. Skipping...", room.RoomKey);
continue;
}
@ -170,8 +148,8 @@ namespace PepperDash.Essentials.Core.Bridges
/// <summary>
/// Adds a join map
/// </summary>
/// <param name="deviceKey">The key of the device to add the join map for</param>
/// <param name="joinMap">The join map to add</param>
/// <param name="deviceKey"></param>
/// <param name="joinMap"></param>
public void AddJoinMap(string deviceKey, JoinMapBaseAdvanced joinMap)
{
if (!JoinMaps.ContainsKey(deviceKey))
@ -180,12 +158,12 @@ namespace PepperDash.Essentials.Core.Bridges
}
else
{
this.LogWarning("Unable to add join map with key '{deviceKey}'. Key already exists in JoinMaps dictionary", deviceKey);
Debug.LogMessage(LogEventLevel.Verbose, this, "Unable to add join map with key '{0}'. Key already exists in JoinMaps dictionary", deviceKey);
}
}
/// <summary>
/// PrintJoinMaps method
/// Prints all the join maps on this bridge
/// </summary>
public virtual void PrintJoinMaps()
{
@ -197,17 +175,16 @@ namespace PepperDash.Essentials.Core.Bridges
joinMap.Value.PrintJoinMapInfo();
}
}
/// <summary>
/// MarkdownForBridge method
/// Generates markdown for all join maps on this bridge
/// </summary>
public virtual void MarkdownForBridge(string bridgeKey)
{
this.LogInformation("Writing Joinmaps to files for EISC IPID: {eiscId}", Eisc.ID.ToString("X"));
Debug.LogMessage(LogEventLevel.Information, this, "Writing Joinmaps to files for EISC IPID: {0}", Eisc.ID.ToString("X"));
foreach (var joinMap in JoinMaps)
{
this.LogInformation("Generating markdown for device '{deviceKey}':", joinMap.Key);
Debug.LogMessage(LogEventLevel.Information, "Generating markdown for device '{0}':", joinMap.Key);
joinMap.Value.MarkdownJoinMapInfo(joinMap.Key, bridgeKey);
}
}
@ -215,45 +192,44 @@ namespace PepperDash.Essentials.Core.Bridges
/// <summary>
/// Prints the join map for a device by key
/// </summary>
/// <param name="deviceKey">The key of the device to print the join map for</param>
/// <param name="deviceKey"></param>
public void PrintJoinMapForDevice(string deviceKey)
{
var joinMap = JoinMaps[deviceKey];
if (joinMap == null)
{
this.LogInformation("Unable to find joinMap for device with key: '{deviceKey}'", deviceKey);
Debug.LogMessage(LogEventLevel.Information, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
return;
}
this.LogInformation("Join map for device '{deviceKey}' on EISC '{eiscKey}':", deviceKey, Key);
Debug.LogMessage(LogEventLevel.Information, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
joinMap.PrintJoinMapInfo();
}
/// <summary>
/// Prints the join map for a device by key in Markdown format
/// Prints the join map for a device by key
/// </summary>
/// <param name="deviceKey">The key of the device to print the join map for</param>
/// <param name="bridgeKey">The key of the bridge to use for the Markdown output</param>
/// <param name="deviceKey"></param>
public void MarkdownJoinMapForDevice(string deviceKey, string bridgeKey)
{
var joinMap = JoinMaps[deviceKey];
if (joinMap == null)
{
this.LogInformation("Unable to find joinMap for device with key: '{deviceKey}'", deviceKey);
Debug.LogMessage(LogEventLevel.Information, this, "Unable to find joinMap for device with key: '{0}'", deviceKey);
return;
}
this.LogInformation("Join map for device '{deviceKey}' on EISC '{eiscKey}':", deviceKey, Key);
Debug.LogMessage(LogEventLevel.Information, "Join map for device '{0}' on EISC '{1}':", deviceKey, Key);
joinMap.MarkdownJoinMapInfo(deviceKey, bridgeKey);
}
/// <summary>
/// Used for debugging to trigger an action based on a join number and type
/// </summary>
/// <param name="join">The join number to execute the action for</param>
/// <param name="type">The type of join (digital, analog, serial)</param>
/// <param name="state">The state to pass to the action</param>
/// <param name="join"></param>
/// <param name="type"></param>
/// <param name="state"></param>
public void ExecuteJoinAction(uint join, string type, object state)
{
try
@ -262,202 +238,136 @@ namespace PepperDash.Essentials.Core.Bridges
{
case "digital":
{
if (Eisc.BooleanOutput[join].UserObject is Action<bool> userObject)
var uo = Eisc.BooleanOutput[join].UserObject as Action<bool>;
if (uo != null)
{
this.LogVerbose("Executing Boolean Action");
userObject(Convert.ToBoolean(state));
Debug.LogMessage(LogEventLevel.Verbose, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToBoolean(state));
}
else
this.LogVerbose("User Object is null. Nothing to Execute");
Debug.LogMessage(LogEventLevel.Verbose, this, "User Action is null. Nothing to Execute");
break;
}
case "analog":
{
if (Eisc.UShortOutput[join].UserObject is Action<ushort> userObject)
var uo = Eisc.BooleanOutput[join].UserObject as Action<ushort>;
if (uo != null)
{
this.LogVerbose("Executing Analog Action");
userObject(Convert.ToUInt16(state));
Debug.LogMessage(LogEventLevel.Verbose, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToUInt16(state));
}
else
this.LogVerbose("User Object is null. Nothing to Execute");
break;
Debug.LogMessage(LogEventLevel.Verbose, this, "User Action is null. Nothing to Execute"); break;
}
case "serial":
{
if (Eisc.StringOutput[join].UserObject is Action<string> userObject)
var uo = Eisc.BooleanOutput[join].UserObject as Action<string>;
if (uo != null)
{
this.LogVerbose("Executing Serial Action");
userObject(Convert.ToString(state));
Debug.LogMessage(LogEventLevel.Verbose, this, "Executing Action: {0}", uo.ToString());
uo(Convert.ToString(state));
}
else
this.LogVerbose("User Object is null. Nothing to Execute");
Debug.LogMessage(LogEventLevel.Verbose, this, "User Action is null. Nothing to Execute");
break;
}
default:
{
this.LogVerbose("Unknown join type. Use digital/serial/analog");
Debug.LogMessage(LogEventLevel.Verbose, "Unknown join type. Use digital/serial/analog");
break;
}
}
}
catch (Exception e)
{
this.LogError("ExecuteJoinAction error: {message}", e.Message);
this.LogDebug(e, "Stack Trace: ");
Debug.LogMessage(LogEventLevel.Debug, this, "Error: {0}", e);
}
}
/// <summary>
/// Handle incoming sig changes
/// Handles incoming sig changes
/// </summary>
/// <param name="currentDevice">BasicTriList device that triggered the event</param>
/// <param name="args">Event arguments containing the signal information</param>
/// <param name="currentDevice"></param>
/// <param name="args"></param>
protected void Eisc_SigChange(object currentDevice, SigEventArgs args)
{
try
{
this.LogVerbose("EiscApiAdvanced change: {type} {number}={value}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var userObject = args.Sig.UserObject;
Debug.LogMessage(LogEventLevel.Verbose, this, "EiscApiAdvanced change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
var uo = args.Sig.UserObject;
if (userObject == null) return;
if (uo == null) return;
if (userObject is Action<bool>)
{
this.LogDebug("Executing Boolean Action");
(userObject as Action<bool>)(args.Sig.BoolValue);
}
else if (userObject is Action<ushort>)
{
this.LogDebug("Executing Analog Action");
(userObject as Action<ushort>)(args.Sig.UShortValue);
}
else if (userObject is Action<string>)
{
this.LogDebug("Executing Serial Action");
(userObject as Action<string>)(args.Sig.StringValue);
}
Debug.LogMessage(LogEventLevel.Debug, this, "Executing Action: {0}", uo.ToString());
if (uo is Action<bool>)
(uo as Action<bool>)(args.Sig.BoolValue);
else if (uo is Action<ushort>)
(uo as Action<ushort>)(args.Sig.UShortValue);
else if (uo is Action<string>)
(uo as Action<string>)(args.Sig.StringValue);
}
catch (Exception e)
{
this.LogError("Eisc_SigChange handler error: {message}", e.Message);
this.LogDebug(e, "Stack Trace: ");
Debug.LogMessage(LogEventLevel.Verbose, this, "Error in Eisc_SigChange handler: {0}", e);
}
}
#region Implementation of ICommunicationMonitor
/// <summary>
/// Gets or sets the CommunicationMonitor
/// </summary>
public StatusMonitorBase CommunicationMonitor { get; private set; }
#endregion
}
/// <summary>
/// Represents a EiscApiPropertiesConfig
/// </summary>
public class EiscApiPropertiesConfig
{
/// <summary>
/// Gets or sets the Control
/// </summary>
[JsonProperty("control")]
public EssentialsControlPropertiesConfig Control { get; set; }
/// <summary>
/// Gets or sets the Devices
/// </summary>
[JsonProperty("devices")]
public List<ApiDevicePropertiesConfig> Devices { get; set; }
/// <summary>
/// Gets or sets the Rooms
/// </summary>
[JsonProperty("rooms")]
public List<ApiRoomPropertiesConfig> Rooms { get; set; }
/// <summary>
/// Represents a ApiDevicePropertiesConfig
/// </summary>
public class ApiDevicePropertiesConfig
{
/// <summary>
/// Gets or sets the DeviceKey
/// </summary>
[JsonProperty("deviceKey")]
public string DeviceKey { get; set; }
/// <summary>
/// Gets or sets the JoinStart
/// </summary>
[JsonProperty("joinStart")]
public uint JoinStart { get; set; }
/// <summary>
/// Gets or sets the JoinMapKey
/// </summary>
[JsonProperty("joinMapKey")]
public string JoinMapKey { get; set; }
}
/// <summary>
/// Represents a ApiRoomPropertiesConfig
/// </summary>
public class ApiRoomPropertiesConfig
{
/// <summary>
/// Gets or sets the RoomKey
/// </summary>
[JsonProperty("roomKey")]
public string RoomKey { get; set; }
/// <summary>
/// Gets or sets the JoinStart
/// </summary>
[JsonProperty("joinStart")]
public uint JoinStart { get; set; }
/// <summary>
/// Gets or sets the JoinMapKey
/// </summary>
[JsonProperty("joinMapKey")]
public string JoinMapKey { get; set; }
}
}
/// <summary>
/// Factory class for EiscApiAdvanced devices
/// </summary>
/// <remarks>
/// Supported types:
/// eiscapiadv - Create a standard EISC client over TCP/IP
/// eiscapiadvanced - Create a standard EISC client over TCP/IP
/// eiscapiadvancedserver - Create an EISC server
/// eiscapiadvancedclient - Create an EISC client
/// vceiscapiadv - Create a VC-4 EISC client
/// vceiscapiadvanced - Create a VC-4 EISC client
/// eiscapiadvudp - Create a standard EISC client over UDP
/// eiscapiadvancedudp - Create a standard EISC client over UDP
/// </remarks>
public class EiscApiAdvancedFactory : EssentialsDeviceFactory<EiscApiAdvanced>
{
/// <summary>
/// Constructor
/// </summary>
public EiscApiAdvancedFactory()
{
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced", "eiscapiadvudp", "eiscapiadvancedudp" };
TypeNames = new List<string> { "eiscapiadv", "eiscapiadvanced", "eiscapiadvancedserver", "eiscapiadvancedclient", "vceiscapiadv", "vceiscapiadvanced" };
}
/// <inheritdoc />
public override EssentialsDevice BuildDevice(DeviceConfig dc)
{
Debug.LogDebug("Attempting to create new EiscApiAdvanced Device");
Debug.LogMessage(LogEventLevel.Debug, "Factory Attempting to create new EiscApiAdvanced Device");
var controlProperties = CommFactory.GetControlPropertiesConfig(dc);
@ -465,13 +375,6 @@ namespace PepperDash.Essentials.Core.Bridges
switch (dc.Type.ToLower())
{
case "eiscapiadvudp":
case "eiscapiadvancedudp":
{
eisc = new EthernetIntersystemCommunications(controlProperties.IpIdInt,
controlProperties.TcpSshProperties.Address, Global.ControlSystem);
break;
}
case "eiscapiadv":
case "eiscapiadvanced":
{
@ -494,7 +397,7 @@ namespace PepperDash.Essentials.Core.Bridges
{
if (string.IsNullOrEmpty(controlProperties.RoomId))
{
Debug.LogInformation("Unable to build VC-4 EISC Client for device {deviceKey}. Room ID is missing or empty", dc.Key);
Debug.LogMessage(LogEventLevel.Information, "Unable to build VC-4 EISC Client for device {0}. Room ID is missing or empty", dc.Key);
eisc = null;
break;
}
@ -515,5 +418,3 @@ namespace PepperDash.Essentials.Core.Bridges
return new EiscApiAdvanced(dc, eisc);
}
}
}

View file

@ -3,17 +3,13 @@ using Serilog.Events;
//using PepperDash.Essentials.Devices.Common.Cameras;
namespace PepperDash.Essentials.Core.Bridges
{
namespace PepperDash.Essentials.Core.Bridges;
/// <summary>
/// Helper methods for bridges
/// </summary>
public static class BridgeHelper
{
/// <summary>
/// PrintJoinMp method
/// </summary>
/// <param name="command">target bridgekey to print join map for</param>
public static void PrintJoinMap(string command)
{
var targets = command.Split(' ');
@ -38,9 +34,6 @@ namespace PepperDash.Essentials.Core.Bridges
bridge.PrintJoinMaps();
}
}
/// <summary>
/// JoinmapMarkdown method
/// </summary>
public static void JoinmapMarkdown(string command)
{
var targets = command.Split(' ');
@ -69,5 +62,3 @@ namespace PepperDash.Essentials.Core.Bridges
}
}
}
}

View file

@ -1,19 +1,11 @@
using Crestron.SimplSharpPro.DeviceSupport;
namespace PepperDash.Essentials.Core.Bridges
{
namespace PepperDash.Essentials.Core.Bridges;
/// <summary>
/// Defines the contract for IBridgeAdvanced
/// Defines a device that uses JoinMapBaseAdvanced for its join map
/// </summary>
public interface IBridgeAdvanced
{
/// <summary>
/// Links the bridge to the API using the provided trilist, join start, join map key, and bridge.
/// </summary>
/// <param name="trilist">The trilist to link to.</param>
/// <param name="joinStart">The starting join number.</param>
/// <param name="joinMapKey">The key for the join map.</param>
/// <param name="bridge">The EISC API bridge.</param>
void LinkToApi(BasicTriList trilist, uint joinStart, string joinMapKey, EiscApiAdvanced bridge);
}
}

View file

@ -1,92 +1,53 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a AirMediaControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class AirMediaControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Air Media Online status
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Air Media In Sharing Session status
/// </summary>
[JoinName("IsInSession")]
public JoinDataComplete IsInSession = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media In Sharing Session", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Air Media Has HDMI Video Sync status
/// </summary>
[JoinName("HdmiVideoSync")]
public JoinDataComplete HdmiVideoSync = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Has HDMI Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Air Media Automatic Input Routing Enable(d)
/// </summary>
[JoinName("AutomaticInputRoutingEnabled")]
public JoinDataComplete AutomaticInputRoutingEnabled = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Automatic Input Routing Enable(d)", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Air Media Video Route Select / Feedback
/// </summary>
[JoinName("VideoOut")]
public JoinDataComplete VideoOut = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Video Route Select / Feedback", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Air Media Error Status Feedback
/// </summary>
[JoinName("ErrorFB")]
public JoinDataComplete ErrorFB = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Error Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Air Media Number of Users Connected Feedback
/// </summary>
[JoinName("NumberOfUsersConnectedFB")]
public JoinDataComplete NumberOfUsersConnectedFB = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Number of Users Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Air Media Login Code Set / Get
/// </summary>
[JoinName("LoginCode")]
public JoinDataComplete LoginCode = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Login Code Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Air Media Device Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Air Media IP Address Feedback
/// </summary>
[JoinName("ConnectionAddressFB")]
public JoinDataComplete ConnectionAddressFB = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media IP Address", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Air Media Hostname Feedback
/// </summary>
[JoinName("HostnameFB")]
public JoinDataComplete HostnameFB = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Hostname", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Air Media Serial Number Feedback
/// </summary>
[JoinName("SerialNumberFeedback")]
public JoinDataComplete SerialNumberFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Air Media Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -107,4 +68,3 @@ namespace PepperDash.Essentials.Core.Bridges
/// <param name="type">Type of the child join map</param>
protected AirMediaControllerJoinMap(uint joinStart, Type type) : base(joinStart, type){}
}
}

View file

@ -1,57 +1,33 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a AppleTvJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class AppleTvJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// AppleTv Nav Up
/// </summary>
[JoinName("UpArrow")]
public JoinDataComplete UpArrow = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "AppleTv Nav Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// AppleTv Nav Down
/// </summary>
[JoinName("DnArrow")]
public JoinDataComplete DnArrow = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "AppleTv Nav Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// AppleTv Nav Left
/// </summary>
[JoinName("LeftArrow")]
public JoinDataComplete LeftArrow = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "AppleTv Nav Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// AppleTv Nav Right
/// </summary>
[JoinName("RightArrow")]
public JoinDataComplete RightArrow = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "AppleTv Nav Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// AppleTv Menu
/// </summary>
[JoinName("Menu")]
public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "AppleTv Menu", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// AppleTv Select
/// </summary>
[JoinName("Select")]
public JoinDataComplete Select = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "AppleTv Select", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// AppleTv Play/Pause
/// </summary>
[JoinName("PlayPause")]
public JoinDataComplete PlayPause = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "AppleTv Play/Pause", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
@ -74,4 +50,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,43 +1,25 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a C2nRthsControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class C2nRthsControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// C2nRthsController Online status
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Temp Sensor Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Temperature Format (C/F)
/// </summary>
[JoinName("TemperatureFormat")]
public JoinDataComplete TemperatureFormat = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Temp Sensor Unit Format", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Temperature Sensor Feedbacks
/// </summary>
[JoinName("Temperature")]
public JoinDataComplete Temperature = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Temp Sensor Temperature Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Humidity Sensor Feedbacks
/// </summary>
[JoinName("Humidity")]
public JoinDataComplete Humidity = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Temp Sensor Humidity Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Temp Sensor Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Temp Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -60,4 +42,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,123 +1,52 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
namespace PepperDash.Essentials.Core.Bridges;
/// <summary>
/// Represents a CameraControllerJoinMap
/// Join map for CameraBase devices
/// </summary>
public class CameraControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Tilt Up
/// </summary>
[JoinName("TiltUp")]
public JoinDataComplete TiltUp = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 }, new JoinMetadata { Description = "Tilt Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Tilt Down
/// </summary>
[JoinName("TiltDown")]
public JoinDataComplete TiltDown = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 }, new JoinMetadata { Description = "Tilt Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Pan Left
/// </summary>
[JoinName("PanLeft")]
public JoinDataComplete PanLeft = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 }, new JoinMetadata { Description = "Pan Left", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Pan Right
/// </summary>
[JoinName("PanRight")]
public JoinDataComplete PanRight = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 }, new JoinMetadata { Description = "Pan Right", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Zoom In
/// </summary>
[JoinName("ZoomIn")]
public JoinDataComplete ZoomIn = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 }, new JoinMetadata { Description = "Zoom In", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Zoom Out
/// </summary>
[JoinName("ZoomOut")]
public JoinDataComplete ZoomOut = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 }, new JoinMetadata { Description = "Zoom Out", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Is Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 }, new JoinMetadata { Description = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Power On
/// </summary>
[JoinName("PowerOn")]
public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 }, new JoinMetadata { Description = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Power Off
/// </summary>
[JoinName("PowerOff")]
public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 }, new JoinMetadata { Description = "Power Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Number Of Presets
/// </summary>
[JoinName("NumberOfPresets")]
public JoinDataComplete NumberOfPresets = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 }, new JoinMetadata { Description = "Tells Essentials the number of defined presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Preset Recall Start
/// </summary>
[JoinName("PresetRecallStart")]
public JoinDataComplete PresetRecallStart = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata { Description = "Preset Recall Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Preset Label Start
/// </summary>
[JoinName("PresetLabelStart")]
public JoinDataComplete PresetLabelStart = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 20 }, new JoinMetadata { Description = "Preset Label Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Preset Save Start
/// </summary>
[JoinName("PresetSaveStart")]
public JoinDataComplete PresetSaveStart = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 20 }, new JoinMetadata { Description = "Preset Save Start", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Camera Mode Auto
/// </summary>
[JoinName("CameraModeAuto")]
public JoinDataComplete CameraModeAuto = new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 }, new JoinMetadata { Description = "Camera Mode Auto", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Camera Mode Manual
/// </summary>
[JoinName("CameraModeManual")]
public JoinDataComplete CameraModeManual = new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 }, new JoinMetadata { Description = "Camera Mode Manual", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Camera Mode Off
/// </summary>
[JoinName("CameraModeOff")]
public JoinDataComplete CameraModeOff = new JoinDataComplete(new JoinData { JoinNumber = 53, JoinSpan = 1 }, new JoinMetadata { Description = "Camera Mode Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Supports Camera Mode Manual
/// </summary>
[JoinName("SupportsCameraModeAuto")]
public JoinDataComplete SupportsCameraModeAuto = new JoinDataComplete(new JoinData { JoinNumber = 55, JoinSpan = 1 }, new JoinMetadata { Description = "Supports Camera Mode Auto", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Supports Camera Mode Off
/// </summary>
[JoinName("SupportsCameraModeOff")]
public JoinDataComplete SupportsCameraModeOff = new JoinDataComplete(new JoinData { JoinNumber = 56, JoinSpan = 1 }, new JoinMetadata { Description = "Supports Camera Mode Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Supports Presets
/// </summary>
[JoinName("SupportsPresets")]
public JoinDataComplete SupportsPresets = new JoinDataComplete(new JoinData { JoinNumber = 57, JoinSpan = 1 }, new JoinMetadata { Description = "Supports Presets", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
@ -137,4 +66,3 @@ namespace PepperDash.Essentials.Core.Bridges
/// <param name="type">Type of the child join map</param>
protected CameraControllerJoinMap(uint joinStart, Type type) : base(joinStart, type){}
}
}

View file

@ -1,234 +1,135 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a CenOdtOccupancySensorBaseJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class CenOdtOccupancySensorBaseJoinMap : JoinMapBaseAdvanced
{
#region Digitals
/// <summary>
/// Online
/// </summary>
[JoinName("Online")]
public JoinDataComplete Online = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Force Occupied
/// </summary>
[JoinName("ForceOccupied")]
public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Force Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Force Vacant
/// </summary>
[JoinName("ForceVacant")]
public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Force Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Enable Raw States
/// </summary>
[JoinName("EnableRawStates")]
public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Raw States", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Disable Raw States
/// </summary>
[JoinName("RoomOccupiedFeedback")]
public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Room Occupied Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Grace Occupancy Detected Feedback
/// </summary>
[JoinName("GraceOccupancyDetectedFeedback")]
public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Grace Occupancy Detected Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Room Vacant Feedback
/// </summary>
[JoinName("RoomVacantFeedback")]
public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Room Vacant Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Raw Occupancy Feedback
/// </summary>
[JoinName("RawOccupancyFeedback")]
public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Raw Occupancy Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Raw Occupancy Pir Feedback
/// </summary>
[JoinName("RawOccupancyPirFeedback")]
public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Raw Occupancy Pir Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Raw Occupancy Us Feedback
/// </summary>
[JoinName("RawOccupancyUsFeedback")]
public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "Raw Occupancy Us Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Identity Mode On
/// </summary>
[JoinName("IdentityModeOn")]
public JoinDataComplete IdentityMode = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Identity Mode", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Identity Mode Off
/// </summary>
[JoinName("IdentityModeFeedback")]
public JoinDataComplete IdentityModeFeedback = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "Identity Mode Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Enable Led Flash
/// </summary>
[JoinName("EnableLedFlash")]
public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Led Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Disable Led Flash
/// </summary>
[JoinName("DisableLedFlash")]
public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "Disable Led Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Enable Short Timeout
/// </summary>
[JoinName("EnableShortTimeout")]
public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Disable Short Timeout
/// </summary>
[JoinName("DisableShortTimeout")]
public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "Disable Short Timeout", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Or When Vacated
/// </summary>
[JoinName("OrWhenVacated")]
public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata { Description = "Or When Vacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// And When Vacated
/// </summary>
[JoinName("AndWhenVacated")]
public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 },
new JoinMetadata { Description = "AndWhenVacated", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Enable Us A
/// </summary>
[JoinName("EnableUsA")]
public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Us A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Disable Us A
/// </summary>
[JoinName("DisableUsA")]
public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 },
new JoinMetadata { Description = "Disable Us A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Enable Us B
/// </summary>
[JoinName("EnableUsB")]
public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Us B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Disable Us B
/// </summary>
[JoinName("DisableUsB")]
public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 },
new JoinMetadata { Description = "Disable Us B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Enable Pir
/// </summary>
[JoinName("EnablePir")]
public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Pir", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Disable Pir
/// </summary>
[JoinName("DisablePir")]
public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
new JoinMetadata { Description = "Disable Pir", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Increment Us In Occupied State
/// </summary>
[JoinName("IncrementUsInOccupiedState")]
public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 },
new JoinMetadata { Description = "Increment Us In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Decrement Us In Occupied State
/// </summary>
[JoinName("DecrementUsInOccupiedState")]
public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
new JoinMetadata { Description = "Dencrement Us In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Increment Us In Vacant State
/// </summary>
[JoinName("IncrementUsInVacantState")]
public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 },
new JoinMetadata { Description = "Increment Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Decrement Us In Vacant State
/// </summary>
[JoinName("DecrementUsInVacantState")]
public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 },
new JoinMetadata { Description = "Decrement Us In VacantState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Increment Pir In Occupied State
/// </summary>
[JoinName("IncrementPirInOccupiedState")]
public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 },
new JoinMetadata { Description = "Increment Pir In Occupied State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Decrement Pir In Occupied State
/// </summary>
[JoinName("DecrementPirInOccupiedState")]
public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 },
new JoinMetadata { Description = "Decrement Pir In OccupiedState", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Increment Pir In Vacant State
/// </summary>
[JoinName("IncrementPirInVacantState")]
public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 },
new JoinMetadata { Description = "Increment Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Decrement Pir In Vacant State
/// </summary>
[JoinName("DecrementPirInVacantState")]
public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 },
new JoinMetadata { Description = "Decrement Pir In Vacant State", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
@ -236,51 +137,31 @@ namespace PepperDash.Essentials.Core.Bridges
#endregion
#region Analog
/// <summary>
/// Timeout
/// </summary>
[JoinName("Timeout")]
public JoinDataComplete Timeout = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Timeout Local Feedback
/// </summary>
[JoinName("TimeoutLocalFeedback")]
public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Timeout Local Feedback", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Internal PhotoSensor Value
/// </summary>
[JoinName("InternalPhotoSensorValue")]
public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// External PhotoSensor Value
/// </summary>
[JoinName("UsSensitivityInOccupiedState")]
public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Us Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Us Sensitivity In Vacant State
/// </summary>
[JoinName("UsSensitivityInVacantState")]
public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Us Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Pir Sensitivity In Occupied State
/// </summary>
[JoinName("PirSensitivityInOccupiedState")]
public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "Pir Sensitivity In Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Pir Sensitivity In Vacant State
/// </summary>
[JoinName("PirSensitivityInVacantState")]
public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "Pir Sensitivity In Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
@ -289,9 +170,6 @@ namespace PepperDash.Essentials.Core.Bridges
#region Serial
/// <summary>
/// Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -316,5 +194,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,113 +1,65 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a DisplayControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DisplayControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Power Off
/// </summary>
[JoinName("PowerOff")]
public JoinDataComplete PowerOff = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Power Off", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Power On
/// </summary>
[JoinName("PowerOn")]
public JoinDataComplete PowerOn = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Power On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Is Two Way Display
/// </summary>
[JoinName("IsTwoWayDisplay")]
public JoinDataComplete IsTwoWayDisplay = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Is Two Way Display", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Volume Up
/// </summary>
[JoinName("VolumeUp")]
public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Volume Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Volume Level
/// </summary>
[JoinName("VolumeLevel")]
public JoinDataComplete VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Volume Level", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Volume Down
/// </summary>
[JoinName("VolumeDown")]
public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Volume Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Volume Mute
/// </summary>
[JoinName("VolumeMute")]
public JoinDataComplete VolumeMute = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "Volume Mute", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Volume Mute On
/// </summary>
[JoinName("VolumeMuteOn")]
public JoinDataComplete VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "Volume Mute On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Volume Mute Off
/// </summary>
[JoinName("VolumeMuteOff")]
public JoinDataComplete VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 },
new JoinMetadata { Description = "Volume Mute Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Input Select Offset
/// </summary>
[JoinName("InputSelectOffset")]
public JoinDataComplete InputSelectOffset = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 },
new JoinMetadata { Description = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Input Names Offset
/// </summary>
[JoinName("InputNamesOffset")]
public JoinDataComplete InputNamesOffset = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 },
new JoinMetadata { Description = "Input Names Offset", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Input Select
/// </summary>
[JoinName("InputSelect")]
public JoinDataComplete InputSelect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Input Select", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Button Visibility Offset
/// </summary>
[JoinName("ButtonVisibilityOffset")]
public JoinDataComplete ButtonVisibilityOffset = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 10 },
new JoinMetadata { Description = "Button Visibility Offset", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial });
/// <summary>
/// Is Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 },
new JoinMetadata { Description = "Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
@ -130,4 +82,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,91 +1,52 @@
using System;
namespace PepperDash.Essentials.Core.Bridges {
/// <summary>
/// Represents a DmBladeChassisControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DmBladeChassisControllerJoinMap : JoinMapBaseAdvanced {
/// <summary>
/// DM Blade Chassis Online status
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "DM Blade Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Blade Input Video Sync
/// </summary>
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Blade Chassis Input Endpoint Online
/// </summary>
[JoinName("InputEndpointOnline")]
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Blade Chassis Output Endpoint Online
/// </summary>
[JoinName("OutputEndpointOnline")]
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Blade Chassis Tx Advanced Is Present
/// </summary>
[JoinName("TxAdvancedIsPresent")]
public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Blade Chassis Rx Advanced Is Present
/// </summary>
[JoinName("OutputVideo")]
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Output Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Blade Chassis Input HDCP Support State
/// </summary>
[JoinName("HdcpSupportState")]
public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Blade Chassis Input HDCP Support Capability
/// </summary>
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Blade Chassis Input Names
/// </summary>
[JoinName("InputNames")]
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Blade Chassis Output Names
/// </summary>
[JoinName("OutputNames")]
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Blade Chassis Video Output Currently Routed Video Input Name
/// </summary>
[JoinName("OutputCurrentVideoInputNames")]
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Blade Chassis Input Current Resolution
/// </summary>
[JoinName("InputCurrentResolution")]
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 128 },
new JoinMetadata { Description = "DM Blade Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -110,4 +71,3 @@ namespace PepperDash.Essentials.Core.Bridges {
}
}
}

View file

@ -1,15 +1,9 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a DmChassisControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DmChassisControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// DM Chassis enable audio breakaway routing
/// </summary>
[JoinName("EnableAudioBreakaway")]
public JoinDataComplete EnableAudioBreakaway = new JoinDataComplete(
new JoinData {JoinNumber = 4, JoinSpan = 1},
@ -20,9 +14,6 @@ namespace PepperDash.Essentials.Core.Bridges
JoinType = eJoinType.Digital
});
/// <summary>
/// DM Chassis enable USB breakaway routing
/// </summary>
[JoinName("EnableUsbBreakaway")]
public JoinDataComplete EnableUsbBreakaway = new JoinDataComplete(
new JoinData { JoinNumber = 5, JoinSpan = 1 },
@ -33,142 +24,82 @@ namespace PepperDash.Essentials.Core.Bridges
JoinType = eJoinType.Digital
});
/// <summary>
/// DM Chassis Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM Chassis Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis SystemId Get/Set/Trigger
/// </summary>
[JoinName("SystemId")]
public JoinDataComplete SystemId = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 },
new JoinMetadata { Description = "DM Chassis SystemId Get/Set/Trigger/", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalAnalog });
/// <summary>
/// DM Chassis Online status
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "DM Chassis Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Input Video Sync
/// </summary>
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Input Endpoint Online
/// </summary>
[JoinName("InputEndpointOnline")]
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Output Endpoint Online
/// </summary>
[JoinName("OutputEndpointOnline")]
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Tx Advanced Is Present
/// </summary>
[JoinName("TxAdvancedIsPresent")]
public JoinDataComplete TxAdvancedIsPresent = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Tx Advanced Is Present", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Rx Advanced Is Present
/// </summary>
[JoinName("OutputDisabledByHdcp")]
public JoinDataComplete OutputDisabledByHdcp = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Disabled by HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Output Set / Get
/// </summary>
[JoinName("OutputVideo")]
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Output Audio Set / Get
/// </summary>
[JoinName("OutputAudio")]
public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Input Set / Get
/// </summary>
[JoinName("OutputUsb")]
public JoinDataComplete OutputUsb = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output USB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Input Set / Get
/// </summary>
[JoinName("InputUsb")]
public JoinDataComplete InputUsb = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Usb Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Input HDCP Support State
/// </summary>
[JoinName("HdcpSupportState")]
public JoinDataComplete HdcpSupportState = new JoinDataComplete(new JoinData { JoinNumber = 1001, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input HDCP Support State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Input HDCP Support Capability
/// </summary>
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 1201, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input HDCP Support Capability", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Stream Input Start (1), Stop (2), Pause (3) with Feedback
/// </summary>
[JoinName("InputStreamCardState")]
public JoinDataComplete InputStreamCardState = new JoinDataComplete(new JoinData { JoinNumber = 1501, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Stream Input Start (1), Stop (2), Pause (3) with Feedback", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Stream Output Start (1), Stop (2), Pause (3) with Feedback
/// </summary>
[JoinName("OutputStreamCardState")]
public JoinDataComplete OutputStreamCardState = new JoinDataComplete(new JoinData { JoinNumber = 1601, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Stream Output Start (1), Stop (2), Pause (3) with Feedback", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis No Route Name
/// </summary>
[JoinName("NoRouteName")]
public JoinDataComplete NoRouteName = new JoinDataComplete(new JoinData { JoinNumber = 100, JoinSpan = 1 },
new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Input Names
/// </summary>
[JoinName("InputNames")]
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Output Names
/// </summary>
[JoinName("OutputNames")]
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Video Input Names
/// </summary>
[JoinName("InputVideoNames")] public JoinDataComplete InputVideoNames =
new JoinDataComplete(new JoinData {JoinNumber = 501, JoinSpan = 200},
new JoinMetadata
@ -178,9 +109,6 @@ namespace PepperDash.Essentials.Core.Bridges
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Audio Input Names
/// </summary>
[JoinName("InputAudioNames")]
public JoinDataComplete InputAudioNames =
new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 200 },
@ -190,10 +118,6 @@ namespace PepperDash.Essentials.Core.Bridges
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Video Output Names
/// </summary>
[JoinName("OutputVideoNames")]
public JoinDataComplete OutputVideoNames =
new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 200 },
@ -203,10 +127,6 @@ namespace PepperDash.Essentials.Core.Bridges
JoinCapabilities = eJoinCapabilities.ToFromSIMPL,
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Audio Output Names
/// </summary>
[JoinName("OutputAudioNames")]
public JoinDataComplete OutputAudioNames =
new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 200 },
@ -217,23 +137,14 @@ namespace PepperDash.Essentials.Core.Bridges
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Video Output Currently Routed Video Input Name
/// </summary>
[JoinName("OutputCurrentVideoInputNames")]
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Audio Output Currently Routed Audio Input Name
/// </summary>
[JoinName("OutputCurrentAudioInputNames")]
public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2201, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Input Current Resolution
/// </summary>
[JoinName("InputCurrentResolution")]
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -256,4 +167,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,120 +1,69 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a DmRmcControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DmRmcControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// DM RMC Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM RMC Mute Video
/// </summary>
[JoinName("VideoMuteOn")]
public JoinDataComplete VideoMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Mute Video", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM RMC UnMute Video
/// </summary>
[JoinName("VideoMuteOff")]
public JoinDataComplete VideoMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC UnMute Video", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM RMC Mute Video Toggle
/// </summary>
[JoinName("VideoMuteToggle")]
public JoinDataComplete VideoMuteToggle = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Mute Video Toggle", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM RMC Current Output Resolution
/// </summary>
[JoinName("CurrentOutputResolution")]
public JoinDataComplete CurrentOutputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Current Output Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM RMC EDID Manufacturer
/// </summary>
[JoinName("EdidManufacturer")]
public JoinDataComplete EdidManufacturer = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC EDID Manufacturer", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM RMC EDID Name
/// </summary>
[JoinName("EdidName")]
public JoinDataComplete EdidName = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC EDID Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM RMC EDID Preferred Timing
/// </summary>
[JoinName("EdidPrefferedTiming")]
public JoinDataComplete EdidPrefferedTiming = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC EDID Preferred Timing", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM RMC EDID Serial Number
/// </summary>
[JoinName("EdidSerialNumber")]
public JoinDataComplete EdidSerialNumber = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC EDID Serial Number", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM RMC Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM RMC Audio Video Source Set / Get
/// </summary>
[JoinName("AudioVideoSource")]
public JoinDataComplete AudioVideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Audio Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM RMC HDCP Support Capability
/// </summary>
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC HDCP Support Capability", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM RMC Port 1 (DM) HDCP State Set / Get
/// </summary>
[JoinName("Port1HdcpState")]
public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Port 1 (DM) HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM RMC Port 2 (HDMI) HDCP State Set / Get
/// </summary>
[JoinName("Port2HdcpState")]
public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC Port 2 (HDMI) HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
new JoinMetadata { Description = "DM TX Port 2 (HDMI) HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM RMC HDMI Input Sync
/// </summary>
[JoinName("HdmiInputSync")]
public JoinDataComplete HdmiInputSync = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "DM RMC HDMI Input Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM RMC Number of Input Ports that support HDCP
/// </summary>
[JoinName("HdcpInputPortCount")]
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
@ -140,4 +89,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,127 +1,73 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a DmTxControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DmTxControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// DM TX Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM TX Video Sync
/// </summary>
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM TX Enable Free Run Set / Get
/// </summary>
[JoinName("FreeRunEnabled")]
public JoinDataComplete FreeRunEnabled = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Enable Free Run Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Input 1 Video Sync Status
/// </summary>
[JoinName("Input1VideoSyncStatus")]
public JoinDataComplete Input1VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Input 1 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Input 2 Video Sync Status
/// </summary>
[JoinName("Input2VideoSyncStatus")]
public JoinDataComplete Input2VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Input 2 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Input 3 Video Sync Status
/// </summary>
[JoinName("Input3VideoSyncStatus")]
public JoinDataComplete Input3VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Input 3 Video Sync Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM TX Current Input Resolution
/// </summary>
[JoinName("CurrentInputResolution")]
public JoinDataComplete CurrentInputResolution = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Current Input Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM TX Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM TX Video Input Set / Get
/// </summary>
[JoinName("VideoInput")]
public JoinDataComplete VideoInput = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Video Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX Audio Input Set / Get
/// </summary>
[JoinName("AudioInput")]
public JoinDataComplete AudioInput = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Audio Input Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX HDCP Support Capability
/// </summary>
[JoinName("HdcpSupportCapability")]
public JoinDataComplete HdcpSupportCapability = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX HDCP Support Capability", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX Port 1 HDCP State Set / Get
/// </summary>
[JoinName("Port1HdcpState")]
public JoinDataComplete Port1HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Port 1 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX Port 2 HDCP State Set / Get
/// </summary>
[JoinName("Port2HdcpState")]
public JoinDataComplete Port2HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Port 2 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX VGA Brightness
/// </summary>
[JoinName("VgaBrightness")]
public JoinDataComplete VgaBrightness = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX VGA Brightness", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX VGA Contrast
/// </summary>
[JoinName("VgaContrast")]
public JoinDataComplete VgaContrast = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Online", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX Port 3 HDCP State Set / Get
/// </summary>
[JoinName("Port3HdcpState")]
public JoinDataComplete Port3HdcpState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "DM TX Port 3 HDCP State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM TX Number of Input Ports that support HDCP
/// </summary>
[JoinName("HdcpInputPortCount")]
public JoinDataComplete HdcpInputPortCount = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 },
new JoinMetadata { Description = "Number of Input Ports that support HDCP", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
@ -147,4 +93,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,268 +1,154 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a DmpsAudioOutputControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DmpsAudioOutputControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Master Volume Level Signed dB Set / Get
/// </summary>
[JoinName("MasterVolumeLevel")]
public JoinDataComplete MasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Master Volume 16bit Scaled Set / Get
/// </summary>
[JoinName("MasterVolumeLevelScaled")]
public JoinDataComplete MasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Mixer Preset Recall Set
/// </summary>
[JoinName("MixerPresetRecall")]
public JoinDataComplete MixerPresetRecall = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Mixer Preset Recall Set", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Mixer Eq Preset Recall Set
/// </summary>
[JoinName("MixerEqPresetRecall")]
public JoinDataComplete MixerEqPresetRecall = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Mixer Eq Preset Recall Set", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Master Volume Mute On Set / Get
/// </summary>
[JoinName("MasterVolumeMuteOn")]
public JoinDataComplete MasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Master Volume Mute Off Set / Get
/// </summary>
[JoinName("MasterVolumeMuteOff")]
public JoinDataComplete MasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Master Volume Level Up
/// </summary>
[JoinName("MasterVolumeUp")]
public JoinDataComplete MasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Master Volume Level Down
/// </summary>
[JoinName("MasterVolumeDown")]
public JoinDataComplete MasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Master Volume Scaled Send Enable/Disable
/// </summary>
[JoinName("MasterVolumeLevelScaledSend")]
public JoinDataComplete MasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Source Volume Signed dB Set / Get
/// </summary>
[JoinName("SourceVolumeLevel")]
public JoinDataComplete SourceVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Source Volume 16bit Scaled Set / Get
/// </summary>
[JoinName("SourceVolumeLevelScaled")]
public JoinDataComplete SourceVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Source Volume Mute On Set / Get
/// </summary>
[JoinName("SourceVolumeMuteOn")]
public JoinDataComplete SourceVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Source Volume Mute Off Set / Get
/// </summary>
[JoinName("SourceVolumeMuteOff")]
public JoinDataComplete SourceVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Source Volume Level Up
/// </summary>
[JoinName("SourceVolumeUp")]
public JoinDataComplete SourceVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Source Volume Level Down
/// </summary>
[JoinName("SourceVolumeDown")]
public JoinDataComplete SourceVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Source Volume Scaled Send Enable/Disable
/// </summary>
[JoinName("SourceVolumeLevelScaledSend")]
public JoinDataComplete SourceVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata { Description = "Source Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec1 Volume Signed dB Set / Get
/// </summary>
[JoinName("Codec1VolumeLevel")]
public JoinDataComplete Codec1VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Codec1 Volume 16bit Scaled Set / Get
/// </summary>
[JoinName("Codec1VolumeLevelScaled")]
public JoinDataComplete Codec1VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Codec1 Volume Mute On Set / Get
/// </summary>
[JoinName("Codec1VolumeMuteOn")]
public JoinDataComplete Codec1VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec1 Volume Mute Off Set / Get
/// </summary>
[JoinName("Codec1VolumeMuteOff")]
public JoinDataComplete Codec1VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec1 Volume Level Up
/// </summary>
[JoinName("Codec1VolumeUp")]
public JoinDataComplete Codec1VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec1 Volume Level Down
/// </summary>
[JoinName("Codec1VolumeDown")]
public JoinDataComplete Codec1VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec1 Volume Scaled Send Enable/Disable
/// </summary>
[JoinName("Codec1VolumeLevelScaledSend")]
public JoinDataComplete Codec1VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 },
new JoinMetadata { Description = "Codec1 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec2 Volume Signed dB Set / Get
/// </summary>
[JoinName("Codec2VolumeLevel")]
public JoinDataComplete Codec2VolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Codec2 Volume 16bit Scaled Set / Get
/// </summary>
[JoinName("Codec2VolumeLevelScaled")]
public JoinDataComplete Codec2VolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Codec2 Volume Mute On Set / Get
/// </summary>
[JoinName("Codec2VolumeMuteOn")]
public JoinDataComplete Codec2VolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec2 Volume Mute Off Set / Get
/// </summary>
[JoinName("Codec2VolumeMuteOff")]
public JoinDataComplete Codec2VolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec2 Volume Level Up
/// </summary>
[JoinName("Codec2VolumeUp")]
public JoinDataComplete Codec2VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec2 Volume Level Down
/// </summary>
[JoinName("Codec2VolumeDown")]
public JoinDataComplete Codec2VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Codec2 Volume Scaled Send Enable/Disable
/// </summary>
[JoinName("Codec2VolumeLevelScaledSend")]
public JoinDataComplete Codec2VolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 },
new JoinMetadata { Description = "Codec2 Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// MicsMaster Volume Signed dB Set / Get
/// </summary>
[JoinName("MicsMasterVolumeLevel")]
public JoinDataComplete MicsMasterVolumeLevel = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Signed dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// MicsMaster Volume 16bit Scaled Set / Get
/// </summary>
[JoinName("MicsMasterVolumeLevelScaled")]
public JoinDataComplete MicsMasterVolumeLevelScaled = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// MicsMaster Volume Mute On Set / Get
/// </summary>
[JoinName("MicsMasterVolumeMuteOn")]
public JoinDataComplete MicsMasterVolumeMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// MicsMaster Volume Mute Off Set / Get
/// </summary>
[JoinName("MicsMasterVolumeMuteOff")]
public JoinDataComplete MicsMasterVolumeMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// MicsMaster Volume Level Up
/// </summary>
[JoinName("MicsMasterVolumeUp")]
public JoinDataComplete MicsMasterVolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Level Up", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// MicsMaster Volume Level Down
/// </summary>
[JoinName("MicsMasterVolumeDown")]
public JoinDataComplete MicsMasterVolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 },
new JoinMetadata { Description = "MicsMaster Volume Level Down", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// MicsMaster Volume Scaled Send Enable/Disable
/// </summary>
[JoinName("MicsMasterVolumeLevelScaledSend")]
public JoinDataComplete MicsMasterVolumeLevelScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 },
new JoinMetadata { Description = "Mics Master Volume Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
@ -285,4 +171,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,51 +1,29 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a DmpsMicrophoneControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DmpsMicrophoneControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Mic Gain dB Set / Get
/// </summary>
[JoinName("MicGain")]
public JoinDataComplete MicGain = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Gain dB Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Mic Gain 16bit Scaled Set / Get
/// </summary>
[JoinName("MicGainScaled")]
public JoinDataComplete MicGainScaled = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Gain 16bit Scaled Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Mic Mute On Set / Get
/// </summary>
[JoinName("MicMuteOn")]
public JoinDataComplete MicMuteOn = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Mute On Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Mic Mute Off Set / Get
/// </summary>
[JoinName("MicMuteOff")]
public JoinDataComplete MicMuteOff = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Mute Off Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Mic Gain Scaled Send Enable/Disable
/// </summary>
[JoinName("MicGainScaledSend")]
public JoinDataComplete MicGainScaledSend = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Gain Scaled Send Enable/Disable", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Mic Name Get
/// </summary>
[JoinName("MicName")]
public JoinDataComplete MicName = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Mic Name Get", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -69,4 +47,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,112 +1,67 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a DmpsRoutingControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class DmpsRoutingControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// DMPS Enable Audio and Video Routing
/// </summary>
[JoinName("EnableRouting")]
public JoinDataComplete EnableRouting = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS Enable Audio and Video Routing", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DMPS Disable Audio and Video Routing
/// </summary>
[JoinName("SystemPowerOn")]
public JoinDataComplete SystemPowerOn = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS System Power On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DMPS Disable Audio and Video Routing
/// </summary>
[JoinName("SystemPowerOff")]
public JoinDataComplete SystemPowerOff = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS System Power Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DMPS Front Panel Lock On Get/Set
/// </summary>
[JoinName("FrontPanelLockOn")]
public JoinDataComplete FrontPanelLockOn = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS Front Panel Lock On Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DMPS Front Panel Lock Off Get/Set
/// </summary>
[JoinName("FrontPanelLockOff")]
public JoinDataComplete FrontPanelLockOff = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata { Description = "DMPS Front Panel Lock Off Get/Set", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Input Video Sync
/// </summary>
[JoinName("VideoSyncStatus")]
public JoinDataComplete VideoSyncStatus = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Input Video Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Input Endpoint Online
/// </summary>
[JoinName("InputEndpointOnline")]
public JoinDataComplete InputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Output Endpoint Online
/// </summary>
[JoinName("OutputEndpointOnline")]
public JoinDataComplete OutputEndpointOnline = new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Endpoint Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DM Chassis Input Video Set / Get
/// </summary>
[JoinName("OutputVideo")]
public JoinDataComplete OutputVideo = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Video Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Input Audio Set / Get
/// </summary>
[JoinName("OutputAudio")]
public JoinDataComplete OutputAudio = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Audio Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// DM Chassis Input Name
/// </summary>
[JoinName("InputNames")]
public JoinDataComplete InputNames = new JoinDataComplete(new JoinData { JoinNumber = 101, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Output Name
/// </summary>
[JoinName("OutputNames")]
public JoinDataComplete OutputNames = new JoinDataComplete(new JoinData { JoinNumber = 301, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Video Input Name
/// </summary>
[JoinName("InputVideoNames")]
public JoinDataComplete InputVideoNames =
new JoinDataComplete(new JoinData { JoinNumber = 501, JoinSpan = 32 },
new JoinMetadata
{
Description = "DM Chassis Video Input Name",
Description = "Video Input Name",
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Audio Input Name
/// </summary>
[JoinName("InputAudioNames")]
public JoinDataComplete InputAudioNames =
new JoinDataComplete(new JoinData { JoinNumber = 701, JoinSpan = 32 },
@ -116,10 +71,6 @@ namespace PepperDash.Essentials.Core.Bridges
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Video Output Name
/// </summary>
[JoinName("OutputVideoNames")]
public JoinDataComplete OutputVideoNames =
new JoinDataComplete(new JoinData { JoinNumber = 901, JoinSpan = 32 },
@ -129,10 +80,6 @@ namespace PepperDash.Essentials.Core.Bridges
JoinCapabilities = eJoinCapabilities.ToSIMPL,
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Audio Output Name
/// </summary>
[JoinName("OutputAudioNames")]
public JoinDataComplete OutputAudioNames =
new JoinDataComplete(new JoinData { JoinNumber = 1101, JoinSpan = 32 },
@ -143,23 +90,14 @@ namespace PepperDash.Essentials.Core.Bridges
JoinType = eJoinType.Serial
});
/// <summary>
/// DM Chassis Video Output Currently Routed Video Input Name
/// </summary>
[JoinName("OutputCurrentVideoInputNames")]
public JoinDataComplete OutputCurrentVideoInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2001, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Video Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Audio Output Currently Routed Video Input Name
/// </summary>
[JoinName("OutputCurrentAudioInputNames")]
public JoinDataComplete OutputCurrentAudioInputNames = new JoinDataComplete(new JoinData { JoinNumber = 2201, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Audio Output Currently Routed Video Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// DM Chassis Input Current Resolution
/// </summary>
[JoinName("InputCurrentResolution")]
public JoinDataComplete InputCurrentResolution = new JoinDataComplete(new JoinData { JoinNumber = 2401, JoinSpan = 32 },
new JoinMetadata { Description = "DM Chassis Input Current Resolution", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -182,4 +120,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,10 +1,7 @@
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges.JoinMaps
{
/// <summary>
/// Represents a GenericIrControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges.JoinMaps;
public sealed class GenericIrControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
@ -996,4 +993,3 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
{
}
}
}

View file

@ -1,45 +1,27 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a GenericLightingJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class GenericLightingJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Lighting Controller Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Lighting Controller Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Select Scene By Index
/// </summary>
[JoinName("SelectScene")]
public JoinDataComplete SelectScene = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Lighting Controller Select Scene By Index", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Select Scene Direct
/// </summary>
[JoinName("SelectSceneDirect")]
public JoinDataComplete SelectSceneDirect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 10 },
new JoinMetadata { Description = "Lighting Controller Select Scene", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.DigitalSerial });
/// <summary>
/// Button Visibility
/// </summary>
[JoinName("ButtonVisibility")]
public JoinDataComplete ButtonVisibility = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 10 },
new JoinMetadata { Description = "Lighting Controller Button Visibility", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Set Integration Id
/// </summary>
[JoinName("IntegrationIdSet")]
public JoinDataComplete IntegrationIdSet = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Lighting Controller Set Integration Id", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
@ -64,4 +46,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,16 +1,10 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a GenericRelayControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class GenericRelayControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Device Relay State Set / Get
/// </summary>
[JoinName("Relay")]
public JoinDataComplete Relay = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Device Relay State Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
@ -34,4 +28,3 @@ namespace PepperDash.Essentials.Core.Bridges
}
}
}

View file

@ -1,281 +1,161 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a GlsOccupancySensorBaseJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class GlsOccupancySensorBaseJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Occ Sensor Is Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Is Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Set to Occupied
/// </summary>
[JoinName("ForceOccupied")]
public JoinDataComplete ForceOccupied = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Set to Occupied", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Set to Vacant
/// </summary>
[JoinName("ForceVacant")]
public JoinDataComplete ForceVacant = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Set to Vacant", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Enable Raw
/// </summary>
[JoinName("EnableRawStates")]
public JoinDataComplete EnableRawStates = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Enable Raw", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Disable Raw
/// </summary>
[JoinName("RoomOccupiedFeedback")]
public JoinDataComplete RoomOccupiedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Room Is Occupied", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Grace Occupancy Detected
/// </summary>
[JoinName("GraceOccupancyDetectedFeedback")]
public JoinDataComplete GraceOccupancyDetectedFeedback = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Grace Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Room Is Vacant
/// </summary>
[JoinName("RoomVacantFeedback")]
public JoinDataComplete RoomVacantFeedback = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Room Is Vacant", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Raw Occupancy Detected
/// </summary>
[JoinName("RawOccupancyFeedback")]
public JoinDataComplete RawOccupancyFeedback = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Raw Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Raw PIR Occupancy Detected
/// </summary>
[JoinName("RawOccupancyPirFeedback")]
public JoinDataComplete RawOccupancyPirFeedback = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Raw PIR Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Raw US Occupancy Detected
/// </summary>
[JoinName("RawOccupancyUsFeedback")]
public JoinDataComplete RawOccupancyUsFeedback = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Raw US Occupancy Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Enable LED Flash
/// </summary>
[JoinName("EnableLedFlash")]
public JoinDataComplete EnableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Enable LED Flash", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Disable LED Flash
/// </summary>
[JoinName("DisableLedFlash")]
public JoinDataComplete DisableLedFlash = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Disable LED Flash", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Enable Short Timeout
/// </summary>
[JoinName("EnableShortTimeout")]
public JoinDataComplete EnableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Enable Short Timeout", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Disable Short Timeout
/// </summary>
[JoinName("DisableShortTimeout")]
public JoinDataComplete DisableShortTimeout = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Disable Short Timeout", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Set To Vacant when Either Sensor is Vacant
/// </summary>
[JoinName("OrWhenVacated")]
public JoinDataComplete OrWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Set To Vacant when Either Sensor is Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Set To Vacant when Both Sensors are Vacant
/// </summary>
[JoinName("AndWhenVacated")]
public JoinDataComplete AndWhenVacated = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Set To Vacant when Both Sensors are Vacant", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Enable Ultrasonic Sensor A
/// </summary>
[JoinName("EnableUsA")]
public JoinDataComplete EnableUsA = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Enable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Disable Ultrasonic Sensor A
/// </summary>
[JoinName("DisableUsA")]
public JoinDataComplete DisableUsA = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Disable Ultrasonic Sensor A", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Enable Ultrasonic Sensor B
/// </summary>
[JoinName("EnableUsB")]
public JoinDataComplete EnableUsB = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Enable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Disable Ultrasonic Sensor B
/// </summary>
[JoinName("DisableUsB")]
public JoinDataComplete DisableUsB = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Disable Ultrasonic Sensor B", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Enable IR Sensor
/// </summary>
[JoinName("EnablePir")]
public JoinDataComplete EnablePir = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Enable IR Sensor", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Disable IR Sensor
/// </summary>
[JoinName("DisablePir")]
public JoinDataComplete DisablePir = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Disable IR Sensor", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Increment US Occupied State Sensitivity
/// </summary>
[JoinName("IncrementUsInOccupiedState")]
public JoinDataComplete IncrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Increment US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Decrement US Occupied State Sensitivity
/// </summary>
[JoinName("DecrementUsInOccupiedState")]
public JoinDataComplete DecrementUsInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Decrement US Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Increment US Vacant State Sensitivity
/// </summary>
[JoinName("IncrementUsInVacantState")]
public JoinDataComplete IncrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Increment US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Decrement US Vacant State Sensitivity
/// </summary>
[JoinName("DecrementUsInVacantState")]
public JoinDataComplete DecrementUsInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Decrement US Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Increment IR Occupied State Sensitivity
/// </summary>
[JoinName("IncrementPirInOccupiedState")]
public JoinDataComplete IncrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Increment IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Decrement IR Occupied State Sensitivity
/// </summary>
[JoinName("DecrementPirInOccupiedState")]
public JoinDataComplete DecrementPirInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Decrement IR Occupied State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Increment IR Vacant State Sensitivity
/// </summary>
[JoinName("IncrementPirInVacantState")]
public JoinDataComplete IncrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Increment IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Decrement IR Vacant State Sensitivity
/// </summary>
[JoinName("DecrementPirInVacantState")]
public JoinDataComplete DecrementPirInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Decrement IR Vacant State Sensitivity", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Occ Sensor Timeout Value
/// </summary>
[JoinName("Timeout")]
public JoinDataComplete Timeout = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Timeout Value", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor Local Timeout Value
/// </summary>
[JoinName("TimeoutLocalFeedback")]
public JoinDataComplete TimeoutLocalFeedback = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Local Timeout Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor Internal PhotoSensor Value
/// </summary>
[JoinName("InternalPhotoSensorValue")]
public JoinDataComplete InternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Internal PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor External PhotoSensor Value
/// </summary>
[JoinName("ExternalPhotoSensorValue")]
public JoinDataComplete ExternalPhotoSensorValue = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor External PhotoSensor Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor Ultrasonic Sensitivity in Occupied State
/// </summary>
[JoinName("UsSensitivityInOccupiedState")]
public JoinDataComplete UsSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Ultrasonic Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor Ultrasonic Sensitivity in Vacant State
/// </summary>
[JoinName("UsSensitivityInVacantState")]
public JoinDataComplete UsSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Ultrasonic Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor PIR Sensitivity in Occupied State
/// </summary>
[JoinName("PirSensitivityInOccupiedState")]
public JoinDataComplete PirSensitivityInOccupiedState = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor PIR Sensitivity in Occupied State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor PIR Sensitivity in Vacant State
/// </summary>
[JoinName("PirSensitivityInVacantState")]
public JoinDataComplete PirSensitivityInVacantState = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor PIR Sensitivity in Vacant State", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Occ Sensor Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Occ Sensor Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -301,4 +181,4 @@ namespace PepperDash.Essentials.Core.Bridges
}
}
}

View file

@ -1,19 +1,13 @@
using System;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges.JoinMaps
{
/// <summary>
/// Represents a GlsPartitionSensorJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges.JoinMaps;
public class GlsPartitionSensorJoinMap : JoinMapBaseAdvanced
{
#region Digital
/// <summary>
/// Sensor Is Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(
new JoinData
@ -28,9 +22,7 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
/// <summary>
/// Sensor Enable
/// </summary>
[JoinName("Enable")]
public JoinDataComplete Enable = new JoinDataComplete(
new JoinData
@ -45,9 +37,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
/// <summary>
/// Sensor Partition Sensed
/// </summary>
[JoinName("PartitionSensed")]
public JoinDataComplete PartitionSensed = new JoinDataComplete(
new JoinData
@ -62,9 +51,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
/// <summary>
/// Sensor Partition Not Sensed
/// </summary>
[JoinName("PartitionNotSensed")]
public JoinDataComplete PartitionNotSensed = new JoinDataComplete(
new JoinData
@ -79,9 +65,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
/// <summary>
/// Sensor Increase Sensitivity
/// </summary>
[JoinName("IncreaseSensitivity")]
public JoinDataComplete IncreaseSensitivity = new JoinDataComplete(
new JoinData
@ -96,9 +79,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
JoinType = eJoinType.Digital
});
/// <summary>
/// Sensor Decrease Sensitivity
/// </summary>
[JoinName("DecreaseSensitivity")]
public JoinDataComplete DecreaseSensitivity = new JoinDataComplete(
new JoinData
@ -117,9 +97,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
#region Analog
/// <summary>
/// Sensor Sensitivity
/// </summary>
[JoinName("Sensitivity")]
public JoinDataComplete Sensitivity = new JoinDataComplete(
new JoinData
@ -139,9 +116,6 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
#region Serial
/// <summary>
/// Sensor Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(
new JoinData
@ -180,4 +154,3 @@ namespace PepperDash.Essentials.Core.Bridges.JoinMaps
}
}
}

View file

@ -1,78 +1,45 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a HdMdNxM4kEControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class HdMdNxM4kEControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Device Name
/// </summary>
[JoinName("Name")]
public JoinDataComplete Name = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Device Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Enable Automatic Routing on 4x1 Switchers
/// </summary>
[JoinName("EnableAutoRoute")]
public JoinDataComplete EnableAutoRoute = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Enable Automatic Routing on 4x1 Switchers", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Device Input Name
/// </summary>
[JoinName("InputName")]
public JoinDataComplete InputName = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 8 },
new JoinMetadata { Description = "Device Input Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Device Input Sync
/// </summary>
[JoinName("InputSync")]
public JoinDataComplete InputSync = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 8 },
new JoinMetadata { Description = "Device Input Sync", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Device Output Name
/// </summary>
[JoinName("OutputName")]
public JoinDataComplete OutputName = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 2 },
new JoinMetadata { Description = "Device Output Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Device Output Route Set/Get
/// </summary>
[JoinName("OutputRoute")]
public JoinDataComplete OutputRoute = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 2 },
new JoinMetadata { Description = "Device Output Route Set/Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Device Output Route Name
/// </summary>
[JoinName("OutputRoutedName")]
public JoinDataComplete OutputRoutedName = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 2 },
new JoinMetadata { Description = "Device Output Route Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Device Enable Input Hdcp
/// </summary>
[JoinName("EnableInputHdcp")]
public JoinDataComplete EnableInputHdcp = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 8 },
new JoinMetadata { Description = "Device Enable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Device Disable Input Hdcp
/// </summary>
[JoinName("DisableInputHdcp")]
public JoinDataComplete DisableInputHdcp = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 8 },
new JoinMetadata { Description = "Device Disnable Input Hdcp", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Device Online Status
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 },
new JoinMetadata { Description = "Device Onlne", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
@ -96,4 +63,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,92 +1,54 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a HdMdxxxCEControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class HdMdxxxCEControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Device Online
/// </summary>
[JoinName("IsOnline")]
public JoinDataComplete IsOnline = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Device Online", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Remote End Detected
/// </summary>
[JoinName("RemoteEndDetected")]
public JoinDataComplete RemoteEndDetected = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Device Remote End Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Auto Route On
/// </summary>
[JoinName("AutoRouteOn")]
public JoinDataComplete AutoRouteOn = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Device Auto Route On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Auto Route Off
/// </summary>
[JoinName("AutoRouteOff")]
public JoinDataComplete AutoRouteOff = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Device Auto Route Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Priority Routing On
/// </summary>
[JoinName("PriorityRoutingOn")]
public JoinDataComplete PriorityRoutingOn = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "Device Priority Routing On", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Priority Routing Off
/// </summary>
[JoinName("PriorityRoutingOff")]
public JoinDataComplete PriorityRoutingOff = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "Device Priority Routing Off", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Input On Screen Display Enabled
/// </summary>
[JoinName("InputOnScreenDisplayEnabled")]
public JoinDataComplete InputOnScreenDisplayEnabled = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "Device Input OSD Enabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Input On Screen Display Disabled
/// </summary>
[JoinName("InputOnScreenDisplayDisabled")]
public JoinDataComplete InputOnScreenDisplayDisabled = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "Device Input OSD Disabled", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Sync Detected
/// </summary>
[JoinName("SyncDetected")]
public JoinDataComplete SyncDetected = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 5 },
new JoinMetadata { Description = "Device Sync Detected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Video Source
/// </summary>
[JoinName("VideoSource")]
public JoinDataComplete VideoSource = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 5 },
new JoinMetadata { Description = "Device Video Source Set / Get", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Source Count
/// </summary>
[JoinName("SourceCount")]
public JoinDataComplete SourceCount = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 5 },
new JoinMetadata { Description = "Device Video Source Count", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Source Names
/// </summary>
[JoinName("SourceNames")]
public JoinDataComplete SourceNames = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 5 },
new JoinMetadata { Description = "Device Video Source Name", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
@ -111,4 +73,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,11 +1,8 @@
using System;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a HdPsXxxControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class HdPsXxxControllerJoinMap : JoinMapBaseAdvanced
{
@ -213,4 +210,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,393 +1,225 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a Hrxxx0WirelessRemoteControllerJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class Hrxxx0WirelessRemoteControllerJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Power
/// </summary>
[JoinName("Power")]
public JoinDataComplete Power = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Power", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Menu
/// </summary>
[JoinName("Menu")]
public JoinDataComplete Menu = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Menu", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Guide
/// </summary>
[JoinName("Guide")]
public JoinDataComplete Guide = new JoinDataComplete(new JoinData { JoinNumber = 3, JoinSpan = 1 },
new JoinMetadata { Description = "Guide", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Info
/// </summary>
[JoinName("Info")]
public JoinDataComplete Info = new JoinDataComplete(new JoinData { JoinNumber = 4, JoinSpan = 1 },
new JoinMetadata { Description = "Info", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// VolumeUp
/// </summary>
[JoinName("VolumeUp")]
public JoinDataComplete VolumeUp = new JoinDataComplete(new JoinData { JoinNumber = 5, JoinSpan = 1 },
new JoinMetadata { Description = "VolumeUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// VolumeDown
/// </summary>
[JoinName("VolumeDown")]
public JoinDataComplete VolumeDown = new JoinDataComplete(new JoinData { JoinNumber = 6, JoinSpan = 1 },
new JoinMetadata { Description = "VolumeDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DialPadUp
/// </summary>
[JoinName("DialPadUp")]
public JoinDataComplete DialPadUp = new JoinDataComplete(new JoinData { JoinNumber = 7, JoinSpan = 1 },
new JoinMetadata { Description = "DialPadUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DialPadDown
/// </summary>
[JoinName("DialPadDown")]
public JoinDataComplete DialPadDown = new JoinDataComplete(new JoinData { JoinNumber = 8, JoinSpan = 1 },
new JoinMetadata { Description = "DialPadDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DialPadLeft
/// </summary>
[JoinName("DialPadLeft")]
public JoinDataComplete DialPadLeft = new JoinDataComplete(new JoinData { JoinNumber = 9, JoinSpan = 1 },
new JoinMetadata { Description = "DialPadLeft", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DialPadRight
/// </summary>
[JoinName("DialPadRight")]
public JoinDataComplete DialPadRight = new JoinDataComplete(new JoinData { JoinNumber = 10, JoinSpan = 1 },
new JoinMetadata { Description = "DialPadRight", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// DialPadSelect
/// </summary>
[JoinName("DialPadSelect")]
public JoinDataComplete DialPadSelect = new JoinDataComplete(new JoinData { JoinNumber = 11, JoinSpan = 1 },
new JoinMetadata { Description = "DialPadSelect", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// ChannelUp
/// </summary>
[JoinName("ChannelUp")]
public JoinDataComplete ChannelUp = new JoinDataComplete(new JoinData { JoinNumber = 12, JoinSpan = 1 },
new JoinMetadata { Description = "ChannelUp", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// ChannelDown
/// </summary>
[JoinName("ChannelDown")]
public JoinDataComplete ChannelDown = new JoinDataComplete(new JoinData { JoinNumber = 13, JoinSpan = 1 },
new JoinMetadata { Description = "ChannelDown", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Mute
/// </summary>
[JoinName("Mute")]
public JoinDataComplete Mute = new JoinDataComplete(new JoinData { JoinNumber = 14, JoinSpan = 1 },
new JoinMetadata { Description = "Mute", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Exit
/// </summary>
[JoinName("Exit")]
public JoinDataComplete Exit = new JoinDataComplete(new JoinData { JoinNumber = 15, JoinSpan = 1 },
new JoinMetadata { Description = "Exit", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Last
/// </summary>
[JoinName("Last")]
public JoinDataComplete Last = new JoinDataComplete(new JoinData { JoinNumber = 16, JoinSpan = 1 },
new JoinMetadata { Description = "Last", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Play
/// </summary>
[JoinName("Play")]
public JoinDataComplete Play = new JoinDataComplete(new JoinData { JoinNumber = 17, JoinSpan = 1 },
new JoinMetadata { Description = "Play", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Pause
/// </summary>
[JoinName("Pause")]
public JoinDataComplete Pause = new JoinDataComplete(new JoinData { JoinNumber = 18, JoinSpan = 1 },
new JoinMetadata { Description = "Pause", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Rewind
/// </summary>
[JoinName("Rewind")]
public JoinDataComplete Rewind = new JoinDataComplete(new JoinData { JoinNumber = 19, JoinSpan = 1 },
new JoinMetadata { Description = "Rewind", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// FastForward
/// </summary>
[JoinName("FastForward")]
public JoinDataComplete FastForward = new JoinDataComplete(new JoinData { JoinNumber = 20, JoinSpan = 1 },
new JoinMetadata { Description = "FastForward", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// PreviousTrack
/// </summary>
[JoinName("PreviousTrack")]
public JoinDataComplete PreviousTrack = new JoinDataComplete(new JoinData { JoinNumber = 21, JoinSpan = 1 },
new JoinMetadata { Description = "PreviousTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// NextTrack
/// </summary>
[JoinName("NextTrack")]
public JoinDataComplete NextTrack = new JoinDataComplete(new JoinData { JoinNumber = 22, JoinSpan = 1 },
new JoinMetadata { Description = "NextTrack", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Stop
/// </summary>
[JoinName("Stop")]
public JoinDataComplete Stop = new JoinDataComplete(new JoinData { JoinNumber = 23, JoinSpan = 1 },
new JoinMetadata { Description = "Stop", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Record
/// </summary>
[JoinName("Record")]
public JoinDataComplete Record = new JoinDataComplete(new JoinData { JoinNumber = 24, JoinSpan = 1 },
new JoinMetadata { Description = "Record", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Dvr
/// </summary>
[JoinName("Dvr")]
public JoinDataComplete Dvr = new JoinDataComplete(new JoinData { JoinNumber = 25, JoinSpan = 1 },
new JoinMetadata { Description = "Dvr", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad1
/// </summary>
[JoinName("Keypad1")]
public JoinDataComplete Keypad1 = new JoinDataComplete(new JoinData { JoinNumber = 26, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad2Abc
/// </summary>
[JoinName("Keypad2Abc")]
public JoinDataComplete Keypad2 = new JoinDataComplete(new JoinData { JoinNumber = 27, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad2Abc", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad3Def
/// </summary>
[JoinName("Keypad3Def")]
public JoinDataComplete Keypad3Def = new JoinDataComplete(new JoinData { JoinNumber = 28, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad3Def", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad4Ghi
/// </summary>
[JoinName("Keypad4Ghi")]
public JoinDataComplete Keypad4Ghi = new JoinDataComplete(new JoinData { JoinNumber = 29, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad4Ghi", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad5Jkl
/// </summary>
[JoinName("Keypad5Jkl")]
public JoinDataComplete Keypad5Jkl = new JoinDataComplete(new JoinData { JoinNumber = 30, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad5Jkl", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad6Mno
/// </summary>
[JoinName("Keypad6Mno")]
public JoinDataComplete Keypad6Mno = new JoinDataComplete(new JoinData { JoinNumber = 31, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad6Mno", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad7Pqrs
/// </summary>
[JoinName("Keypad7Pqrs")]
public JoinDataComplete Keypad7Pqrs = new JoinDataComplete(new JoinData { JoinNumber = 32, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad7Pqrs", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad8Tuv
/// </summary>
[JoinName("Keypad8Tuv")]
public JoinDataComplete Keypad8Tuv = new JoinDataComplete(new JoinData { JoinNumber = 33, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad8Tuv", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad9Wxyz
/// </summary>
[JoinName("Keypad9Wxyz")]
public JoinDataComplete Keypad9Wxyz = new JoinDataComplete(new JoinData { JoinNumber = 34, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad9Wxyz", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Keypad0
/// </summary>
[JoinName("Keypad0")]
public JoinDataComplete Keypad0 = new JoinDataComplete(new JoinData { JoinNumber = 35, JoinSpan = 1 },
new JoinMetadata { Description = "Keypad0", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Clear
/// </summary>
[JoinName("Clear")]
public JoinDataComplete Clear = new JoinDataComplete(new JoinData { JoinNumber = 36, JoinSpan = 1 },
new JoinMetadata { Description = "Clear", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Enter
/// </summary>
[JoinName("Enter")]
public JoinDataComplete Enter = new JoinDataComplete(new JoinData { JoinNumber = 37, JoinSpan = 1 },
new JoinMetadata { Description = "Enter", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Red
/// </summary>
[JoinName("Red")]
public JoinDataComplete Red = new JoinDataComplete(new JoinData { JoinNumber = 38, JoinSpan = 1 },
new JoinMetadata { Description = "Red", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Green
/// </summary>
[JoinName("Green")]
public JoinDataComplete Green = new JoinDataComplete(new JoinData { JoinNumber = 39, JoinSpan = 1 },
new JoinMetadata { Description = "Green", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Yellow
/// </summary>
[JoinName("Yellow")]
public JoinDataComplete Yellow = new JoinDataComplete(new JoinData { JoinNumber = 40, JoinSpan = 1 },
new JoinMetadata { Description = "Yellow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Blue
/// </summary>
[JoinName("Blue")]
public JoinDataComplete Blue = new JoinDataComplete(new JoinData { JoinNumber = 41, JoinSpan = 1 },
new JoinMetadata { Description = "Blue", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom1
/// </summary>
[JoinName("Custom1")]
public JoinDataComplete Custom1 = new JoinDataComplete(new JoinData { JoinNumber = 42, JoinSpan = 1 },
new JoinMetadata { Description = "Custom1", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom2
/// </summary>
[JoinName("Custom2")]
public JoinDataComplete Custom2 = new JoinDataComplete(new JoinData { JoinNumber = 43, JoinSpan = 1 },
new JoinMetadata { Description = "Custom2", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom3
/// </summary>
[JoinName("Custom3")]
public JoinDataComplete Custom3 = new JoinDataComplete(new JoinData { JoinNumber = 44, JoinSpan = 1 },
new JoinMetadata { Description = "Custom3", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom4
/// </summary>
[JoinName("Custom4")]
public JoinDataComplete Custom4 = new JoinDataComplete(new JoinData { JoinNumber = 45, JoinSpan = 1 },
new JoinMetadata { Description = "Custom4", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom5
/// </summary>
[JoinName("Custom5")]
public JoinDataComplete Custom5 = new JoinDataComplete(new JoinData { JoinNumber = 46, JoinSpan = 1 },
new JoinMetadata { Description = "Custom5", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom6
/// </summary>
[JoinName("Custom6")]
public JoinDataComplete Custom6 = new JoinDataComplete(new JoinData { JoinNumber = 47, JoinSpan = 1 },
new JoinMetadata { Description = "Custom6", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom7
/// </summary>
[JoinName("Custom7")]
public JoinDataComplete Custom7 = new JoinDataComplete(new JoinData { JoinNumber = 48, JoinSpan = 1 },
new JoinMetadata { Description = "Custom7", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom8
/// </summary>
[JoinName("Custom8")]
public JoinDataComplete Custom8 = new JoinDataComplete(new JoinData { JoinNumber = 49, JoinSpan = 1 },
new JoinMetadata { Description = "Custom8", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Custom9
/// </summary>
[JoinName("Custom9")]
public JoinDataComplete Custom9 = new JoinDataComplete(new JoinData { JoinNumber = 50, JoinSpan = 1 },
new JoinMetadata { Description = "Custom9", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Fav
/// </summary>
[JoinName("Fav")]
public JoinDataComplete Fav = new JoinDataComplete(new JoinData { JoinNumber = 51, JoinSpan = 1 },
new JoinMetadata { Description = "Fav", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Home
/// </summary>
[JoinName("Home")]
public JoinDataComplete Home = new JoinDataComplete(new JoinData { JoinNumber = 52, JoinSpan = 1 },
new JoinMetadata { Description = "Home", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// BatteryLow
/// </summary>
[JoinName("BatteryLow")]
public JoinDataComplete BatteryLow = new JoinDataComplete(new JoinData { JoinNumber = 53, JoinSpan = 1 },
new JoinMetadata { Description = "BatteryLow", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// BatteryCritical
/// </summary>
[JoinName("BatteryCritical")]
public JoinDataComplete BatteryCritical = new JoinDataComplete(new JoinData { JoinNumber = 54, JoinSpan = 1 },
new JoinMetadata { Description = "BatteryCritical", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// BatteryVoltage
/// </summary>
[JoinName("BatteryVoltage")]
public JoinDataComplete BatteryVoltage = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "BatteryVoltage", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
@ -411,4 +243,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,23 +1,13 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a IAnalogInputJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class IAnalogInputJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Input Value
/// </summary>
[JoinName("InputValue")]
public JoinDataComplete InputValue = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Input Value", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
/// <summary>
/// Minimum Change
/// </summary>
[JoinName("MinimumChange")]
public JoinDataComplete MinimumChange = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Minimum voltage change required to reflect a change", JoinCapabilities = eJoinCapabilities.ToFromSIMPL, JoinType = eJoinType.Analog });
@ -41,4 +31,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

View file

@ -1,50 +1,29 @@
using System;
namespace PepperDash.Essentials.Core.Bridges
{
/// <summary>
/// Represents a IBasicCommunicationJoinMap
/// </summary>
namespace PepperDash.Essentials.Core.Bridges;
public class IBasicCommunicationJoinMap : JoinMapBaseAdvanced
{
/// <summary>
/// Text Received From Remote Device
/// </summary>
[JoinName("TextReceived")]
public JoinDataComplete TextReceived = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Text Received From Remote Device", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Text Sent To Remote Device
/// </summary>
[JoinName("SendText")]
public JoinDataComplete SendText = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Text Sent To Remote Device", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Set Port Config
/// </summary>
[JoinName("SetPortConfig")]
public JoinDataComplete SetPortConfig = new JoinDataComplete(new JoinData { JoinNumber = 2, JoinSpan = 1 },
new JoinMetadata { Description = "Set Port Config", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Serial });
/// <summary>
/// Connect
/// </summary>
[JoinName("Connect")]
public JoinDataComplete Connect = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Connect", JoinCapabilities = eJoinCapabilities.FromSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Disconnect
/// </summary>
[JoinName("Connected")]
public JoinDataComplete Connected = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Connected", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Digital });
/// <summary>
/// Status
/// </summary>
[JoinName("Status")]
public JoinDataComplete Status = new JoinDataComplete(new JoinData { JoinNumber = 1, JoinSpan = 1 },
new JoinMetadata { Description = "Status", JoinCapabilities = eJoinCapabilities.ToSIMPL, JoinType = eJoinType.Analog });
@ -68,4 +47,3 @@ namespace PepperDash.Essentials.Core.Bridges
{
}
}
}

Some files were not shown because too many files have changed in this diff Show more