public DimseStatusCode Send(DicomMessage dicomMessage) { DimseStatusCode statusCode = 0; // TODO Send int dvtStatusCode = 0; switch (dvtStatusCode) { case 0: throw new DicomValidationToolKit.Dul.Services.Exceptions.AssociationReleasedException(); case 1: throw new DicomValidationToolKit.Sockets.Exceptions.SocketConnectionLostException(); case 2: throw new DicomValidationToolKit.Sockets.Exceptions.NoSocketConnectionException(); case 3: throw new DicomValidationToolKit.Dul.Services.Exceptions.NoAssociationException(); default: break; } return(statusCode); }
/* * public void ValidateAndSend(DicomMessage dicomMessage) * { * DicomMessage referenceDicomMessage = null; * bool useDefinitions = true; * this.Validate(dicomMessage, referenceDicomMessage, useDefinitions); * // TODO Send * } */ public DimseStatusCode Receive(out DicomMessage dicomMessage) { DimseStatusCode statusCode = 0; dicomMessage = null; // int dvtStatusCode = 0; // switch (dvtStatusCode) // { // case 0: // throw new DicomValidationToolKit.Dul.Services.Exceptions.AssociationReleasedException(); // case 1: // throw new DicomValidationToolKit.Dul.Services.Exceptions.NoAssociationException(); // case 2: // throw new DicomValidationToolKit.Sockets.Exceptions.NoSocketConnectionException(); // case 3: // throw new DicomValidationToolKit.Sockets.Exceptions.SocketConnectionLostException(); // default: // break; // } // // Receive commandset from unmanaged code. // DimseCommand commandField = DimseCommand.UNDEFINED; // // TODO determine commandfield // bool bDataSetTypeAvailable = false; // // Determine if data set type is available. // if (bDataSetTypeAvailable) // value is 0101H // { // // determine affected or requested sop class uid // System.String sopClassUID = null; // // TODO determine affected sop class UID of message // // receive the dataset // IodId iodId = new IodId(commandField, sopClassUID); //// dicomMessage = new DicomMessage(commandField, iodId); // dicomMessage = new DicomMessage(commandField); // } // else // { // dicomMessage = new DicomMessage(commandField); // } // // fill new message with all received information. // if (dicomMessage == null) throw new Exception(); return(statusCode); }