I have added a condition to process C-FIND request inside the function handleIncomingCommand() in scp.cc
OFCondition DcmSCP::handleIncomingCommand(T_DIMSE_Message *incomingMsg, const DcmPresentationContextInfo &presInfo, DcmDataset *&reqMessage) { OFCondition cond; if (incomingMsg->CommandField == DIMSE_C_ECHO_RQ) { // Process C-ECHO request cond = handleECHORequest(incomingMsg->msg.CEchoRQ, presInfo.presentationContextID); } else if (incomingMsg->CommandField == DIMSE_C_FIND_RQ) { // Process C-FIND request cond = receiveFINDRequest(incomingMsg->msg.CFindRQ, presInfo.presentationContextID, reqMessage); } else { // We cannot handle this kind of message. Note that the condition will be returned // and that the caller is responsible to end the association if desired. OFString tempStr; DCMNET_ERROR("Cannot handle this kind of DIMSE command (0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(4) << OFstatic_cast(unsigned int, incomingMsg->CommandField) << ")"); DCMNET_DEBUG(DIMSE_dumpMessage(tempStr, *incomingMsg, DIMSE_INCOMING)); cond = DIMSE_BADCOMMANDTYPE; }
and I used the findscu command as findscu -v -d -S -k StudyInstanceUID="*" -aet FINDSCU --call SERVER 127.0.0.1 11112
[quote][/quote] $dcmtk: findscu v3.6.2 2017-07-14 $
D: Request Parameters: D: ====================== BEGIN A-ASSOCIATE-RQ ===================== D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.2 D: Our Implementation Version Name: OFFIS_DCMTK_362 D: Their Implementation Class UID: D: Their Implementation Version Name: D: Application Context Name: 1.2.840.10008.3.1.1.1 D: Calling Application Name: FINDSCU D: Called Application Name: SERVER D: Responding Application Name: SERVER D: Our Max PDU Receive Size: 16384 D: Their Max PDU Receive Size: 0 D: Presentation Contexts: D: Context ID: 1 (Proposed) D: Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel D: Proposed SCP/SCU Role: Default D: Proposed Transfer Syntax(es): D: =LittleEndianExplicit D: =BigEndianExplicit D: =LittleEndianImplicit D: Requested Extended Negotiation: none D: Accepted Extended Negotiation: none D: Requested User Identity Negotiation: none D: User Identity Negotiation Response: none D: ======================= END A-ASSOCIATE-RQ ====================== I: Requesting Association D: setting network send timeout to 60 seconds D: setting network receive timeout to 60 seconds D: Constructing Associate RQ PDU D: PDU Type: Associate Accept, PDU Length: 186 + 6 bytes PDU header D: 02 00 00 00 00 ba 00 01 00 00 53 45 52 56 45 52 D: 20 20 20 20 20 20 20 20 20 20 46 49 4e 44 53 43 D: 55 20 20 20 20 20 20 20 20 20 00 00 00 00 00 00 D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 D: 00 00 00 00 00 00 00 00 00 00 10 00 00 15 31 2e D: 32 2e 38 34 30 2e 31 30 30 30 38 2e 33 2e 31 2e D: 31 2e 31 21 00 00 1b 01 00 00 00 40 00 00 13 31 D: 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32 D: 2e 31 50 00 00 3a 51 00 00 04 00 00 40 00 52 00 D: 00 1b 31 2e 32 2e 32 37 36 2e 30 2e 37 32 33 30 D: 30 31 30 2e 33 2e 30 2e 33 2e 36 2e 32 55 00 00 D: 0f 4f 46 46 49 53 5f 44 43 4d 54 4b 5f 33 36 32 D: D: Parsing an A-ASSOCIATE PDU D: Association Parameters Negotiated: D: ====================== BEGIN A-ASSOCIATE-AC ===================== D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.2 D: Our Implementation Version Name: OFFIS_DCMTK_362 D: Their Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.2 D: Their Implementation Version Name: OFFIS_DCMTK_362 D: Application Context Name: 1.2.840.10008.3.1.1.1 D: Calling Application Name: FINDSCU D: Called Application Name: SERVER D: Responding Application Name: SERVER D: Our Max PDU Receive Size: 16384 D: Their Max PDU Receive Size: 16384 D: Presentation Contexts: D: Context ID: 1 (Accepted) D: Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel D: Proposed SCP/SCU Role: Default D: Accepted SCP/SCU Role: Default D: Accepted Transfer Syntax: =LittleEndianExplicit D: Requested Extended Negotiation: none D: Accepted Extended Negotiation: none D: Requested User Identity Negotiation: none D: User Identity Negotiation Response: none D: ======================= END A-ASSOCIATE-AC ====================== I: Association Accepted (Max Send PDV: 16372) I: Sending Find Request D: ===================== OUTGOING DIMSE MESSAGE ==================== D: Message Type : C-FIND RQ D: Presentation Context ID : 1 D: Message ID : 1 D: Affected SOP Class UID : FINDStudyRootQueryRetrieveInformationModel D: Data Set : present D: Priority : low D: ======================= END DIMSE MESSAGE ======================= I: Request Identifiers: I: I: # Dicom-Data-Set I: # Used TransferSyntax: Little Endian Explicit I: (0020,000d) UI [*] # 2, 1 StudyInstanc eUID I: E: Find Failed, query keys: E: E: # Dicom-File-Format E: E: # Dicom-Meta-Information-Header E: # Used TransferSyntax: Little Endian Explicit E: E: # Dicom-Data-Set E: # Used TransferSyntax: Little Endian Explicit E: (0020,000d) UI [* ] # 2, 1 StudyInstanceUID E: E: 0006:0317 Peer aborted Association (or never connected) I: Peer Aborted Association
Is there any wrong with my query? and what should be added in the function handleIncomingCommand() ?
|