public static bool MonitorMtp2(this Device device, Mtp2Config config, ref string jobId) { var atts = new List<DeviceAttribute>(); if (config.DropFisus) atts.Add(new DeviceAttribute("fisu", "no")); if (config.Esnf) atts.Add(new DeviceAttribute("esnf", "yes")); var res = device.NewMtp2Monitor(config.Tag, config.Channel.Span, config.Channel.Timeslots, config.Listener, atts, ref jobId); return res; }
private void MonitorMtp2() { var tag = 0; foreach (var c in _config.Channels) { var mtp2Config = new Mtp2Config { Channel = c, DropFisus = !_config.Fisu, Esnf = _config.Esnf, Listener = _listener, Tag = tag }; tag++; string jobId=null; if (!_device.MonitorMtp2(mtp2Config, ref jobId)) throw new CorelatusException(string.Format("failed to channel {0} for device '{1}'.", tag - 1, _config.Address)); _jobIds.Add(jobId); } }