示例#1
0
    public static bool OnPdu(EK.Capture.Dicom.DicomToolKit.ProtocolDataUnit pdu)
    {
        switch (pdu.PduType)
        {
        case ProtocolDataUnit.Type.A_ASSOCIATE_RQ:
        {
            AssociateRequestPdu request = pdu as AssociateRequestPdu;
        }
        break;

        case ProtocolDataUnit.Type.A_ASSOCIATE_AC:
        {
            AssociateRequestPdu response = pdu as AssociateRequestPdu;
        }
        break;

        case ProtocolDataUnit.Type.A_ASSOCIATE_RJ:
        {
            AssociateRejectPdu reject = pdu as AssociateRejectPdu;
        }
        break;

        case ProtocolDataUnit.Type.P_DATA_TF:
        {
            PresentationDataPdu message = pdu as PresentationDataPdu;
        }
        break;

        case ProtocolDataUnit.Type.A_RELEASE_RQ:
        {
            AssociationReleasePdu request = pdu as AssociationReleasePdu;
        }
        break;

        case ProtocolDataUnit.Type.A_RELEASE_RP:
        {
            AssociationReleasePdu response = pdu as AssociationReleasePdu;
        }
        break;

        case ProtocolDataUnit.Type.A_ABORT:
        {
            AssociateAbortPdu abort = pdu as AssociateAbortPdu;
        }
        break;
        }

        // return true if you change the pdu, false if you did not
        return(true);
    }
示例#2
0
    // this script logs all pdus to the Debug output
    public static bool OnPdu(EK.Capture.Dicom.DicomToolKit.ProtocolDataUnit pdu)
    {
        Logging.Log(LogLevel.Verbose, pdu.Name);
        string text = String.Format("{0} bytes.", pdu.Length);

        if (pdu.Length < 8192)
        {
            text = pdu.ToText();
        }
        Logging.Log(LogLevel.Verbose, text);

        // we do not change the pdu so we return false
        return(false);
    }
示例#3
0
 public static bool OnPdu(EK.Capture.Dicom.DicomToolKit.ProtocolDataUnit pdu)
 {
     // delay for half a second
     System.Threading.Thread.Sleep(300);
     return(false);
 }