Esempio n. 1
0
        /// <summary>
        /// 获取ETM版本信息
        /// </summary>
        /// <returns></returns>
        public Entity.Presentation.Monitor.EtmStatus GetEtmVersion()
        {
            Logger.Write(Common.Enum.Log.Log_Type.Info, "准备获取ETM版本信息");

            Entity.Presentation.Monitor.EtmStatus result = new Entity.Presentation.Monitor.EtmStatus();

            try
            {
                if (GetEtmVersionFunc != null)
                {
                    result = GetEtmVersionFunc.Invoke();
                }
            }
            catch (Exception ex)
            {
                Logger.Write(Common.Enum.Log.Log_Type.Error, ex.ToString());
            }

            Logger.Write(Common.Enum.Log.Log_Type.Info, "获取ETM版本信息完成:" + Utility.Converts.Json.Serialize(result));

            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取硬件状态
        /// </summary>
        /// <returns></returns>
        public Entity.Presentation.Monitor.EtmStatus GetHardwareState(ETong.Entity.Presentation.Monitor.Operate operate)
        {
            Logger.Write(Common.Enum.Log.Log_Type.Info, "准备硬件状态:" + ETong.Utility.Converts.Json.Encode(operate));

            Entity.Presentation.Monitor.EtmStatus result = new Entity.Presentation.Monitor.EtmStatus();

            try
            {
                if (GetHardwareStateFunc != null)
                {
                    result = GetHardwareStateFunc.Invoke(operate);
                }
            }
            catch (Exception ex)
            {
                Logger.Write(Common.Enum.Log.Log_Type.Error, ex.ToString());
            }

            Logger.Write(Common.Enum.Log.Log_Type.Info, "获取硬件状态完成:" + Utility.Converts.Json.Serialize(result));

            return(result);
        }