public void Reset(LcDestination dst) { if (dst.Dst == "") { Reset(); } else if (dst.Dst != _Dst) { _Dst = dst.Dst; _Group = dst.Group; ChangeTxState(LcTxState.Idle); ChangeRxState(LcRxState.Idle, false); } else { _Group = dst.Group; } }
public void Reset(RangeMsg <LcDestination> msg) { Debug.Assert(msg.From + msg.Count <= NumDestinations); for (int i = 0; i < msg.Count; i++) { LcDst dst = _Dst[i + msg.From]; LcDestination info = msg.Info[i]; if (dst.Group != info.Group) { if (dst.Group != 0) //17_01_13 { Debug.Assert(_Groups.ContainsKey(dst.Group)); List <int> members = _Groups[dst.Group]; members.Remove(dst.Id); if (members.Count == 0) { _Groups.Remove(dst.Group); } } if (info.Group != 0)//17_01_13 { List <int> members = null; if (!_Groups.TryGetValue(info.Group, out members)) { members = new List <int>(); _Groups[info.Group] = members; } members.Add(i + msg.From); members.Sort(); } } dst.Reset(info); } General.SafeLaunchEvent(LcChanged, this, (RangeMsg)msg); }