Exemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="assoc"></param>
        /// <param name="services"></param>
        public ActiveAssociation(Association assoc, DcmServiceRegistry services)
        {
            if (assoc.State != Association.ASSOCIATION_ESTABLISHED)
                throw new SystemException("Association not esrablished - " + assoc.State);

            m_threadPool = new LF_ThreadPool( this );

            this.assoc = assoc;
            this.services = services;
            this.assoc.ActiveAssociation = this;
            this.assoc.SetThreadPool( m_threadPool );
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new instance of DcmULService 
        /// </summary>
        public Fsm(Association assoc, System.Net.Sockets.TcpClient s, bool requestor)
        {
            STA1 = new State1(this, Association.IDLE);
            STA2 = new State2(this, Association.AWAITING_READ_ASS_RQ);
            STA3 = new State3(this, Association.AWAITING_WRITE_ASS_RP);
            STA4 = new State4(this, Association.AWAITING_WRITE_ASS_RQ);
            STA5 = new State5(this, Association.AWAITING_READ_ASS_RP);
            STA6 = new State6(this, Association.ASSOCIATION_ESTABLISHED);
            STA7 = new State7(this, Association.AWAITING_READ_REL_RP);
            STA8 = new State8(this, Association.AWAITING_WRITE_REL_RP);
            STA9 = new State9(this, Association.RCRS_AWAITING_WRITE_REL_RP);
            STA10 = new State10(this, Association.RCAS_AWAITING_READ_REL_RP);
            STA11 = new State11(this, Association.RCRS_AWAITING_READ_REL_RP);
            STA12 = new State12(this, Association.RCAS_AWAITING_WRITE_REL_RP);
            STA13 = new State13(this, Association.ASSOCIATION_TERMINATING);
            state = STA1;

            this.assoc = assoc;
            this.requestor = requestor;
            this.s = s;
            this.stream = (Stream) s.GetStream();
            log.Info(s.ToString());
            ChangeState(requestor?STA4:STA2);
        }
Exemplo n.º 3
0
 public virtual ActiveAssociation NewActiveAssociation(Association assoc, DcmServiceRegistry services)
 {
     return new ActiveAssociation(assoc, services);
 }
Exemplo n.º 4
0
 public virtual void Close(Association src)
 {
     lock(this)
     {
         closed = true;
         System.Threading.Monitor.PulseAll(this);
     }
 }
Exemplo n.º 5
0
 public virtual void Write(Association src, Dimse dimse)
 {
 }
Exemplo n.º 6
0
 public virtual void Write(Association src, PduI Pdu)
 {
 }
Exemplo n.º 7
0
 public virtual void Received(Association src, PduI Pdu)
 {
 }
Exemplo n.º 8
0
 public virtual void Received(Association src, Dimse dimse)
 {
 }
Exemplo n.º 9
0
 public virtual void Error(Association src, System.IO.IOException ioe)
 {
     Exception = ioe;
 }
Exemplo n.º 10
0
 public virtual void DimseReceived(Association assoc, Dimse dimse)
 {
     if (dimse.Command.IsPending())
     {
         pending.Add(dimse);
     }
     else
     {
         Set(dimse);
     }
 }
Exemplo n.º 11
0
 public virtual void Received(Association src, Dimse dimse)
 {
     a.Received(src, dimse);
     b.Received(src, dimse);
 }
Exemplo n.º 12
0
 public virtual void Received(Association src, PduI pdu)
 {
     a.Received(src, pdu);
     b.Received(src, pdu);
 }
Exemplo n.º 13
0
 public virtual void Error(Association src, System.IO.IOException ioe)
 {
     a.Error(src, ioe);
     b.Error(src, ioe);
 }
Exemplo n.º 14
0
 public virtual void Close(Association src)
 {
     a.Close(src);
     b.Close(src);
 }
Exemplo n.º 15
0
 public virtual void Write(Association src, Dimse dimse)
 {
     a.Write(src, dimse);
     b.Write(src, dimse);
 }
Exemplo n.º 16
0
 public virtual void Write(Association src, PduI pdu)
 {
     a.Write(src, pdu);
     b.Write(src, pdu);
 }