LDicomNet::OnReceiveData

#include "ltdic.h"

virtual L_VOID LDicomNet::OnReceiveData(nPresentationID, pCS, pDS)

L_UCHAR nPresentationID;

/* presentation ID */

LDicomDS *pCS;

/* command message */

LDicomDS *pDS;

/* data set */

Notifies a connection when a Data message was received. This function is available in the Medical Imaging Suite Toolkit.

Parameter

Description

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.

pCS

A DICOM object that references the command set that contains the actual command message.

pDS

A DICOM object that contains the actual data. This may be NULL if no data set is included.

Returns

None.

Comments

This is a low level means of receiving DICOM messages and data. It allows you to process messages yourself, instead of using the high level message processing functions provided.

This function is called for each LDicomNet::SendCXXX or LDicomNet::SendNXXX function provided by LEADTOOLS.

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

Platforms

Win32, x64

See Also

Functions:

LDicomNet::SendCCancelRequest, LDicomNet::SendCEchoRequest, LDicomNet::SendCEchoResponse, LDicomNet::SendCFindRequest, LDicomNet::SendCFindResponse, LDicomNet::SendCGetRequest, LDicomNet::SendCGetResponse, LDicomNet::SendCMoveRequest, LDicomNet::SendCMoveResponse, LDicomNet::SendCStoreRequest, LDicomNet::SendCStoreResponse, LDicomNet::SendNReportRequest, LDicomNet::SendNReportResponse, LDicomNet::SendNGetRequest, LDicomNet::SendNGetResponse, LDicomNet::SendNSetRequest, LDicomNet::SendNSetResponse, LDicomNet::SendNActionRequest, LDicomNet::SendNActionResponse, LDicomNet::SendNCreateRequest, LDicomNet::SendNCreateResponse, LDicomNet::SendNDeleteRequest, LDicomNet::SendNDeleteResponse

Topics:

Receiving Messages

Example

//LMyDicomNet is a class derived from LDicomNet

//In class LMyDicomNet, all events (virtual functions OnXXX()) have been

//overridden so that they can be processed. Each event displays a MessageBox

//identifying the event, the IP that generated the event, the IP that received the event and

//any other relevant data.

//For the entire derived class, see (hyperlink)LMyDicomNet class

L_VOID LMyDicomNet::OnReceiveData(L_UCHAR nID, LDicomDS *pCS, LDicomDS *pDS)
{
   CString strMsg;
   strMsg.Format(TEXT("*** OnReceiveData ***\nnID[%d]\n"), nID);
   
   if (pCS) 
      strMsg += TEXT("Received a command set\n");
   if (pDS) 
      strMsg += TEXT("Received a data set\n");
   AfxMessageBox(strMsg);
}