From b590bfe97b42c3f18dc1ada023a227bdf965eaa7 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Tue, 28 May 2024 13:19:45 -0500 Subject: [PATCH] fis: add json props to control properties config --- .../Comm/ControlPropertiesConfig.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs b/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs index f342f25..ae01560 100644 --- a/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs +++ b/src/Pepperdash Core/Comm/ControlPropertiesConfig.cs @@ -1,6 +1,7 @@ using System; using Crestron.SimplSharp; using Newtonsoft.Json; +using Newtonsoft.Json.Converters; namespace PepperDash.Core { @@ -12,38 +13,44 @@ namespace PepperDash.Core /// /// The method of control /// + [JsonProperty("method")] + [JsonConverter(typeof(StringEnumConverter))] public eControlMethod Method { get; set; } /// /// The key of the device that contains the control port /// + [JsonProperty("controlPortDevKey")] public string ControlPortDevKey { get; set; } /// /// The number of the control port on the device specified by ControlPortDevKey /// - [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; } /// /// The name of the control port on the device specified by ControlPortDevKey /// - [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; } /// /// Properties for ethernet based communications /// + [JsonProperty("tcpSshProperties")] public TcpSshPropertiesConfig TcpSshProperties { get; set; } /// /// The filename and path for the IR file /// + [JsonProperty("irFile")] public string IrFile { get; set; } /// /// The IpId of a Crestron device /// + [JsonProperty("ipId")] public string IpId { get; set; } /// @@ -55,21 +62,25 @@ namespace PepperDash.Core /// /// Char indicating end of line /// + [JsonProperty("endOfLineChar")] public char EndOfLineChar { get; set; } /// /// Defaults to Environment.NewLine; /// + [JsonProperty("endOfLineString")] public string EndOfLineString { get; set; } /// /// Indicates /// + [JsonProperty("deviceReadyResponsePattern")] public string DeviceReadyResponsePattern { get; set; } /// /// Used when communcating to programs running in VC-4 /// + [JsonProperty("roomId")] public string RoomId { get; set; } ///