Beispiel #1
0
        public void Reset()
        {
            for (int i = 0; i < _NumDstInState.Length; i++)
            {
                _NumDstInState[i] = 0;
            }
            _NumDstInState[(int)TlfState.Idle] = NumDestinations + NumIaDestinations;

            _Priority.Reset();
            _IntrudedBy.Reset();
            _IntrudeTo.Reset();
            _InterruptedBy.Reset();
            _Listen.Reset();
            _ListenBy.Reset();
            _Transfer.Reset();
            _HangTone.Reset();
            _Unhang.Reset();
            _ConfList.Reset();
            _PickUp.Reset();

            for (int i = 0; i < NumDestinations + NumIaDestinations; i++)
            {
                _Dst[i].Reset();
            }

            General.SafeLaunchEvent(TlfChanged, this, new RangeMsg(0, NumDestinations + NumIaDestinations));
        }
Beispiel #2
0
        public void Reset(RangeMsg <TlfIaDestination> msg)
        {
            Debug.Assert((msg.From >= NumDestinations) && (msg.From + msg.Count <= NumDestinations + NumIaDestinations));

            for (int i = 0; i < msg.Count; i++)
            {
                TlfIaDestination info = msg.Info[i];
                TlfDst           dst  = _Dst[i + msg.From];

                dst.Reset(info);

                // 29112016. JCAM.  Poder intruir una llamada prioritaria desde AI
                if (info.State == TlfState.Idle && IntrudeTo.IsIntrudingTo && IntrudeTo.To == dst.Dst)
                {
                    IntrudeTo.Reset();
                }

                if (dst.PrevState != dst.State)
                {
                    _NumDstInState[(int)dst.PrevState]--;
                    _NumDstInState[(int)dst.State]++;

                    Debug.Assert(_NumDstInState[(int)dst.PrevState] >= 0);
                    Debug.Assert(_NumDstInState[(int)dst.State] >= 0);

                    _Unhang.CheckTlfStChanged(dst);
                    _Priority.CheckTlfStChanged(dst);
                }
            }

            General.SafeLaunchEvent(TlfChanged, this, (RangeMsg)msg);

            if ((_Transfer.State == FunctionState.Ready) &&
                (_NumDstInState[(int)TlfState.Set] + _NumDstInState[(int)TlfState.Conf] != 1))
            {
                _Transfer.State = FunctionState.Idle;
            }
        }
Beispiel #3
0
        public void Reset(RangeMsg <TlfState> msg)
        {
            for (int i = 0; i < msg.Count; i++)
            {
                TlfDst dst = _Dst[i + msg.From];
                dst.Reset(msg.Info[i]);


                if (msg.Info[i] == TlfState.Idle && IntrudeTo.IsIntrudingTo && IntrudeTo.To == dst.Dst)
                {
                    IntrudeTo.Reset();
                }

                if (i + msg.From == IaMappedPosition)
                {
                    _Unhang.CheckTlfStChanged(dst);
                }

                if (dst.PrevState != dst.State)
                {
                    _NumDstInState[(int)dst.PrevState]--;
                    _NumDstInState[(int)dst.State]++;

                    Debug.Assert(_NumDstInState[(int)dst.PrevState] >= 0);
                    Debug.Assert(_NumDstInState[(int)dst.State] >= 0);

                    _Priority.CheckTlfStChanged(dst);
                }
            }

            General.SafeLaunchEvent(TlfChanged, this, (RangeMsg)msg);

            if ((_Transfer.State == FunctionState.Ready) &&
                (_NumDstInState[(int)TlfState.Set] + _NumDstInState[(int)TlfState.Conf] != 1))
            {
                _Transfer.State = FunctionState.Idle;
            }
        }