/// <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 );
        }
Example #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);
        }
 public virtual ActiveAssociation NewActiveAssociation(Association assoc, DcmServiceRegistry services)
 {
     return new ActiveAssociation(assoc, services);
 }
Example #4
0
 public virtual void Close(Association src)
 {
     lock(this)
     {
         closed = true;
         System.Threading.Monitor.PulseAll(this);
     }
 }
Example #5
0
 public virtual void Write(Association src, Dimse dimse)
 {
 }
Example #6
0
 public virtual void Write(Association src, PduI Pdu)
 {
 }
Example #7
0
 public virtual void Received(Association src, PduI Pdu)
 {
 }
Example #8
0
 public virtual void Received(Association src, Dimse dimse)
 {
 }
Example #9
0
 public virtual void Error(Association src, System.IO.IOException ioe)
 {
     Exception = ioe;
 }
Example #10
0
 public virtual void DimseReceived(Association assoc, Dimse dimse)
 {
     if (dimse.Command.IsPending())
     {
         pending.Add(dimse);
     }
     else
     {
         Set(dimse);
     }
 }
Example #11
0
 public virtual void Received(Association src, Dimse dimse)
 {
     a.Received(src, dimse);
     b.Received(src, dimse);
 }
Example #12
0
 public virtual void Received(Association src, PduI pdu)
 {
     a.Received(src, pdu);
     b.Received(src, pdu);
 }
Example #13
0
 public virtual void Error(Association src, System.IO.IOException ioe)
 {
     a.Error(src, ioe);
     b.Error(src, ioe);
 }
Example #14
0
 public virtual void Close(Association src)
 {
     a.Close(src);
     b.Close(src);
 }
Example #15
0
 public virtual void Write(Association src, Dimse dimse)
 {
     a.Write(src, dimse);
     b.Write(src, dimse);
 }
Example #16
0
 public virtual void Write(Association src, PduI pdu)
 {
     a.Write(src, pdu);
     b.Write(src, pdu);
 }