예제 #1
0
 public static void SendReject(Association asc)
 {
     var rej = new Reject
     {
         Result = RejectResult.REJECTED_PERMANENT,
         Reason = (byte) RejectReason_SCU.NO_REASON_GIVEN
     };
     asc.Logger.Log("-->" + rej);
     byte[] rejBytes = rej.Write();
     asc.Stream.Write(rejBytes, 0, rejBytes.Length);
 }
예제 #2
0
 public void RaiseAssociationRejectionReceived(Reject rej, Association asc)
 {
     if (AssociationRejectionReceived != null)
     {
         AssociationRejectionReceived(rej, asc);
     }
 }
예제 #3
0
 public static Message<Reject> ReadAssociationReject(NetworkBinaryReader dr)
 {
     var reject = new Reject();
     dr.Skip(1); //Skip null and header
     dr.Skip(4); //Skip length
     dr.Skip(1); //Skip null
     reject.Result = (RejectResult)dr.Take(1).First();
     reject.Source = (RejectSource)dr.Take(1).First();
     reject.Reason = dr.Take(1).First();
     return new Message<Reject> { Payload = reject, Type = MessageType.PDU };
 }