Cgw.Channel.MonitorChannelManager.AddSotChannel C# (CSharp) Method

AddSotChannel() public method

添加通道到软终端
public AddSotChannel ( string channelLabel, string confAccessCode ) : bool
channelLabel string
confAccessCode string
return bool
        public bool AddSotChannel(string channelLabel, string confAccessCode)
        {
            NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
            bool isSuccess = false;
            logEx.Trace("AddSotChannel channelLabel:{0} confAccessCode:{1}.", channelLabel, confAccessCode);
            string channelCode = CommonFunction.ConvertChannelLabel(channelLabel);

            try
            {
                isSuccess = this.softTerminalAdapter.AddChannel(channelCode, confAccessCode);
                if (isSuccess)
                {
                    logEx.Trace("AddSotChannel channelCode:{0} confAccessCode:{1} successfully.", channelCode, confAccessCode);
                }
                else
                {
                    logEx.Trace("AddSotChannel channelCode:{0} confAccessCode{1} failed.", channelCode, confAccessCode);
                }
            }
            catch (System.Exception ex)
            {
                logEx.Error(ex, "AddSotChannel Exception.");
            }

            return isSuccess;
        }