コード例 #1
0
        public void Stop()
        {
            lock (_lock)
            {
                _started = false;
                if (_outboundAssociations != null)
                {
                    _outboundAssociations.Dispose();
                    _outboundAssociations = null;
                }

                if (_inboundAssociations != null)
                {
                    _inboundAssociations.Dispose();
                    _inboundAssociations = null;
                }

                if (_dataRequestQueueEvent != null)
                {
                    _dataRequestQueueEvent.Set();
                    _dataRequestQueueEvent = null;
                }

                if (_dataRequestQueueEvent != null)
                {
                    _dataRequestQueueSet.Dispose();
                    _dataRequestQueueSet = null;
                }

                if (_timer != null)
                {
                    _timer.Dispose();
                }
            }
        }
コード例 #2
0
ファイル: Fragmentation.cs プロジェクト: weimingtom/miniclr
        public void Stop()
        {
            lock (_lock)
            {
                _started = false;
                if (_outboundAssociations != null)
                {
                    _outboundAssociations.Dispose();
                    _outboundAssociations = null;
                }

                if (_inboundAssociations != null)
                {
                    _inboundAssociations.Dispose();
                    _inboundAssociations = null;
                }

                if (_dataRequestQueueEvent != null)
                {
                    _dataRequestQueueEvent.Set();
                    _dataRequestQueueEvent = null;
                }

                if (_dataRequestQueueEvent != null)
                {
                    _dataRequestQueueSet.Dispose();
                    _dataRequestQueueSet = null;
                }

                if (_timer != null)
                {
                    _timer.Dispose();
                }
            }
        }
コード例 #3
0
        public void Start(UInt16 localAddress)
        {
            lock (_lock)
            {
                if (_started)
                {
                    Stop();
                }

                _localShortAddress = localAddress;
                _outboundAssociations = new FragmentationMessageAssociationSet();
                _inboundAssociations = new FragmentationMessageAssociationSet();
                _dataRequestQueueEvent = new AutoResetEvent(false);
                _dataRequestQueueSet = new DataRequestQueueSet(_maxRequestNumberPerDestination, _dataRequestQueueEvent);
                _started = true;
                _timer = new FragmentationMessageTimer(50);
                _transmissionCharacteristicStorage = new TransmissionCharacteristicStorage();
            }
        }
コード例 #4
0
ファイル: Fragmentation.cs プロジェクト: weimingtom/miniclr
        public void Start(UInt16 localAddress)
        {
            lock (_lock)
            {
                if (_started)
                {
                    Stop();
                }

                _localShortAddress     = localAddress;
                _outboundAssociations  = new FragmentationMessageAssociationSet();
                _inboundAssociations   = new FragmentationMessageAssociationSet();
                _dataRequestQueueEvent = new AutoResetEvent(false);
                _dataRequestQueueSet   = new DataRequestQueueSet(_maxRequestNumberPerDestination, _dataRequestQueueEvent);
                _started = true;
                _timer   = new FragmentationMessageTimer(50);
                _transmissionCharacteristicStorage = new TransmissionCharacteristicStorage();
            }
        }