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();
                }
            }
        }
Exemple #2
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();
                }
            }
        }
        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();
            }
        }
Exemple #4
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();
            }
        }