DCMTK
Version 3.6.3
OFFIS DICOM Toolkit
|
representation of an association used for DICOM Basic Grayscale Print. More...
Public Member Functions | |
DVPSPrintMessageHandler () | |
default constructor | |
virtual | ~DVPSPrintMessageHandler () |
destructor | |
OFCondition | createRQ (const char *sopclassUID, OFString &sopinstanceUID, DcmDataset *attributeListIn, Uint16 &status, DcmDataset *&attributeListOut) |
sends an N-CREATE-RQ message and receives response. More... | |
OFCondition | setRQ (const char *sopclassUID, const char *sopinstanceUID, DcmDataset *modificationList, Uint16 &status, DcmDataset *&attributeListOut) |
sends an N-SET-RQ message and receives response. More... | |
OFCondition | getRQ (const char *sopclassUID, const char *sopinstanceUID, const Uint16 *attributeIdentifierList, size_t numShorts, Uint16 &status, DcmDataset *&attributeListOut) |
sends an N-GET-RQ message and receives response. More... | |
OFCondition | actionRQ (const char *sopclassUID, const char *sopinstanceUID, Uint16 actionTypeID, DcmDataset *actionInformation, Uint16 &status, DcmDataset *&actionReply) |
sends an N-ACTION-RQ message and receives response. More... | |
OFCondition | deleteRQ (const char *sopclassUID, const char *sopinstanceUID, Uint16 &status) |
sends an N-DELETE-RQ message and receives response. More... | |
OFCondition | negotiateAssociation (DcmTransportLayer *tlayer, const char *myAEtitle, const char *peerAEtitle, const char *peerHost, int peerPort, long peerMaxPDU, OFBool negotiatePresentationLUT, OFBool negotiateAnnotationBox, OFBool implicitOnly) |
opens a DICOM association to a remote printer. More... | |
OFCondition | releaseAssociation () |
releases the current association. More... | |
OFCondition | abortAssociation () |
aborts the current association. More... | |
void | setEventHandler (DVPSPrintEventHandler *handler) |
registers an event handler object for incoming N-EVENT-REPORTs. More... | |
void | setTimeout (T_DIMSE_BlockingMode blocking, int timeOut) |
sets the blocking and timeout mode for receive operations. More... | |
OFBool | printerSupportsPresentationLUT () |
checks if the remote printer supports the Presentation LUT SOP class. More... | |
OFBool | printerSupportsAnnotationBox () |
checks if the remote printer supports the Basic Annotation Box SOP class. More... | |
Private Member Functions | |
DVPSPrintMessageHandler (const DVPSPrintMessageHandler ©) | |
private undefined copy constructor | |
DVPSPrintMessageHandler & | operator= (const DVPSPrintMessageHandler ©) |
private undefined assignment operator | |
OFCondition | sendNRequest (T_ASC_PresentationContextID presId, T_DIMSE_Message &request, DcmDataset *rqDataSet, T_DIMSE_Message &response, DcmDataset *&statusDetail, DcmDataset *&rspDataset) |
sends a DIMSE-N request (any type except N-EVENT-REPORT) and waits for a response. More... | |
T_ASC_PresentationContextID | findAcceptedPC (const char *sopclassuid) |
looks for an accepted presentation context for the given SOP class. More... | |
void | dumpNMessage (T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing) |
dumps the given message to the dump stream if it exists. More... | |
Private Attributes | |
T_ASC_Association * | assoc |
the association to be used for message communication. Can be NULL. | |
T_ASC_Network * | net |
the network used for establishing associations. Can be NULL. | |
DVPSPrintEventHandler * | eventHandler |
the current event handler. Can be NULL. | |
T_DIMSE_BlockingMode | blockMode |
blocking mode for receive | |
int | timeout |
timeout for receive | |
representation of an association used for DICOM Basic Grayscale Print.
OFCondition DVPSPrintMessageHandler::abortAssociation | ( | ) |
aborts the current association.
OFCondition DVPSPrintMessageHandler::actionRQ | ( | const char * | sopclassUID, |
const char * | sopinstanceUID, | ||
Uint16 | actionTypeID, | ||
DcmDataset * | actionInformation, | ||
Uint16 & | status, | ||
DcmDataset *& | actionReply | ||
) |
sends an N-ACTION-RQ message and receives response.
Any event report requests incoming before the expected response message are handled.
sopclassUID | the requested SOP class UID, must be one of the supported print classes. |
sopinstanceUID | the requested SOP instance UID |
actionTypeID | the action type ID |
actionInformation | the action information dataset, may be NULL. |
status | the response message status code is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
actionReply | a pointer to the action reply dataset returned by the SCP is passed back in this parameter if the method returns with success status. Content is undefined otherwise. May return NULL if the SCP has not returned an attribute list. If a DICOM dataset is returned, it must be deleted by the caller. |
OFCondition DVPSPrintMessageHandler::createRQ | ( | const char * | sopclassUID, |
OFString & | sopinstanceUID, | ||
DcmDataset * | attributeListIn, | ||
Uint16 & | status, | ||
DcmDataset *& | attributeListOut | ||
) |
sends an N-CREATE-RQ message and receives response.
Any event report requests incoming before the expected response message are handled.
sopclassUID | the affected SOP class UID, must be one of the supported print classes. |
sopinstanceUID | the affected SOP instance UID. May be empty in which case the UID is assigned by the SCP and returned in this parameter. |
attributeListIn | the attribute list dataset, may be NULL. |
status | the response message status code is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
attributeListOut | a pointer to the attribute list returned by the SCP is passed back in this parameter if the method returns with success status. Content is undefined otherwise. May return NULL if the SCP has not returned an attribute list. If a DICOM dataset is returned, it must be deleted by the caller. |
OFCondition DVPSPrintMessageHandler::deleteRQ | ( | const char * | sopclassUID, |
const char * | sopinstanceUID, | ||
Uint16 & | status | ||
) |
sends an N-DELETE-RQ message and receives response.
Any event report requests incoming before the expected response message are handled.
sopclassUID | the requested SOP class UID, must be one of the supported print classes. |
sopinstanceUID | the requested SOP instance UID |
status | the response message status code is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
|
private |
dumps the given message to the dump stream if it exists.
msg | message to be dumped, should be DIMSE-N |
dataset | option dataset to be dumped, may be NULL |
outgoing | OFTrue if message is outgoing, OFFalse if incoming. |
|
private |
looks for an accepted presentation context for the given SOP class.
If the SOP class is one of the Basic Grayscale Print Management Meta classes, looks for a presentation context for the meta SOP class.
sopclassuid | SOP Class UID for which a presentation context is searched |
OFCondition DVPSPrintMessageHandler::getRQ | ( | const char * | sopclassUID, |
const char * | sopinstanceUID, | ||
const Uint16 * | attributeIdentifierList, | ||
size_t | numShorts, | ||
Uint16 & | status, | ||
DcmDataset *& | attributeListOut | ||
) |
sends an N-GET-RQ message and receives response.
Any event report requests incoming before the expected response message are handled.
sopclassUID | the requested SOP class UID, must be one of the supported print classes. |
sopinstanceUID | the requested SOP instance UID |
attributeIdentifierList | the list of DICOM attributes to get, may be NULL. The attributes should be coded in pairs along the array (e.g. {g,e,g,e,g,e,...}). |
numShorts | the number of Uint16 values in the array (not the number of pairs). |
status | the response message status code is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
attributeListOut | a pointer to the attribute list returned by the SCP is passed back in this parameter if the method returns with success status. Content is undefined otherwise. May return NULL if the SCP has not returned an attribute list. If a DICOM dataset is returned, it must be deleted by the caller. |
OFCondition DVPSPrintMessageHandler::negotiateAssociation | ( | DcmTransportLayer * | tlayer, |
const char * | myAEtitle, | ||
const char * | peerAEtitle, | ||
const char * | peerHost, | ||
int | peerPort, | ||
long | peerMaxPDU, | ||
OFBool | negotiatePresentationLUT, | ||
OFBool | negotiateAnnotationBox, | ||
OFBool | implicitOnly | ||
) |
opens a DICOM association to a remote printer.
The Basic Grayscale Print Management Meta SOP Class and Presentation LUT SOP Class are requested. The association is only accepted if the remote printer supports at least the Basic Grayscale Print Management Meta SOP Class.
tlayer | transport layer object, may be NULL. If present, a transport layer object for TLS transports is expected. |
myAEtitle | the print client's own application entity title (calling aetitle) |
peerAEtitle | the printer's called aetitle |
peerHost | hostname/IP address of the printer |
peerPort | port number of the printer |
peerMaxPDU | maximum PDU size to negotiate, must be between 8192 and 65536. |
negotiatePresentationLUT | if true, Presentation LUT SOP Class is negotiated |
negotiateAnnotationBox | if true, Basic Annotation Box SOP Class is negotiated |
implicitOnly | if true, only the default implicit VR transfer syntax is proposed, otherwise all uncompressed transfer syntaxes are proposed. |
OFBool DVPSPrintMessageHandler::printerSupportsAnnotationBox | ( | ) |
checks if the remote printer supports the Basic Annotation Box SOP class.
May only be called if association in place.
OFBool DVPSPrintMessageHandler::printerSupportsPresentationLUT | ( | ) |
checks if the remote printer supports the Presentation LUT SOP class.
May only be called if association in place.
OFCondition DVPSPrintMessageHandler::releaseAssociation | ( | ) |
releases the current association.
|
private |
sends a DIMSE-N request (any type except N-EVENT-REPORT) and waits for a response.
Any event report requests incoming before the expected DIMSE-N-RSP are handled. If an event handler is registered, it is called for each received event report request.
presId | presentation context ID |
request | DIMSE-N request message to be sent. All fields except DataSetType must be filled in. |
rqDataSet | DICOM dataset to be sent with the request message, e.g. N-Set modification list, N-Action action information, or N-Create attribute list. Not applicable to N-Get or N-Delete. |
response | the received response is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
statusDetail | the status detail dataset of the received response is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
rspDataset | the received response dataset is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
|
inline |
registers an event handler object for incoming N-EVENT-REPORTs.
handler | pointer to the new handler object. May be NULL. |
OFCondition DVPSPrintMessageHandler::setRQ | ( | const char * | sopclassUID, |
const char * | sopinstanceUID, | ||
DcmDataset * | modificationList, | ||
Uint16 & | status, | ||
DcmDataset *& | attributeListOut | ||
) |
sends an N-SET-RQ message and receives response.
Any event report requests incoming before the expected response message are handled.
sopclassUID | the requested SOP class UID, must be one of the supported print classes. |
sopinstanceUID | the requested SOP instance UID |
modificationList | the modification list dataset, must not be NULL. |
status | the response message status code is passed back in this parameter if the method returns with success status. Content is undefined otherwise. |
attributeListOut | a pointer to the attribute list returned by the SCP is passed back in this parameter if the method returns with success status. Content is undefined otherwise. May return NULL if the SCP has not returned an attribute list. If a DICOM dataset is returned, it must be deleted by the caller. |
|
inline |
sets the blocking and timeout mode for receive operations.
blockMode | blocking mode |
timeout |