public void SetController(WireProtocol.IController ctrl)
        {
            if (m_ctrl != null)
            {
                throw new ArgumentException("Controller already initialized");
            }

            if (ctrl == null)
            {
                throw new ArgumentNullException("ctrl");
            }

            m_ctrl = ctrl;
        }
        public void Stop()
        {
            if (m_state.SetValue(State.Value.Stopping))
            {
                m_evtShutdown.Set();

                CancelAllRequests();

                m_notificationThread = null;

                if (m_ctrl != null)
                {
                    m_ctrl.Stop();
                    m_ctrl = null;
                }

                m_state.SetValue(State.Value.Stopped);
            }
        }
        private void InitializeLocal(PortDefinition pd)
        {
            m_portDefinition = pd;
            m_ctrl = new WireProtocol.Controller(WireProtocol.Packet.MARKER_PACKET_V1, this);

            Initialize();
        }