/// <summary>
        ///     执行一个KAE系统命令
        /// </summary>
        /// <param name="msg">执行命令的请求消息</param>
        /// <param name="stateLogger">KAE宿主状态记录器实例</param>
        /// <returns>返回操作的结果</returns>
        public IExecuteResult Execute(MetadataContainer msg, IKAEStateLogger stateLogger)
        {
            Guid kppUniqueId = msg.GetAttributeAsType <Guid>(0x03);

            if (kppUniqueId == Guid.Empty)
            {
                return(ExecuteResult.Fail((byte)KAEErrorCodes.IllegalArgument, string.Empty));
            }
            //stateLogger.Log(string.Format("#[Retrieving KPP Info] #KAE application: {0}, Internal un-rsp count: {1}", kppUniqueId, APPExecuter.Application.UnRspCount));
            //return ExecuteResult.Succeed(APPExecuter.Application.UnRspCount.ToString());
            throw new NotImplementedException();
        }
        /// <summary>
        ///    执行相应的KAE系统命令
        /// </summary>
        /// <param name="msg">系统请求消息</param>
        /// <param name="logger">状态记录器实例</param>
        /// <returns>返回执行后的结果</returns>
        public static IExecuteResult Execute(MetadataContainer msg, IKAEStateLogger logger)
        {
            MessageIdentity   messageIdentity = msg.GetAttributeAsType <MessageIdentity>(0x00);
            IKAESystemCommand command;

            if (!_commands.TryGetValue(messageIdentity, out command))
            {
                return(ExecuteResult.Fail((byte)KAEErrorCodes.NotSupportedCommand, string.Format("#Not supported system command protocol: {0}", messageIdentity)));
            }
            try { return(command.Execute(msg, logger)); }
            catch (Exception ex)
            {
                logger.Log(string.Format("#Occured an unhandled exception while executing a system level KAE command. #Command msg struct: {0}. \r\n#Error: {1}", msg, ex.Message));
                _tracing.Error(ex, null);
                return(ExecuteResult.Fail((byte)KAEErrorCodes.Unknown, ex.Message));
            }
        }