diff --git a/ICD.Common.Utils/IcdEnvironment.Standard.cs b/ICD.Common.Utils/IcdEnvironment.Standard.cs index e852ba6..a7a618a 100644 --- a/ICD.Common.Utils/IcdEnvironment.Standard.cs +++ b/ICD.Common.Utils/IcdEnvironment.Standard.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Net; using System.Net.NetworkInformation; using System.Net.Sockets; using System.Text.RegularExpressions; @@ -13,11 +14,6 @@ namespace ICD.Common.Utils { public static string NewLine { get { return Environment.NewLine; } } - public static DateTime GetLocalTime() - { - return DateTime.Now; - } - public static eRuntimeEnvironment RuntimeEnvironment { get { return eRuntimeEnvironment.Standard; } } /// @@ -53,6 +49,36 @@ namespace ICD.Common.Utils } } + /// + /// Gets the dhcp status of the processor. + /// + [PublicAPI] + public static string DhcpStatus + { + get + { + bool enabled = + NetworkInterface.GetAllNetworkInterfaces() + .Where(ni => ni.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 || + ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet) + .Select(ni => ni.GetIPProperties().GetIPv4Properties().IsDhcpEnabled) + .FirstOrDefault(); + + return enabled.ToString(); + } + } + + /// + /// Gets the hostname of the processor. + /// + [PublicAPI] + public static IEnumerable Hostname { get { yield return Dns.GetHostName(); } } + + public static DateTime GetLocalTime() + { + return DateTime.Now; + } + /// /// Converts 12 digit address to XX:XX:XX... format /// diff --git a/ICD.Common.Utils/ProcessorUtils.Standard.cs b/ICD.Common.Utils/ProcessorUtils.Standard.cs index d3fd703..619dc75 100644 --- a/ICD.Common.Utils/ProcessorUtils.Standard.cs +++ b/ICD.Common.Utils/ProcessorUtils.Standard.cs @@ -27,6 +27,32 @@ namespace ICD.Common.Utils } } + /// + /// Gets the date that the firmware was updated. + /// + [PublicAPI] + public static string ModelVersionDate + { + get + { + // TODO + return null; + } + } + + /// + /// Gets the serial number of the processor + /// + [PublicAPI] + public static string ProcessorSerialNumber + { + get + { + // TODO + return null; + } + } + /// /// Gets the ram usage in the range 0 - 1. /// @@ -109,6 +135,29 @@ namespace ICD.Common.Utils throw new NotSupportedException(); } + /// + /// Gets the uptime for the system + /// + /// + [PublicAPI] + public static string GetSystemUptime() + { + // TODO + return null; + } + + /// + /// Gets the uptime + /// + /// + /// + [PublicAPI] + public static string GetProgramUptime(int progslot) + { + // TODO + return null; + } + #endregion } }