using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using Newtonsoft.Json;
namespace PepperDash.Core
{
///
/// Config properties that indicate how to communicate with a device for control
///
public class ControlPropertiesConfig
{
///
/// The method of control
///
public eControlMethod Method { get; set; }
///
/// The key of the device that contains the control port
///
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
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
public string ControlPortName { get; set; }
///
/// Properties for ethernet based communications
///
public TcpSshPropertiesConfig TcpSshProperties { get; set; }
///
/// The filename and path for the IR file
///
public string IrFile { get; set; }
///
/// The IpId of a Crestron device
///
public string IpId { get; set; }
///
/// Readonly uint representation of the IpId
///
[JsonIgnore]
public uint IpIdInt { get { return Convert.ToUInt32(IpId, 16); } }
///
/// Char indicating end of line
///
public char EndOfLineChar { get; set; }
///
/// Defaults to Environment.NewLine;
///
public string EndOfLineString { get; set; }
///
/// Indicates
///
public string DeviceReadyResponsePattern { get; set; }
///
/// Used when communcating to programs running in VC-4
///
public string RoomId { get; set; }
///
/// Constructor
///
public ControlPropertiesConfig()
{
EndOfLineString = CrestronEnvironment.NewLine;
}
}
}