Cgw.Channel.MonitorChannelRelationManager.GetCameraRelaitonChannel C# (CSharp) Method

GetCameraRelaitonChannel() private method

获取跟channelLabel相同摄像头和会议号的通道列表
private GetCameraRelaitonChannel ( string channelLabel, string cameraNo, List &channelLabelList ) : SmcErr
channelLabel string
cameraNo string
channelLabelList List
return Cgw.SmcError.SmcErr
        private SmcErr GetCameraRelaitonChannel(string channelLabel, string cameraNo, out List<string> channelLabelList)
        {
            SmcErr err = new CgwError();
            NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
            channelLabelList = new List<string>();
            string confAccessCode = string.Empty;

            // 查找对应的会议号
            if (this.monitorChannelRelationDic.ContainsKey(channelLabel))
            {
                if (this.monitorChannelRelationDic[channelLabel].CameraNo == cameraNo)
                {
                    confAccessCode = this.monitorChannelRelationDic[channelLabel].ConfAccessCode;
                }
                else
                {
                    err.SetErrorNo(CgwError.ERR_CGW_CHANNEL_NOT_FIND_CHANNELNO);
                    logEx.Trace("GetCameraRelaitonChannel can't find channelLabel:{0}, cameraNo={1}.", channelLabel, cameraNo);
                    return err;
                }
            }
            else
            {
                err.SetErrorNo(CgwError.ERR_CGW_CHANNEL_NOT_FIND_CHANNELNO);
                logEx.Trace("GetCameraRelaitonChannel can't find channelLabel:{0}, cameraNo={1}.", channelLabel, cameraNo);
                return err;
            }

            // 查找关联相同摄像头和相同会议号的通道列表
            foreach (KeyValuePair<string, MonitorChannelRelation> pair in this.monitorChannelRelationDic)
            {
                if (pair.Value.CameraNo == cameraNo && pair.Value.ConfAccessCode == confAccessCode)
                {
                    channelLabelList.Add(pair.Key);
                }
            }

            logEx.Trace("GetCameraRelaitonChannel get channellist channelLabel={0}, cameraNo={1}, count={2}", channelLabel, cameraNo, channelLabelList.Count);
            return err;
        }