Example #1
0
        public void OnResponseReceived(NActionResponse resp, Association asc)
        {
            asc.Logger.LogInformation("<-- DIMSE" + resp.GetLogString());
            resp.LogData(asc);
            asc.LastActive = DateTime.Now;
            _dms.RaiseDIMSEResponseReceived(resp, asc);

            //STORAGE COMMITMENT PUSH
            if (resp.AffectedSOPClassUID == AbstractSyntax.StorageCommitment_Push)
            {
                asc.State = NetworkState.ASSOCIATION_ESTABLISHED_WAITING_ON_DATA;
            }
            else
            {
                //Abstract syntax not supported
                if (resp.Status != (ushort)Status.PENDING)
                {
                    AssociationMessenger.SendReleaseRequest(asc);
                }
            }
        }
Example #2
0
        public void OnRequestReceived(NActionRequest req, Association asc)
        {
            asc.Logger.LogInformation("<-- DIMSE" + req.GetLogString());
            req.LogData(asc);
            asc.LastActive = DateTime.Now;
            var resp = new NActionResponse(req, Status.SUCCESS);

            _dms.RaiseDIMSERequestReceived(req, asc);

            //STORAGE COMMITMENT PUSH
            if (req.RequestedSOPClassUID == AbstractSyntax.StorageCommitment_Push)
            {
                resp.Status = (ushort)Status.SUCCESS;
                PDataMessenger.Send(resp, asc);
                PerformStorageCommitment(req, asc);
            }
            else
            {
                //Abstract syntax not supported
                resp.Status = (ushort)Status.FAILURE_UNABLE_TO_PROCESS;
                PDataMessenger.Send(resp, asc);
            }
        }