Write() public method

Writes A-ASSOCIATE-RJ to PDU buffer
public Write ( ) : RawPDU
return RawPDU
示例#1
0
        public void AssociateRJ_Write_BytesCorrectlyWritten(byte[] expected, AAssociateRJ reject, string dummy)
        {
            using (var raw = reject.Write())
                using (var stream = new MemoryStream())
                {
                    raw.WritePDU(stream);
                    var actual = stream.ToArray();

                    Assert.Equal(expected, actual);
                }
        }
示例#2
0
 /// <summary>
 /// The UL service-provider may not be capable of supporting the requested 
 /// association. In this situation, it shall return an A-ASSOCIATE confirmation 
 /// primitive to the requestor with an appropriate Result parameter (rejected). The 
 /// Result Source parameter shall be appropriately assigned either the symbolic value 
 /// of “UL service-provider (ACSE related function)” or “UL service-provider 
 /// (Presentation related function).” The indication primitive shall not be issued. 
 /// The association shall not be established.
 /// </summary>
 /// <param name="result"></param>
 /// <param name="source"></param>
 /// <param name="reason"></param>
 protected void SendAssociateReject(DcmRejectResult result, DcmRejectSource source, DcmRejectReason reason)
 {
     Log.Info("{0} -> Association reject [result: {1}; source: {2}; reason: {3}]", LogID, result, source, reason);
     AAssociateRJ pdu = new AAssociateRJ(result, source, reason);
     SendRawPDU(pdu.Write());
 }