/* * Handles a CEcho request */ protected override void OnReceiveCEchoRequest(byte presentationID, int messageID, string affectedClass) { DicomAction action = server.InitAction("C-ECHO-REQUEST", ProcessType.EchoRequest, this, null); action.PresentationID = presentationID; action.MessageID = messageID; action.Class = affectedClass; StartAction(action); }
/* * Initializes an incoming action. */ public DicomAction InitAction(string actionOp, ProcessType process, Client client, DicomDataSet ds) { DicomAction action = new DicomAction(process, this, client, ds); action.AETitle = client.Association.Calling; action.ipAddress = client.PeerAddress; action.ActionComplete += new DicomAction.ActionCompleteHandler(action_ActionComplete); return(action); }
protected void StartAction(DicomAction action) { if (procThread != null && procThread.IsAlive) { procThread.Abort(); procThread = null; } procThread = new Thread(new ThreadStart(action.DoAction)); procThread.Start(); }
protected override void OnReceiveCFindRequest(byte presentationID, int messageID, string affectedClass, DicomCommandPriorityType priority, DicomDataSet dataSet) { action = server.InitAction("C-FIND-REQUEST", ProcessType.FindRequest, this, dataSet); action.PresentationID = presentationID; action.MessageID = messageID; action.Class = affectedClass; action.Priority = priority; StartAction(action); dataSet.Dispose( ); }
protected override void OnReceiveCStoreRequest(byte presentationID, int messageID, string affectedClass, string instance, DicomCommandPriorityType priority, string moveAE, int moveMessageID, DicomDataSet dataSet) { action = server.InitAction("C-STORE-REQUEST", ProcessType.StoreRequest, this, dataSet); action.PresentationID = presentationID; action.MessageID = messageID; action.Class = affectedClass; action.Instance = instance; action.Priority = priority; action.MoveAETitle = moveAE; action.MoveMessageID = moveMessageID; StartAction(action); dataSet.Dispose( ); }
public DicomAction InitAction(string actionOp, ProcessType process, Client client, DicomDataSet ds) { DicomAction action = new DicomAction(process, this, client, ds); action.AETitle = client.Association.Calling; action.ipAddress = client.PeerAddress; mf.EnableTimer(client, action.AETitle, false); mf.UpdateClient(client, "", actionOp); action.ActionComplete += new DicomAction.ActionCompleteHandler(action_ActionComplete); if (ds != null && SaveDSReceived && !Logger.DisableLogging) { string file; file = LogDS(process.ToString(), client, ds); mf.Log(actionOp, "Received from " + action.AETitle, file); } else { mf.Log(actionOp, "Received from " + action.AETitle); } return(action); }
private void action_ActionComplete(object sender, EventArgs e) { DicomAction action = (DicomAction)sender; mf.EnableTimer(action.Client, action.AETitle, true); }
private void action_ActionComplete(object sender, EventArgs e) { DicomAction action = (DicomAction)sender; }