Public Member Functions | |
DcmSCP () | |
Constructor. | |
virtual | ~DcmSCP () |
Virtual destructor, frees internal memory. | |
virtual OFCondition | listen () |
Starts providing the implemented services to SCUs. | |
virtual OFCondition | addPresentationContext (const OFString &abstractSyntax, const OFList< OFString > xferSyntaxes, const T_ASC_SC_ROLE role=ASC_SC_ROLE_DEFAULT, const OFString &profile="DEFAULT") |
Add abstract syntax to presentation contexts the SCP is able to negotiate with SCUs. | |
void | setPort (const Uint16 port) |
Set SCP's TCP/IP listening port. | |
void | setAETitle (const OFString &aetitle) |
Set AETitle of the server. | |
void | setRespondWithCalledAETitle (const OFBool useCalled) |
Set SCP to use the called AETitle from the SCU request for the response, i.e. the SCP will always respond with setting it's own name to the one the SCU used for calling. | |
virtual OFCondition | loadAssociationCfgFile (const OFString &assocFile) |
Loads association configuration file. | |
virtual OFCondition | setAndCheckAssociationProfile (const OFString &profileName) |
If an association profile should be selected, either by loading an associaton configuration file or using the addAbstractSyntax() function, one of those can be selected and checked for validity using this method. | |
void | forceAssociationRefuse (const OFBool doRefuse) |
Force every association request to be refused by SCP, no matter what the SCU is offering. | |
void | setMaxReceivePDULength (const Uint32 maxRecPDU) |
Set maximum PDU size the SCP is able to receive. | |
OFCondition | enableMultiProcessMode (int argc=0, char *argv[]=NULL) |
Enable multi-process mode for SCP. | |
void | setMaxAssociations (const Uint16 maxAssocs) |
Set number of maximum simultanous associations. | |
void | setDIMSEBlockingMode (const T_DIMSE_BlockingMode blockingMode) |
Set whether DIMSE messaging should be blocking or non-blocking. | |
void | setDIMSETimeout (const Uint32 dimseTimeout) |
Set the timeout to be waited for incoming DIMSE message packets. | |
void | setACSETimeout (const Uint32 acseTimeout) |
Set the timeout used during ACSE messaging protocol. | |
void | setVerbosePCMode (const OFBool mode) |
Set whether to show presentation contexts in verbose or debug mode. | |
Uint16 | getPort () const |
Returns TCP/IP port number SCP listens for new connection requests. | |
const OFString & | getAETitle () const |
Returns SCP's own AE title. | |
OFBool | getRespondWithCalledAETitle () const |
Returns whether SCP uses the called AE Title from SCU requests to respond to connection requests instead of a configured AE Title. | |
OFBool | getRefuseAssociation () const |
Returns whether SCP should refuse any association request no matter what the SCU proposes. | |
Uint32 | getMaxReceivePDULength () const |
Returns maximum PDU length configured to be received by SCP. | |
OFBool | getSingleProcess () const |
Returns whether SCP is running in single or multi-process mode. | |
Uint16 | getMaxAssociations () const |
Returns number of maximum simultanous connections permitted. | |
T_DIMSE_BlockingMode | getDIMSEBlockingMode () const |
Returns whether receiving of DIMSE messages is done in blocking or unblocking mode. | |
Uint32 | getDIMSETimeout () const |
Returns DIMSE timeout (only applicable in blocking mode). | |
Uint32 | getACSETimeout () const |
Returns ACSE timeout. | |
OFBool | getVerbosePCMode () const |
Returns the verbose presentation context mode configured specifying whether details on the presentation contexts (negotiated during association setup) should be shown in verbose or debug mode. | |
OFBool | isConnected () const |
Returns whether SCP is currently connected. | |
Uint16 | numAssociations () const |
Returns number of associations currently running. | |
OFString | getCalledAETitle () const |
Returns AE Title the SCU used as called AE Title in associaton request. | |
OFString | getPeerAETitle () const |
Returns AE Title (calling AE Title) the SCU used for association request. | |
OFString | getPeerIP () const |
Returns IP address of connected SCU. | |
Uint32 | getPeerMaxPDULength () const |
Returns maximum PDU size the communication peer (i.e. the SCU) is able to receive. | |
Protected Member Functions | |
virtual OFCondition | handleIncomingCommand (T_DIMSE_Message *incomingMsg, const DcmPresentationContextInfo &presContextInfo) |
Handle incoming command set and react accordingly, e.g. sending response via DIMSE_sendXXXResponse(). | |
virtual void | notifyAssociationRequest (const T_ASC_Parameters ¶ms, DcmSCPActionType &desiredAction) |
Overwrite this function to be notified about an incoming association request. | |
virtual void | notifyAssociationAcknowledge () |
Overwrite this function to be notified about an incoming association request. | |
virtual void | notifyReleaseRequest () |
Overwrite this function to be notified about an incoming association release request. | |
virtual void | notifyAbortRequest () |
Overwrite this function to be notified about an incoming association abort request. | |
virtual void | notifyAssociationTermination () |
Overwrite this function to be notified when an association is terminated. | |
virtual void | notifyDIMSEError (const OFCondition &cond) |
Overwrite this function to be notified when an association is terminated. | |
virtual OFBool | stopAfterCurrentAssociation () |
Overwrite this function to change the behavior of the listen() method. | |
virtual OFCondition | sendSTOREResponse (T_ASC_PresentationContextID presID, T_DIMSE_C_StoreRQ &reqMessage, T_DIMSE_C_StoreRSP &rspMessage, DcmDataset *statusDetail) |
Respond to storage request. | |
virtual OFCondition | handleECHORequest (T_DIMSE_C_EchoRQ &reqMessage, T_ASC_PresentationContextID presID) |
Standard handler for Verification Service Class (DICOM Echo). | |
virtual OFCondition | handleEVENTREPORTRequest (T_DIMSE_N_EventReportRQ &reqMessage, T_ASC_PresentationContextID presID, DcmDataset *&reqDataset, Uint16 &eventTypeID) |
Receives N-EVENT-REPORT request on the currently opened association and sends a corresponding response. | |
virtual Uint16 | checkEVENTREPORTRequest (T_DIMSE_N_EventReportRQ &reqMessage, DcmDataset *reqDataset) |
Check given N-EVENT-REPORT request and dataset for validity. | |
virtual OFBool | calledAETitleAccepted (const OFString &callingAE, const OFString &calledAE) |
Function that checks for each association request, whether the combination of calling and called AE title proposed by the SCU is accepted. | |
virtual OFCondition | waitForAssociation (T_ASC_Network *network) |
This function takes care of receiving, negotiating and accepting/refusing an association request. | |
virtual void | cleanChildren () |
This function takes care of removing items referring to (terminated) subprocess from the table which stores all subprocess information. | |
virtual OFCondition | negotiateAssociation () |
This function checks all presentation contexts proposed by the SCU whether they are supported or not. | |
virtual void | addProcessToTable (int pid) |
This function adds a process to the table that stores process information (only relevant for multi-process mode under Unix-like systems). | |
virtual void | removeProcessFromTable (int pid) |
This function removes one particular item from the table which stores all subprocess information. | |
virtual void | refuseAssociation (DcmRefuseReasonType reason) |
This function takes care of refusing an assocation request. | |
virtual void | handleAssociation () |
This function takes care of handling the other DICOM application's request. | |
OFCondition | sendDIMSEMessage (const T_ASC_PresentationContextID presID, T_DIMSE_Message *msg, DcmDataset *dataObject, DIMSE_ProgressCallback callback, void *callbackContext, DcmDataset **commandSet=NULL) |
Sends a DIMSE command and possibly also a dataset from a data object via network to another DICOM application. | |
OFCondition | receiveDIMSECommand (T_ASC_PresentationContextID *presID, T_DIMSE_Message *msg, DcmDataset **statusDetail, DcmDataset **commandSet=NULL, const Uint32 timeout=0) |
Receive DIMSE command (excluding dataset!) over the currently open association. | |
OFCondition | receiveDIMSEDataset (T_ASC_PresentationContextID *presID, DcmDataset **dataObject, DIMSE_ProgressCallback callback, void *callbackContext) |
Receives one dataset (of instance data) via network from another DICOM application. | |
Private Member Functions | |
DcmSCP (const DcmSCP &src) | |
Private undefined copy constructor. | |
DcmSCP & | operator= (const DcmSCP &src) |
Private undefined assignment operator. | |
void | dropAndDestroyAssociation () |
Drops association and clears internal structures to free memory. | |
Private Attributes | |
T_ASC_Association * | m_assoc |
Current association run by this SCP. | |
DcmAssociationConfiguration * | m_assocConfig |
Association configuration. | |
OFString | m_assocCfgProfileName |
Profile in association configuration that should be used. | |
Uint16 | m_port |
Port on which the SCP is listening for association requests. The default port is 104. | |
OFString | m_aetitle |
AETitle to be used for responding to SCU (default: DCMTK_SCP). | |
OFBool | m_refuseAssociation |
Indicates if the application shall refuse any association attempt regardless of what the SCU proposes. | |
Uint32 | m_maxReceivePDULength |
Maximum PDU size the SCP is able to receive. | |
OFBool | m_singleProcess |
Indicates if SCP is run in single process mode or not. | |
OFBool | m_forkedChild |
Indicates, that this process was spawn as child from a parent process needed for multiprocess mode under Windows operating systems. | |
Uint16 | m_maxAssociations |
Maximum number of association for multi-process mode. | |
T_DIMSE_BlockingMode | m_blockMode |
Blocking mode for DIMSE operations. | |
Uint32 | m_dimseTimeout |
Timeout for DIMSE operations in seconds. | |
Uint32 | m_acseTimeout |
Timeout for ACSE operations in seconds. | |
OFBool | m_verbosePCMode |
Verbose PC mode. | |
OFList< DcmProcessSlotType * > | m_processTable |
Table of processes for non-single process mode. | |
OFBool | m_respondWithCalledAETitle |
If set, the AE Title as received in the request (called AE Title) is used in response (default: OFTrue). |
Derived classes can add the presentation contexts they want to support, set further parameters (port, peer hostname, etc. as desired) and then call DcmSCP's listen() method to start the server. For incoming associations and DIMSE messages, a derived class can define the behaviour of the server. The DcmSCP base class is capable of responding to C-ECHO requests (Verification SOP Class).
Definition at line 130 of file scp.h.
DcmSCP::DcmSCP | ( | ) |
Constructor.
Initializies internal member variables.
DcmSCP::DcmSCP | ( | const DcmSCP & | src | ) | [private] |
Private undefined copy constructor.
Shall never be called.
src | Source object |
virtual OFCondition DcmSCP::listen | ( | ) | [virtual] |
Starts providing the implemented services to SCUs.
After calling this method the SCP is listening for connection requests.
virtual OFCondition DcmSCP::addPresentationContext | ( | const OFString & | abstractSyntax, | |
const OFList< OFString > | xferSyntaxes, | |||
const T_ASC_SC_ROLE | role = ASC_SC_ROLE_DEFAULT , |
|||
const OFString & | profile = "DEFAULT" | |||
) | [virtual] |
Add abstract syntax to presentation contexts the SCP is able to negotiate with SCUs.
abstractSyntax | [in] The UID of the abstract syntax (e.g. SOP class) to add | |
xferSyntaxes | [in] List of transfer syntaxes (UIDs) that should be supported for the given abstract syntax name | |
role | [in] The role to be negotiated | |
profile | [in] The profile the abstract snytax should be added to. The default is to add it to the DcmSCP's internal standard profile called "DEFAULT". |
void DcmSCP::setPort | ( | const Uint16 | port | ) |
Set SCP's TCP/IP listening port.
port | [in] The port number to listen on. Note that usually on Unix-like systems only root user is permitted to open ports below 1024. |
void DcmSCP::setAETitle | ( | const OFString & | aetitle | ) |
Set AETitle of the server.
aetitle | [in] The AETitle of the server. By default, all SCU association requests calling another AETitle will be rejected. This behaviour can be changed by using the setRespondWithCalledAETitle() method. |
void DcmSCP::setRespondWithCalledAETitle | ( | const OFBool | useCalled | ) |
Set SCP to use the called AETitle from the SCU request for the response, i.e. the SCP will always respond with setting it's own name to the one the SCU used for calling.
Overrides any AETitle eventually set with setAETitle().
useCalled | [in] If OFTrue, the SCP will use the called AE title from the request for responding. DcmSCP's default is OFFalse. |
virtual OFCondition DcmSCP::loadAssociationCfgFile | ( | const OFString & | assocFile | ) | [virtual] |
Loads association configuration file.
assocFile | [in] The filename of the association configuration to be loaded. The association configuration file must be valid for an SCP. |
virtual OFCondition DcmSCP::setAndCheckAssociationProfile | ( | const OFString & | profileName | ) | [virtual] |
If an association profile should be selected, either by loading an associaton configuration file or using the addAbstractSyntax() function, one of those can be selected and checked for validity using this method.
profileName | [in] The name of the association profile which must be configured before being selected here |
void DcmSCP::forceAssociationRefuse | ( | const OFBool | doRefuse | ) |
Force every association request to be refused by SCP, no matter what the SCU is offering.
doRefuse | [in] If OFTrue, every association is being refused. DcmSCP's default is not to refuse every association. |
void DcmSCP::setMaxReceivePDULength | ( | const Uint32 | maxRecPDU | ) |
Set maximum PDU size the SCP is able to receive.
This size is sent in associaton response message to SCU.
maxRecPDU | [in] The maximum PDU size to use in bytes |
OFCondition DcmSCP::enableMultiProcessMode | ( | int | argc = 0 , |
|
char * | argv[] = NULL | |||
) |
Enable multi-process mode for SCP.
For every incoming association, a new process is started. For Unix this is done with the fork() command that creates a copy of the process running and continues executing the code after the fork() called seamlessy. For Windows CreateProcess() is used given the commandline specified in the function's parameters. The created process is handled a copy of the open TCP/IP connection and then is responsible for handling the association. After process fork/creation, DcmSCP is ready for listening to new connection requests.
argc | [in] Number of commandline arguments (only Windows) | |
argv | [in] Command line (only Windows) |
void DcmSCP::setMaxAssociations | ( | const Uint16 | maxAssocs | ) |
Set number of maximum simultanous associations.
Only works for Unix and with multi-process mode enabled.
maxAssocs | [in] Maximum number of simultanous associations |
void DcmSCP::setDIMSEBlockingMode | ( | const T_DIMSE_BlockingMode | blockingMode | ) |
Set whether DIMSE messaging should be blocking or non-blocking.
In non-blocking mode, the networking routines will wait for DIMSE messages for the specified DIMSE timeout time, see setDIMSETimeout() function. In blocking mode, no timeout is set but the operating system's network routines will be used to read from the socket for new data. In the worst case, this may be a long time until that call returns. The default of DcmSCP is blocking mode.
blockingMode | [in] Either DIMSE_BLOCKING for blocking mode or DIMSE_NONBLOCKING for non-blocking mode |
void DcmSCP::setDIMSETimeout | ( | const Uint32 | dimseTimeout | ) |
Set the timeout to be waited for incoming DIMSE message packets.
This is only relevant for DIMSE blocking mode messaging (see also setDIMSEBlockingMode().
dimseTimeout | [in] DIMSE receive timeout in seconds |
void DcmSCP::setACSETimeout | ( | const Uint32 | acseTimeout | ) |
Set the timeout used during ACSE messaging protocol.
acseTimeout | [in] ACSE timeout in seconds. |
void DcmSCP::setVerbosePCMode | ( | const OFBool | mode | ) |
Set whether to show presentation contexts in verbose or debug mode.
mode | [in] Show presentation contexts in verbose mode if OFTrue. By default, the presentation contexts are shown in debug mode. |
Uint16 DcmSCP::getPort | ( | ) | const |
Returns TCP/IP port number SCP listens for new connection requests.
const OFString& DcmSCP::getAETitle | ( | ) | const |
Returns SCP's own AE title.
Only used if the SCP is not configured to respond with the called AE Title the SCU uses for association negotiation, see setRespondWithCalledAETitle().
OFBool DcmSCP::getRespondWithCalledAETitle | ( | ) | const |
Returns whether SCP uses the called AE Title from SCU requests to respond to connection requests instead of a configured AE Title.
OFBool DcmSCP::getRefuseAssociation | ( | ) | const |
Returns whether SCP should refuse any association request no matter what the SCU proposes.
Uint32 DcmSCP::getMaxReceivePDULength | ( | ) | const |
Returns maximum PDU length configured to be received by SCP.
OFBool DcmSCP::getSingleProcess | ( | ) | const |
Returns whether SCP is running in single or multi-process mode.
Uint16 DcmSCP::getMaxAssociations | ( | ) | const |
Returns number of maximum simultanous connections permitted.
Only makes sense for Unix operating systems. For Windows, the number of maximum connections is either "unlimited" or 1. Use getSingleProcess() in that case to find out if SCP is permitting more than one connection.
T_DIMSE_BlockingMode DcmSCP::getDIMSEBlockingMode | ( | ) | const |
Returns whether receiving of DIMSE messages is done in blocking or unblocking mode.
Uint32 DcmSCP::getDIMSETimeout | ( | ) | const |
Returns DIMSE timeout (only applicable in blocking mode).
Uint32 DcmSCP::getACSETimeout | ( | ) | const |
Returns ACSE timeout.
OFBool DcmSCP::getVerbosePCMode | ( | ) | const |
Returns the verbose presentation context mode configured specifying whether details on the presentation contexts (negotiated during association setup) should be shown in verbose or debug mode.
The latter is the default.
OFBool DcmSCP::isConnected | ( | ) | const |
Returns whether SCP is currently connected.
If in multi-process mode, the "father" process should always return false here, because connection is always handled by child process.
Uint16 DcmSCP::numAssociations | ( | ) | const |
Returns number of associations currently running.
Only applicable in Unix-like operating systems. Can only be greater than one when running in multi-process mode.
OFString DcmSCP::getCalledAETitle | ( | ) | const |
Returns AE Title the SCU used as called AE Title in associaton request.
OFString DcmSCP::getPeerAETitle | ( | ) | const |
Returns AE Title (calling AE Title) the SCU used for association request.
OFString DcmSCP::getPeerIP | ( | ) | const |
Returns IP address of connected SCU.
Uint32 DcmSCP::getPeerMaxPDULength | ( | ) | const |
Returns maximum PDU size the communication peer (i.e. the SCU) is able to receive.
virtual OFCondition DcmSCP::handleIncomingCommand | ( | T_DIMSE_Message * | incomingMsg, | |
const DcmPresentationContextInfo & | presContextInfo | |||
) | [protected, virtual] |
Handle incoming command set and react accordingly, e.g. sending response via DIMSE_sendXXXResponse().
The standard handler only knows how to handle an Echo request by calling handleEchoRequest(). This function is most likely to be implemented by a derived class implementing a specific SCP behaviour.
TODO |
virtual void DcmSCP::notifyAssociationRequest | ( | const T_ASC_Parameters & | params, | |
DcmSCPActionType & | desiredAction | |||
) | [protected, virtual] |
Overwrite this function to be notified about an incoming association request.
The standard handler only outputs some information to the logger.
TODO |
virtual void DcmSCP::notifyAssociationAcknowledge | ( | ) | [protected, virtual] |
Overwrite this function to be notified about an incoming association request.
The standard handler only outputs some information to the logger.
virtual void DcmSCP::notifyReleaseRequest | ( | ) | [protected, virtual] |
Overwrite this function to be notified about an incoming association release request.
The standard handler only outputs some information to the logger.
virtual void DcmSCP::notifyAbortRequest | ( | ) | [protected, virtual] |
Overwrite this function to be notified about an incoming association abort request.
The standard handler only outputs some information to the logger.
virtual void DcmSCP::notifyAssociationTermination | ( | ) | [protected, virtual] |
Overwrite this function to be notified when an association is terminated.
The standard handler only outputs some information to the logger.
virtual void DcmSCP::notifyDIMSEError | ( | const OFCondition & | cond | ) | [protected, virtual] |
Overwrite this function to be notified when an association is terminated.
The standard handler only outputs some information to the logger.
TODO |
virtual OFBool DcmSCP::stopAfterCurrentAssociation | ( | ) | [protected, virtual] |
virtual OFCondition DcmSCP::sendSTOREResponse | ( | T_ASC_PresentationContextID | presID, | |
T_DIMSE_C_StoreRQ & | reqMessage, | |||
T_DIMSE_C_StoreRSP & | rspMessage, | |||
DcmDataset * | statusDetail | |||
) | [protected, virtual] |
Respond to storage request.
presID | [in] The presentation context ID to respond to | |
reqMessage | [in] The C-STORE request that is responded to | |
rspMessage | [in] The C-STORE response to be sent | |
statusDetail | [in The status detail to be sent |
virtual OFCondition DcmSCP::handleECHORequest | ( | T_DIMSE_C_EchoRQ & | reqMessage, | |
T_ASC_PresentationContextID | presID | |||
) | [protected, virtual] |
Standard handler for Verification Service Class (DICOM Echo).
Returns echo response (i.e. whether C-ECHO could be responded to with status success).
reqMessage | [in] The C-ECHO request message that was received | |
presID | [in] The presentation context to be used. By default, the presentation context of the request is used. |
virtual OFCondition DcmSCP::handleEVENTREPORTRequest | ( | T_DIMSE_N_EventReportRQ & | reqMessage, | |
T_ASC_PresentationContextID | presID, | |||
DcmDataset *& | reqDataset, | |||
Uint16 & | eventTypeID | |||
) | [protected, virtual] |
Receives N-EVENT-REPORT request on the currently opened association and sends a corresponding response.
Calls checkEVENTREPORTRequest() in order to determine the DIMSE status code to be used for the N-EVENT-REPORT response.
reqMessage | [in] The N-EVENT-REPORT request message that was received | |
presID | [in] The presentation context to be used. By default, the presentation context of the request is used. | |
reqDataset | [out] Pointer to the dataset received | |
eventTypeID | [out] Event Type ID from the command set received |
virtual Uint16 DcmSCP::checkEVENTREPORTRequest | ( | T_DIMSE_N_EventReportRQ & | reqMessage, | |
DcmDataset * | reqDataset | |||
) | [protected, virtual] |
Check given N-EVENT-REPORT request and dataset for validity.
This method is called by handleEVENTREPORTRequest() before sending the response in order to determine the DIMSE status code to be used for the response message.
reqMessage | [in] The N-EVENT-REPORT request message data structure | |
reqDataset | [in] The N-EVENT-REPORT request dataset received. Might be NULL. |
virtual OFBool DcmSCP::calledAETitleAccepted | ( | const OFString & | callingAE, | |
const OFString & | calledAE | |||
) | [protected, virtual] |
Function that checks for each association request, whether the combination of calling and called AE title proposed by the SCU is accepted.
The standard behaviour is to either accept any AE title (if the corresponding option is set) or to only accept the one set with setAETitle(). In the former case, the function also adopts the SCP's AETitle to the one used by the SCU. The method can be overwritten to have full control about which AE title combinations are accepted by the SCP.
callingAE | [in] The AE title the SCU uses as Calling AE Title | |
calledAE | [in] The AE title the SCU uses as Called AE Title |
virtual OFCondition DcmSCP::waitForAssociation | ( | T_ASC_Network * | network | ) | [protected, virtual] |
This function takes care of receiving, negotiating and accepting/refusing an association request.
Additionally, if negotiation was successful, it handles any incoming DIMSE commands by calling handleAssociation(). An error is only returned, if something goes wrong. Therefore, refusing an association because of wrong application context name or no common presentation contexts with the SCU does NOT lead to an error.
network | [in] Contains network parameters |
virtual void DcmSCP::cleanChildren | ( | ) | [protected, virtual] |
This function takes care of removing items referring to (terminated) subprocess from the table which stores all subprocess information.
This function does not make sense for Windows operating systems where the SCP does not have any control over additionally created processes.
virtual OFCondition DcmSCP::negotiateAssociation | ( | ) | [protected, virtual] |
This function checks all presentation contexts proposed by the SCU whether they are supported or not.
It is not an error if no common presentation context could be identified with the SCU; only issues like problems in memory management etc. are reported as an error. This function does not send a response message to the SCU. This is done in other functions.
virtual void DcmSCP::addProcessToTable | ( | int | pid | ) | [protected, virtual] |
This function adds a process to the table that stores process information (only relevant for multi-process mode under Unix-like systems).
pid | [in] The process ID of the sub-process which was just started |
virtual void DcmSCP::removeProcessFromTable | ( | int | pid | ) | [protected, virtual] |
This function removes one particular item from the table which stores all subprocess information.
The corresponding process item to be deleted will be identified by its process ID. This function is only applicable for multi-process mode under Unix-like systems.
pid | [in] Process ID. |
virtual void DcmSCP::refuseAssociation | ( | DcmRefuseReasonType | reason | ) | [protected, virtual] |
This function takes care of refusing an assocation request.
reason | [in] The reason why the association request will be refused and that will be reported to the SCU. |
virtual void DcmSCP::handleAssociation | ( | ) | [protected, virtual] |
This function takes care of handling the other DICOM application's request.
After having accomplished all necessary steps, the association will be dropped and destroyed.
OFCondition DcmSCP::sendDIMSEMessage | ( | const T_ASC_PresentationContextID | presID, | |
T_DIMSE_Message * | msg, | |||
DcmDataset * | dataObject, | |||
DIMSE_ProgressCallback | callback, | |||
void * | callbackContext, | |||
DcmDataset ** | commandSet = NULL | |||
) | [protected] |
Sends a DIMSE command and possibly also a dataset from a data object via network to another DICOM application.
presID | [in] Presentation context ID to be used for message | |
msg | [in] Structure that represents a certain DIMSE command which shall be sent | |
dataObject | [in] The instance data which shall be sent to the other DICOM application; NULL, if there is none | |
callback | [in] Pointer to a function which shall be called to indicate progress | |
callbackContext | [in] Pointer to data which shall be passed to the progress indicating function | |
commandSet | [out] If this parameter is not NULL it will return a copy of the DIMSE command which is sent to the other DICOM application |
OFCondition DcmSCP::receiveDIMSECommand | ( | T_ASC_PresentationContextID * | presID, | |
T_DIMSE_Message * | msg, | |||
DcmDataset ** | statusDetail, | |||
DcmDataset ** | commandSet = NULL , |
|||
const Uint32 | timeout = 0 | |||
) | [protected] |
Receive DIMSE command (excluding dataset!) over the currently open association.
presID | [out] Contains in the end the ID of the presentation context which was specified in the DIMSE command received | |
msg | [out] The message received | |
statusDetail | [out] If a non-NULL value is passed this variable will in the end contain detailed information with regard to the status information which is captured in the status element (0000,0900). Note that the value for element (0000,0900) is not contained in this return value but in internal msg. For details on the structure of this object, see DICOM standard part 7, annex C). | |
commandSet | [out] If this parameter is not NULL, it will return a copy of the DIMSE command which was received from the other DICOM application. The caller is responsible to de-allocate the returned object! | |
timeout | [in] If this parameter is not 0, it specifies the timeout (in seconds) to be used for receiving the DIMSE command. Otherwise, the default timeout value is used (see setDIMSETimeout()). |
OFCondition DcmSCP::receiveDIMSEDataset | ( | T_ASC_PresentationContextID * | presID, | |
DcmDataset ** | dataObject, | |||
DIMSE_ProgressCallback | callback, | |||
void * | callbackContext | |||
) | [protected] |
Receives one dataset (of instance data) via network from another DICOM application.
presID | [out] Contains in the end the ID of the presentation context which was used in the PDVs that were received on the network. If the PDVs show different presentation context IDs, this function will return an error. | |
dataObject | [out] Contains in the end the information which was received over the network | |
callback | [in] Pointer to a function which shall be called to indicate progress | |
callbackContext | [in] Pointer to data which shall be passed to the progress indicating function |
Private undefined assignment operator.
Shall never be called.
src | Source object |
DcmAssociationConfiguration* DcmSCP::m_assocConfig [private] |
Association configuration.
May be filled from association configuration file or by adding presentation contexts by calling addPresentationContext() (or both)
OFString DcmSCP::m_assocCfgProfileName [private] |
OFString DcmSCP::m_aetitle [private] |
AETitle to be used for responding to SCU (default: DCMTK_SCP).
This value is not evaluated if the the SCP is configured to respond to any assocation requests with the name the SCU used as Called AE Title (which is the SCP's default behaviour); see setRespondWithCalledAETitle().
Uint32 DcmSCP::m_maxReceivePDULength [private] |
OFBool DcmSCP::m_singleProcess [private] |
Indicates if SCP is run in single process mode or not.
In multi-process mode, the SCP starts a new process for any incoming association request. The association is then completetly handled by the "child" process while the parent process keeps listening for new associations. Under Unix, multi-process mode uses the fork command to spawn a process which is an exact copy of the parent and continues code execution after the fork command. For Windows, the programmer of the derived class is responsible for setting the command line needed for the internal "CreateProcess" call. The commandline arguments are specified with function enableMultiProcessMode().
Uint16 DcmSCP::m_maxAssociations [private] |
T_DIMSE_BlockingMode DcmSCP::m_blockMode [private] |
Blocking mode for DIMSE operations.
If DIMSE non-blocking mode is enabled, the SCP is wating for new DIMSE data a specific (m_dimseTimeout) amount of time and then returns if not data arrives. In blocking mode the SCP is calling the underlying operating system function for receiving data from the socket directly, which may return after a very long time, depending on the system's network configuration.
Uint32 DcmSCP::m_dimseTimeout [private] |
Uint32 DcmSCP::m_acseTimeout [private] |
OFBool DcmSCP::m_verbosePCMode [private] |
OFList<DcmProcessSlotType *> DcmSCP::m_processTable [private] |