DCMTK  Version 3.6.1 20170228
OFFIS DICOM Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
DVPSPrintSCP Class Reference

the representation of a Print Management SCP. More...

Public Member Functions

 DVPSPrintSCP (DVInterface &iface, const char *cfname)
 constructor More...
 
virtual ~DVPSPrintSCP ()
 destructor
 
void setDimseLogPath (const char *fname)
 activates or deactivates dumping of the DIMSE communication in DICOM file format. More...
 
DVPSAssociationNegotiationResult negotiateAssociation (T_ASC_Network &net)
 performs association negotiation for the Print SCP. More...
 
void handleClient ()
 confirms an association negotiated with negotiateAssociation() and handles all DIMSE communication for the Print SCP. More...
 

Private Member Functions

DVPSPrintSCPoperator= (const DVPSPrintSCP &)
 private undefined assignment operator
 
 DVPSPrintSCP (const DVPSPrintSCP &copy)
 private undefined copy constructor
 
int errorCond (OFCondition cond, const char *message)
 if the given condition indicates an error, prints the given string to the error log and returns true (nonzero), otherwise returns false. More...
 
OFCondition refuseAssociation (OFBool isBadContext)
 sends A-ASSOCIATION-RQ as the result of an unsuccesful association negotiation. More...
 
void dropAssociation ()
 destroys the association managed by this object.
 
OFCondition handleNGet (T_DIMSE_Message &rq, T_ASC_PresentationContextID presID)
 handles any incoming N-GET-RQ message and sends back N-GET-RSP. More...
 
OFCondition handleNSet (T_DIMSE_Message &rq, T_ASC_PresentationContextID presID)
 handles any incoming N-SET-RQ message and sends back N-SET-RSP. More...
 
OFCondition handleNAction (T_DIMSE_Message &rq, T_ASC_PresentationContextID presID)
 handles any incoming N-ACTION-RQ message and sends back N-ACTION-RSP. More...
 
OFCondition handleNCreate (T_DIMSE_Message &rq, T_ASC_PresentationContextID presID)
 handles any incoming N-CREATE-RQ message and sends back N-CREATE-RSP. More...
 
OFCondition handleNDelete (T_DIMSE_Message &rq, T_ASC_PresentationContextID presID)
 handles any incoming N-DELETE-RQ message and sends back N-DELETE-RSP. More...
 
OFCondition handleCEcho (T_DIMSE_Message &rq, T_ASC_PresentationContextID presID)
 handles any incoming C-ECHO-RQ message and sends back C-ECHO-RSP. More...
 
void printerNGet (T_DIMSE_Message &rq, T_DIMSE_Message &rsp, DcmDataset *&rspDataset)
 implements the N-GET operation for the Printer SOP Class. More...
 
void filmSessionNSet (T_DIMSE_Message &rq, DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset)
 implements the N-SET operation for the Basic Film Session SOP Class. More...
 
void filmBoxNSet (T_DIMSE_Message &rq, DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset)
 implements the N-SET operation for the Basic Film Box SOP Class. More...
 
void imageBoxNSet (T_DIMSE_Message &rq, DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset)
 implements the N-SET operation for the Basic Grayscale Image Box SOP Class. More...
 
void filmSessionNAction (T_DIMSE_Message &rq, T_DIMSE_Message &rsp)
 implements the N-ACTION operation for the Basic Film Session SOP Class. More...
 
void filmBoxNAction (T_DIMSE_Message &rq, T_DIMSE_Message &rsp)
 implements the N-ACTION operation for the Basic Film Box SOP Class. More...
 
void filmSessionNCreate (DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset)
 implements the N-CREATE operation for the Basic Film Session SOP Class. More...
 
void filmBoxNCreate (DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset)
 implements the N-CREATE operation for the Basic Film Box SOP Class. More...
 
void presentationLUTNCreate (DcmDataset *rqDataset, T_DIMSE_Message &rsp, DcmDataset *&rspDataset)
 implements the N-CREATE operation for the Presentation LUT SOP Class. More...
 
void filmSessionNDelete (T_DIMSE_Message &rq, T_DIMSE_Message &rsp)
 implements the N-DELETE operation for the Basic Film Session SOP Class. More...
 
void filmBoxNDelete (T_DIMSE_Message &rq, T_DIMSE_Message &rsp)
 implements the N-DELETE operation for the Basic Film Box SOP Class. More...
 
void presentationLUTNDelete (T_DIMSE_Message &rq, T_DIMSE_Message &rsp)
 implements the N-DELETE operation for the Presentation LUT SOP Class. More...
 
void saveDimseLog ()
 stores the binary log of the DIMSE communication in a DICOM file in the log directory. More...
 
void dumpNMessage (T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing)
 prints a dump of the given DIMSE message to the log stream. More...
 

Static Private Member Functions

static void addLogEntry (DcmSequenceOfItems *seq, const char *text)
 adds an item to the given sequence containing the current date, time and the given text. More...
 

Private Attributes

T_DIMSE_BlockingMode blockMode
 blocking mode for receive
 
int timeout
 timeout for receive
 
DVPSFilmSessionfilmSession
 basic film session instance
 
DcmUniqueIdentifier studyInstanceUID
 study UID for stored print and hardcopy images of one print session
 
DcmUniqueIdentifier psSeriesInstanceUID
 series UID for presentation state objects
 
DcmUniqueIdentifier imageSeriesInstanceUID
 series UID for hardcopy image objects
 
DcmSequenceOfItemslogSequence
 DIMSE communication logged in this object if present.
 
DcmSequenceOfItemsacseSequence
 ACSE communication logged in this object if present.
 
OFString logPath
 full path of the file into which the DIMSE log is written
 

Detailed Description

the representation of a Print Management SCP.

This class implements most of the DIMSE behaviour of a DICOM Print SCP and uses Stored Print and Hardcopy Grayscale objects to store received print jobs in the local database.

Constructor & Destructor Documentation

DVPSPrintSCP::DVPSPrintSCP ( DVInterface iface,
const char *  cfname 
)

constructor

Parameters
ifaceInterface to database and config file
cfnamesymbolic name of print SCP in config file

Member Function Documentation

static void DVPSPrintSCP::addLogEntry ( DcmSequenceOfItems seq,
const char *  text 
)
staticprivate

adds an item to the given sequence containing the current date, time and the given text.

Parameters
seqsequence to which the item is added
texttext to be added, must not be NULL
void DVPSPrintSCP::dumpNMessage ( T_DIMSE_Message msg,
DcmItem dataset,
OFBool  outgoing 
)
private

prints a dump of the given DIMSE message to the log stream.

Parameters
msgDIMSE message to be dumped
datasetdataset to be dumped, may be NULL
outgoingflag defining whether we are dumping an outgoing or an incoming message.
int DVPSPrintSCP::errorCond ( OFCondition  cond,
const char *  message 
)
private

if the given condition indicates an error, prints the given string to the error log and returns true (nonzero), otherwise returns false.

Parameters
condcondition to be checked
messageto be printed, must not be NULL
Returns
nonzero if cond indicates error, zero otherwise.
void DVPSPrintSCP::filmBoxNAction ( T_DIMSE_Message rq,
T_DIMSE_Message rsp 
)
private

implements the N-ACTION operation for the Basic Film Box SOP Class.

Parameters
rqrequest message
rspresponse message, already initialized
void DVPSPrintSCP::filmBoxNCreate ( DcmDataset rqDataset,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset 
)
private

implements the N-CREATE operation for the Basic Film Box SOP Class.

Parameters
rqDatasetrequest dataset, may be NULL
rspresponse message, already initialized
rspDatasetresponse dataset passed back in this parameter (if any)
void DVPSPrintSCP::filmBoxNDelete ( T_DIMSE_Message rq,
T_DIMSE_Message rsp 
)
private

implements the N-DELETE operation for the Basic Film Box SOP Class.

Parameters
rqrequest message
rspresponse message, already initialized
void DVPSPrintSCP::filmBoxNSet ( T_DIMSE_Message rq,
DcmDataset rqDataset,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset 
)
private

implements the N-SET operation for the Basic Film Box SOP Class.

Parameters
rqrequest message
rqDatasetrequest dataset, may be NULL
rspresponse message, already initialized
rspDatasetresponse dataset passed back in this parameter (if any)
void DVPSPrintSCP::filmSessionNAction ( T_DIMSE_Message rq,
T_DIMSE_Message rsp 
)
private

implements the N-ACTION operation for the Basic Film Session SOP Class.

Parameters
rqrequest message
rspresponse message, already initialized
void DVPSPrintSCP::filmSessionNCreate ( DcmDataset rqDataset,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset 
)
private

implements the N-CREATE operation for the Basic Film Session SOP Class.

Parameters
rqDatasetrequest dataset, may be NULL
rspresponse message, already initialized
rspDatasetresponse dataset passed back in this parameter (if any)
void DVPSPrintSCP::filmSessionNDelete ( T_DIMSE_Message rq,
T_DIMSE_Message rsp 
)
private

implements the N-DELETE operation for the Basic Film Session SOP Class.

Parameters
rqrequest message
rspresponse message, already initialized
void DVPSPrintSCP::filmSessionNSet ( T_DIMSE_Message rq,
DcmDataset rqDataset,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset 
)
private

implements the N-SET operation for the Basic Film Session SOP Class.

Parameters
rqrequest message
rqDatasetrequest dataset, may be NULL
rspresponse message, already initialized
rspDatasetresponse dataset passed back in this parameter (if any)
OFCondition DVPSPrintSCP::handleCEcho ( T_DIMSE_Message rq,
T_ASC_PresentationContextID  presID 
)
private

handles any incoming C-ECHO-RQ message and sends back C-ECHO-RSP.

Parameters
rqrequest message
presIDpresentation context over which the message was received
Returns
DIMSE_NORMAL if successful, an error code otherwise
void DVPSPrintSCP::handleClient ( )

confirms an association negotiated with negotiateAssociation() and handles all DIMSE communication for the Print SCP.

Returns after the association has been released or aborted.

OFCondition DVPSPrintSCP::handleNAction ( T_DIMSE_Message rq,
T_ASC_PresentationContextID  presID 
)
private

handles any incoming N-ACTION-RQ message and sends back N-ACTION-RSP.

Parameters
rqrequest message
presIDpresentation context over which the message was received
Returns
DIMSE_NORMAL if successful, an error code otherwise
OFCondition DVPSPrintSCP::handleNCreate ( T_DIMSE_Message rq,
T_ASC_PresentationContextID  presID 
)
private

handles any incoming N-CREATE-RQ message and sends back N-CREATE-RSP.

Parameters
rqrequest message
presIDpresentation context over which the message was received
Returns
DIMSE_NORMAL if successful, an error code otherwise
OFCondition DVPSPrintSCP::handleNDelete ( T_DIMSE_Message rq,
T_ASC_PresentationContextID  presID 
)
private

handles any incoming N-DELETE-RQ message and sends back N-DELETE-RSP.

Parameters
rqrequest message
presIDpresentation context over which the message was received
Returns
DIMSE_NORMAL if successful, an error code otherwise
OFCondition DVPSPrintSCP::handleNGet ( T_DIMSE_Message rq,
T_ASC_PresentationContextID  presID 
)
private

handles any incoming N-GET-RQ message and sends back N-GET-RSP.

Parameters
rqrequest message
presIDpresentation context over which the message was received
Returns
DIMSE_NORMAL if successful, an error code otherwise
OFCondition DVPSPrintSCP::handleNSet ( T_DIMSE_Message rq,
T_ASC_PresentationContextID  presID 
)
private

handles any incoming N-SET-RQ message and sends back N-SET-RSP.

Parameters
rqrequest message
presIDpresentation context over which the message was received
Returns
DIMSE_NORMAL if successful, an error code otherwise
void DVPSPrintSCP::imageBoxNSet ( T_DIMSE_Message rq,
DcmDataset rqDataset,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset 
)
private

implements the N-SET operation for the Basic Grayscale Image Box SOP Class.

Parameters
rqrequest message
rqDatasetrequest dataset, may be NULL
rspresponse message, already initialized
rspDatasetresponse dataset passed back in this parameter (if any)
DVPSAssociationNegotiationResult DVPSPrintSCP::negotiateAssociation ( T_ASC_Network net)

performs association negotiation for the Print SCP.

Depending on the configuration file settings, Basic Grayscale Print and Presentation LUT are accepted with all uncompressed transfer syntaxes. If association negotiation is unsuccessful, an A-ASSOCIATE-RQ is sent and the association is dropped. If successful, an A-ASSOCIATE-AC is prepared but not (yet) sent.

Parameters
netDIMSE network over which to receive the association request
Returns
result indicating whether association negotiation was successful, unsuccessful or whether termination of the server was requested.
void DVPSPrintSCP::presentationLUTNCreate ( DcmDataset rqDataset,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset 
)
private

implements the N-CREATE operation for the Presentation LUT SOP Class.

Parameters
rqDatasetrequest dataset, may be NULL
rspresponse message, already initialized
rspDatasetresponse dataset passed back in this parameter (if any)
void DVPSPrintSCP::presentationLUTNDelete ( T_DIMSE_Message rq,
T_DIMSE_Message rsp 
)
private

implements the N-DELETE operation for the Presentation LUT SOP Class.

Parameters
rqrequest message
rspresponse message, already initialized
void DVPSPrintSCP::printerNGet ( T_DIMSE_Message rq,
T_DIMSE_Message rsp,
DcmDataset *&  rspDataset 
)
private

implements the N-GET operation for the Printer SOP Class.

Parameters
rqrequest message
rspresponse message, already initialized
rspDatasetresponse dataset passed back in this parameter (if any)
OFCondition DVPSPrintSCP::refuseAssociation ( OFBool  isBadContext)
private

sends A-ASSOCIATION-RQ as the result of an unsuccesful association negotiation.

Parameters
isBadContextdefines the reason for the A-ASSOCIATE-RQ. true indicates an incorrect application context, false sends back an unspecified reject with no reason and is used when termination of the server application has been initiated.
Returns
ASC_NORMAL if successful, an error code otherwise.
void DVPSPrintSCP::saveDimseLog ( )
private

stores the binary log of the DIMSE communication in a DICOM file in the log directory.

Called upon association release or abort.

void DVPSPrintSCP::setDimseLogPath ( const char *  fname)

activates or deactivates dumping of the DIMSE communication in DICOM file format.

This method should be called prior to association negotiation with negotiateAssociation().

Parameters
fnamefull path name of the file into which a log of the DIMSE communication is written after association release. NULL disables the DICOM DIMSE dump completely.

The documentation for this class was generated from the following file:


Generated on Tue Feb 28 2017 for DCMTK Version 3.6.1 20170228 by Doxygen 1.8.8