v1.0.34.* Updated Device Factory to consume portal generated config format

This commit is contained in:
Neil Dorin
2018-01-23 16:12:38 -07:00
parent 17f147b5e0
commit 29c60548cc
6 changed files with 43 additions and 45 deletions

View File

@@ -144,7 +144,25 @@ namespace PepperDash.Essentials.Core
[JsonConverter(typeof(ComSpecJsonConverter))]
public ComPort.ComPortSpec ComParams { get; set; }
public string CresnetId { get; set; }
public string CresnetId { get; set; }
/// <summary>
/// Attempts to provide uint conversion of string CresnetId
/// </summary>
public uint CresnetIdInt
{
get
{
try
{
return Convert.ToUInt32(CresnetId, 16);
}
catch (Exception)
{
throw new FormatException(string.Format("ERROR:Unable to convert Cresnet ID: {0} to hex. Error:\n{1}", CresnetId));
}
}
}
//public string IpId { get; set; }