Skip to content

Commit

Permalink
fis: add json props to control properties config
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-welker committed May 28, 2024
1 parent 9b02152 commit b590bfe
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/Pepperdash Core/Comm/ControlPropertiesConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using Crestron.SimplSharp;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace PepperDash.Core
{
Expand All @@ -12,38 +13,44 @@ public class ControlPropertiesConfig
/// <summary>
/// The method of control
/// </summary>
[JsonProperty("method")]
[JsonConverter(typeof(StringEnumConverter))]
public eControlMethod Method { get; set; }

/// <summary>
/// The key of the device that contains the control port
/// </summary>
[JsonProperty("controlPortDevKey")]
public string ControlPortDevKey { get; set; }

/// <summary>
/// The number of the control port on the device specified by ControlPortDevKey
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
[JsonProperty("controlPortNumber", NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
public uint ControlPortNumber { get; set; }

/// <summary>
/// The name of the control port on the device specified by ControlPortDevKey
/// </summary>
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
[JsonProperty("controlPortName", NullValueHandling = NullValueHandling.Ignore)] // In case "null" is present in config on this value
public string ControlPortName { get; set; }

/// <summary>
/// Properties for ethernet based communications
/// </summary>
[JsonProperty("tcpSshProperties")]
public TcpSshPropertiesConfig TcpSshProperties { get; set; }

/// <summary>
/// The filename and path for the IR file
/// </summary>
[JsonProperty("irFile")]
public string IrFile { get; set; }

/// <summary>
/// The IpId of a Crestron device
/// </summary>
[JsonProperty("ipId")]
public string IpId { get; set; }

/// <summary>
Expand All @@ -55,21 +62,25 @@ public class ControlPropertiesConfig
/// <summary>
/// Char indicating end of line
/// </summary>
[JsonProperty("endOfLineChar")]
public char EndOfLineChar { get; set; }

/// <summary>
/// Defaults to Environment.NewLine;
/// </summary>
[JsonProperty("endOfLineString")]
public string EndOfLineString { get; set; }

/// <summary>
/// Indicates
/// </summary>
[JsonProperty("deviceReadyResponsePattern")]
public string DeviceReadyResponsePattern { get; set; }

/// <summary>
/// Used when communcating to programs running in VC-4
/// </summary>
[JsonProperty("roomId")]
public string RoomId { get; set; }

/// <summary>
Expand Down

0 comments on commit b590bfe

Please sign in to comment.