LEADTOOLS DICOM C++ Class Library Help > Classes and Member Functions > LDicomPrintSCR > LDicomPrintSCR Class Members > LDicomPrintSCU::OnStatus |
#include "ltdic.h"
virtual L_VOID LDicomPrintSCU::OnStatus(uStatus, uOperationStatus)
L_UINT16 uStatus; |
/* status of the Print SCU */ |
L_UINT16 uOperationStatus; |
/* operation status */ |
Called to indicate the status of the Print SCU.
Parameter |
Description |
|
uStatus |
Specifies the status of the Print SCU. Possible values are: |
|
|
Value |
Meaning |
|
PRINTSCU_STATUS_CONNECT |
[1] The Print SCU is connecting to the Print SCP. |
|
PRINTSCU_STATUS_SEND_ASSOCIATE_RQ |
[2] An A-ASSOCIATE-RQ was sent to the Print SCP. |
|
PRINTSCU_STATUS_RECEIVE_ASSOCIATE_RJ |
[3] An A-ASSOCIATE-RJ was received from the Print SCP. |
|
PRINTSCU_STATUS_RECEIVE_ASSOCIATE_AC |
[4] An A-ASSOCIATE-AC was received from the Print SCP. |
|
PRINTSCU_STATUS_SEND_RELEASE_RQ |
[5] An A-RELEASE-RQ was sent to the Print SCP. |
|
PRINTSCU_STATUS_CLOSE |
[6] The Print SCU closed the connection. |
|
PRINTSCU_STATUS_RECEIVE_RELEASE_RP |
[7] An A-RELEASE-RP was received from the Print SCP. |
|
PRINTSCU_STATUS_RECEIVE_RELEASE_RQ |
[8] An A-RELEASE-RQ was received from the Print SCP. |
|
PRINTSCU_STATUS_SEND_RELEASE_RP |
[9] An A-RELEASE-RP was sent to the Print SCP. |
|
PRINTSCU_STATUS_RECEIVE_ABORT |
[10] An A-ABORT was received from the Print SCP. |
|
PRINTSCU_STATUS_SEND_CREATE_FILM_SESSION_RQ |
[11] An N-CREATE-RQ was sent to the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_CREATE_FILM_SESSION_RSP |
[12] An N-CREATE-RSP was received from the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_SEND_UPDATE_FILM_SESSION_RQ |
[13] An N-SET-RQ was sent to the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_UPDATE_FILM_SESSION_RSP |
[14] An N-SET-RSP was received from the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_SEND_PRINT_FILM_SESSION_RQ |
[15] An N-ACTION-RQ was sent to the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP |
[16] An N-ACTION-RSP was received from the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_SEND_DELETE_FILM_SESSION_RQ |
[17] An N-DELETE-RQ was sent to the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_DELETE_FILM_SESSION_RSP |
[18] An N-DELETE-RSP was received from the Print SCP (Basic Film Session SOP Class). |
|
PRINTSCU_STATUS_SEND_CREATE_FILM_BOX_RQ |
[19] An N-CREATE-RQ was sent to the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_CREATE_FILM_BOX_RSP |
[20] An N-CREATE-RSP was received from the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_SEND_UPDATE_FILM_BOX_RQ |
[21] An N-SET-RQ was sent to the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_UPDATE_FILM_BOX_RSP |
[22] An N-SET-RSP was received from the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_SEND_PRINT_FILM_BOX_RQ |
[23] An N-ACTION-RQ was sent to the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_PRINT_FILM_BOX_RSP |
[24] An N-ACTION-RSP was received from the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_SEND_DELETE_FILM_BOX_RQ |
[25] An N-DELETE-RQ was sent to the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_DELETE_FILM_BOX_RSP |
[26] An N-DELETE-RSP was received from the Print SCP (Basic Film Box SOP Class). |
|
PRINTSCU_STATUS_SEND_UPDATE_IMAGE_BOX_RQ |
[27] An N-SET-RQ was sent to the Print SCP (Basic Grayscale/Color Image Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_UPDATE_IMAGE_BOX_RSP |
[28] An N-SET-RSP was received from the Print SCP (Basic Grayscale/Color Image Box SOP Class). |
|
PRINTSCU_STATUS_SEND_UPDATE_ANNOTATION_BOX_RQ |
[29] An N-SET-RQ was sent to the Print SCP (Basic Annotation Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_UPDATE_ANNOTATION_BOX_RSP |
[30] An N-SET-RSP was received from the Print SCP (Basic Annotation Box SOP Class). |
|
PRINTSCU_STATUS_SEND_GET_PRINTER_INFO_RQ |
[31] An N-GET-RQ was sent to the Print SCP (Printer SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_GET_PRINTER_INFO_RSP |
[32] An N-GET-RSP was received from the Print SCP (Printer SOP Class). |
|
PRINTSCU_STATUS_SEND_GET_PRINT_JOB_INFO_RQ |
[33] An N-GET-RQ was sent to the Print SCP (Print Job SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_GET_PRINT_JOB_INFO_RSP |
[34] An N-GET-RSP was received from the Print SCP (Print Job SOP Class). |
|
PRINTSCU_STATUS_SEND_GET_PRINTER_CONFIG_RQ |
[35] An N-GET-RQ was sent to the Print SCP (Printer Configuration Retrieval SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_GET_PRINTER_CONFIG_RSP |
[36] An N-GET-RSP was received from the Print SCP (Printer Configuration Retrieval SOP Class). |
|
PRINTSCU_STATUS_SEND_CREATE_PRESENTATION_LUT_RQ |
[37] An N-CREATE-RQ was sent to the Print SCP (Presentation LUT SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_CREATE_PRESENTATION_LUT_RSP |
[38] An N-CREATE-RSP was received from the Print SCP (Presentation LUT SOP Class). |
|
PRINTSCU_STATUS_SEND_DELETE_PRESENTATION_LUT_RQ |
[39] An N-DELETE-RQ was sent to the Print SCP (Presentation LUT SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_DELETE_PRESENTATION_LUT_RSP |
[40] An N-DELETE-RSP was received from the Print SCP (Presentation LUT SOP Class). |
|
PRINTSCU_STATUS_SEND_CREATE_OVERLAY_BOX_RQ |
[41] An N-CREATE-RQ was sent to the Print SCP (Basic Print Image Overlay Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_CREATE_OVERLAY_BOX_RSP |
[42] An N-CREATE-RSP was received from the Print SCP (Basic Print Image Overlay Box SOP Class). |
|
PRINTSCU_STATUS_SEND_UPDATE_OVERLAY_BOX_RQ |
[43] An N-SET-RQ was sent to the Print SCP (Basic Print Image Overlay Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_UPDATE_OVERLAY_BOX_RSP |
[44] An N-SET-RSP was received from the Print SCP (Basic Print Image Overlay Box SOP Class). |
|
PRINTSCU_STATUS_SEND_DELETE_OVERLAY_BOX_RQ |
[45] An N-DELETE-RQ was sent to the Print SCP (Basic Print Image Overlay Box SOP Class). |
|
PRINTSCU_STATUS_RECEIVE_DELETE_OVERLAY_BOX_RSP |
[46] An N-DELETE-RSP was received from the Print SCP (Basic Print Image Overlay Box SOP Class). |
|
PRINTSCU_STATUS_SEND_CREATE_PULL_PRINT_REQUEST_RQ |
[47] An N-CREATE-RQ was sent to the Print SCP (Pull Print Request SOP Calss). |
|
PRINTSCU_STATUS_RECEIVE_CREATE_PULL_PRINT_REQUEST_RSP |
[48] An N-CREATE-RSP was received from the Print SCP (Pull Print Request SOP Calss). |
|
PRINTSCU_STATUS_SEND_PRINT_PULL_PRINT_REQUEST_RQ |
[49] An N-ACTION-RQ was sent to the Print SCP (Pull Print Request SOP Calss). |
|
PRINTSCU_STATUS_RECEIVE_PRINT_PULL_PRINT_REQUEST_RSP |
[50] An N-ACTION-RSP was received from the Print SCP (Pull Print Request SOP Calss). |
|
PRINTSCU_STATUS_SEND_DELETE_PULL_PRINT_REQUEST_RQ |
[51] An N-DELETE-RQ was sent to the Print SCP (Pull Print Request SOP Calss). |
|
PRINTSCU_STATUS_RECEIVE_DELETE_PULL_PRINT_REQUEST_RSP |
[52] An N-DELETE-RSP was received from the Print SCP (Pull Print Request SOP Calss). |
uOperationStatus |
When the parameter uStatus is one of the PRINTSCU_STATUS_xxx_RSP status values, uOperationStatus will be either COMMAND_STATUS_SUCCESS (in case a Success or Warning status code is specified in the response of the Print SCP) or the Failure status code specified in the response. In all other values of uStatus, uOperationStatus is meaningless and is always set to 0. |
Returns
None
Comments
When the function LDicomPrintSCU::CreateFilmSession is called to create a Film Session, and assuming that the function succeeds, the callback function OnStatus will be called twice: The first time with uStatus set to PRINTSCU_STATUS_SEND_CREATE_FILM_SESSION_RQ and uOperationStatus set to 0, and the second time with uStatus set to PRINTSCU_STATUS_RECEIVE_CREATE_FILM_SESSION_RSP and uOperationStatus set to COMMAND_STATUS_SUCCESS.
When the parameter uStatus is one of the PRINTSCU_STATUS_xxx_RSP status values, the parameter uOperationStatus is determined as follows:
If the status code specified in the response of the Print SCP is either a Success or Warning status code, uOperationStatus will be set to COMMAND_STATUS_SUCCESS. The function LDicomPrintSCU::GetLastOperationStatus can be used to obtain the actual status code. If it is really a Success status code, the function will return COMMAND_STATUS_SUCCESS, otherwise, it will return the Warning status code.
If a Failure status code is specified in the response of the Print SCP, uOperationStatus will be set to that Failure status code. The same status code would be returned by the function LDicomPrintSCU::GetLastOperationStatus.
The implementation of the LDicomPrintSCU class for this function simply does nothing. In order to make use of this callback function, you should create a new class derived from the LDicomPrintSCU and override the function providing the desired implementation.
Required DLLs and Libraries
LTDIC For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application |
Win32, x64
See Also
Functions: |
|
Topics: |
|
|
Example
class CPrintSCU : public LDicomPrintSCU { public: CPrintSCU(L_TCHAR * pszPath = NULL) : LDicomPrintSCU(pszPath) { } L_VOID OnStatus(L_UINT16 uStatus, L_UINT16 uOperationStatus) { L_TCHAR szMsg[32]; L_UCHAR nSource, nReason; L_UINT16 uOpStatus; L_TCHAR * pszStatusCodeType; switch (uStatus) { case PRINTSCU_STATUS_RECEIVE_ABORT: GetAbortInfo (&nSource, &nReason); wsprintf(szMsg, TEXT("Source = %i, Reason = %i"), nSource, nReason); MessageBox(NULL, szMsg, TEXT("Print SCP Aborted the Association"), MB_OK); break; case PRINTSCU_STATUS_RECEIVE_PRINT_FILM_SESSION_RSP: uOpStatus = GetLastOperationStatus (); if (uOperationStatus == COMMAND_STATUS_SUCCESS) { if (uOpStatus == COMMAND_STATUS_SUCCESS) { pszStatusCodeType = TEXT("Success"); } else { pszStatusCodeType = TEXT("Warning"); } } else { pszStatusCodeType = TEXT("Failure"); } wsprintf(szMsg, TEXT("Status: 0x%04X (%s)"), uOpStatus, pszStatusCodeType); MessageBox(NULL, szMsg, TEXT("Received N-ACTION-RSP (Basic Film Session SOP Class)"), MB_OK); break; } } L_VOID OnPrinterReport (L_UINT16 uEventTypeID, const pPRINTERREPORTINFO pReportInfo) { L_TCHAR * pszEventTypeName = TEXT("Normal"); switch (uEventTypeID) { case 2: pszEventTypeName = TEXT("Warning"); break; case 3: pszEventTypeName = TEXT("Failure"); break; } L_TCHAR szMsg[256]; wsprintf(szMsg, TEXT("Event Type Name: %s"), pszEventTypeName); if (uEventTypeID != 1 && pReportInfo) { if (pReportInfo->pszPrinterStatusInfo) { wsprintf(szMsg, TEXT("%s\nPrinter Status Info: %s"), szMsg, pReportInfo->pszPrinterStatusInfo); } if (pReportInfo->pszFilmDestination) { wsprintf(szMsg, TEXT("%s\nFilm Destination: %s"), szMsg, pReportInfo->pszFilmDestination); } if (pReportInfo->pszPrinterName) { wsprintf(szMsg, TEXT("%s\nPrinter Name: %s"), szMsg, pReportInfo->pszPrinterName); } } MessageBox(NULL, szMsg, TEXT("Printer Status Report"), MB_OK); } L_VOID OnPrintJobReport (L_TCHAR* pszPrintJobInstanceUID, L_UINT16 uEventTypeID, const pPRINTJOBREPORTINFO pReportInfo) { L_TCHAR szMsg[512]; wsprintf(szMsg, TEXT("Print Job SOP Instance UID: %s"), pszPrintJobInstanceUID); L_TCHAR * pszEventTypeName = TEXT("Pending"); switch (uEventTypeID) { case 2: pszEventTypeName = TEXT("Printing"); break; case 3: pszEventTypeName = TEXT("Done"); break; case 4: pszEventTypeName = TEXT("Failure"); break; } wsprintf(szMsg, TEXT("%s\nEvent Type Name: %s"), szMsg, pszEventTypeName); if (pReportInfo) { if (pReportInfo->pszExecutionStatusInfo) { wsprintf(szMsg, TEXT("%s\nExecution Status Info: %s"), szMsg, pReportInfo->pszExecutionStatusInfo); } if (pReportInfo->pszFilmSessionLabel) { wsprintf(szMsg, TEXT("%s\nFilm Session Label: %s"), szMsg, pReportInfo->pszFilmSessionLabel); } if (pReportInfo->pszPrinterName) { wsprintf(szMsg, TEXT("%s\nPrinter Name: %s"), szMsg, pReportInfo->pszPrinterName); } } MessageBox(NULL, szMsg, TEXT("Print Job Status Report"), MB_OK); } };