Esempio n. 1
0
 public void Write(AAssociateAC ac)
 {
     FireWrite(ac);
     try
     {
         lock( stream )
         {
             state.Write(ac);
         }
     }
     catch (IOException ioe)
     {
         if (assocListener != null)
             assocListener.Error(assoc, ioe);
         throw ioe;
     }
     this.ac = ac;
 }
Esempio n. 2
0
 internal virtual void Write(AAssociateAC ac)
 {
     throw new SystemException();
 }
Esempio n. 3
0
 internal override void Write(AAssociateAC ac)
 {
     try
     {
         ac.WriteTo(m_fsm.stream);
     }
     catch (IOException e)
     {
         m_fsm.ChangeState(m_fsm.STA1);
         throw e;
     }
     m_fsm.ChangeState(m_fsm.STA6);
 }
Esempio n. 4
0
 private void NegotiateRoleSelection(AAssociateRQ rq, AAssociateAC ac)
 {
     for ( IEnumerator enu= rq.ListRoleSelections().GetEnumerator(); enu.MoveNext(); )
         ac.AddRoleSelection(NegotiateRoleSelection((RoleSelection) enu.Current));
 }
Esempio n. 5
0
 private void NegotiatePresCtx(AAssociateRQ rq, AAssociateAC ac)
 {
     for ( IEnumerator enu= rq.ListPresContext().GetEnumerator(); enu.MoveNext(); )
         ac.AddPresContext(NegotiatePresCtx((PresContext) enu.Current));
 }
Esempio n. 6
0
 private void NegotiateExt(AAssociateRQ rq, AAssociateAC ac)
 {
     for ( IEnumerator enu= rq.ListExtNegotiations().GetEnumerator(); enu.MoveNext(); )
     {
         ExtNegotiation offered = (ExtNegotiation) enu.Current;
         String uid = offered.SOPClassUID;
         ExtNegotiatorI enp = GetExtNegPolicy(uid);
         if (enp != null)
             ac.AddExtNegotiation(new ExtNegotiation(uid, enp.Negotiate(offered.info())));
     }
 }
Esempio n. 7
0
 private PduI doNegotiate(AAssociateRQ rq)
 {
     String appCtx = NegotiateAppCtx(rq.ApplicationContext);
     if (appCtx == null)
     {
         return new AAssociateRJ(AAssociateRJ.REJECTED_PERMANENT, AAssociateRJ.SERVICE_USER, AAssociateRJ.APPLICATION_CONTEXT_NAME_NOT_SUPPORTED);
     }
     AAssociateAC ac = new AAssociateAC();
     ac.ApplicationContext = appCtx;
     ac.CalledAET = rq.CalledAET;
     ac.CallingAET = rq.CallingAET;
     ac.MaxPduLength = this.maxLength;
     ac.ClassUID = this.ClassUID;
     ac.VersionName = this.Vers;
     ac.AsyncOpsWindow = NegotiateAOW(rq.AsyncOpsWindow);
     NegotiatePresCtx(rq, ac);
     NegotiateRoleSelection(rq, ac);
     NegotiateExt(rq, ac);
     return ac;
 }