示例#1
0
        public PayloadProcessorBase(IRadioObject payload, IEnvironment env, ILog log, IEnumerable <MototrboRadio> radios, ITransmitter transmitter, IUIDispatcher uiDispatcher)
        {
            _env          = env;
            _log          = log;
            _radios       = radios;
            _transmitter  = transmitter;
            _uiDispatcher = uiDispatcher;
            rxObject      = payload;

            _radio = GetRadio(payload.Ip);
        }
示例#2
0
        protected MototrboRadio GetRadio(string ip)
        {
            MototrboRadio radio = null;

            if (_radios != null)
            {
                for (int i = 0; i < _radios.Count(); i++)
                {
                    if (_radios.ElementAt(i).IP == ip)
                    {
                        radio = _radios.ElementAt(i);
                        break;
                    }
                }
            }

            return(radio);
        }