예제 #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;
 }
예제 #2
0
 internal virtual void Write(AAssociateAC ac)
 {
     throw new SystemException();
 }
예제 #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);
 }
예제 #4
0
 private void NegotiateRoleSelection(AAssociateRQ rq, AAssociateAC ac)
 {
     for ( IEnumerator enu= rq.ListRoleSelections().GetEnumerator(); enu.MoveNext(); )
         ac.AddRoleSelection(NegotiateRoleSelection((RoleSelection) enu.Current));
 }
예제 #5
0
 private void NegotiatePresCtx(AAssociateRQ rq, AAssociateAC ac)
 {
     for ( IEnumerator enu= rq.ListPresContext().GetEnumerator(); enu.MoveNext(); )
         ac.AddPresContext(NegotiatePresCtx((PresContext) enu.Current));
 }
예제 #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())));
     }
 }
예제 #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;
 }