L_DicomSendAssociateRequest

#include "ltdic.h"

L_INT EXT_FUNCTION L_DicomSendAssociateRequest(hNet, hPDU)

HDICOMNET hNet;

/* a DICOM Network handle */

HDICOMPDU hPDU;

/* a DICOM Association handle */

Sends an Associate Request message to a connection. This function is available in the Medical Suite Toolkit.

Parameter

Description

hNet

A DICOM Network handle. This is the handle created by calling L_DicomCreateNet.

hPDU

A DICOM Association handle. This is the handle created by calling L_DicomCreateAssociate.

Returns

0

SUCCESS

>0

An error occurred. Refer to Return Codes.

Comments

Calling L_DicomSendAssociateRequest on an SCU generates a call to RECEIVEASSOCIATEREQUESTCALLBACK on the SCP. Within the callback function the SCP may accept or reject the Association request by calling L_DicomSendAssociateAccept or L_DicomSendAssociateReject.

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

When the DICOM Association is no longer needed, it should be ended. For more information, refer to Closing a DICOM Association.

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

See Also

Functions:

RECEIVEASSOCIATEREQUESTCALLBACK, L_DicomCreateAssociate, L_DicomSendAssociateAccept, L_DicomSendAssociateReject, L_DicomSendReleaseRequest

Topics:

Working with DICOM Network Connections

 

Working with DICOM Associate Connections

 

Creating a DICOM Associate Connection

 

Creating an SCU

 

Diagram of a Basic Client-Server Set-Up

 

Sending Messages

Example

/* This example sends an Associate Request message to a connection */

L_VOID Test(HDICOMNET hNet)
{
   HDICOMPDU hPDU=NULL;

   /* create the Associate Class as Request */
   hPDU = L_DicomCreateAssociate(TRUE);
   
   /* use default for association */
   L_DicomDefaultAssociate(hPDU);
   
   /* this shows a client sending to its server */
   L_DicomSendAssociateRequest(hNet, hPDU);

   /* now we can free the class */
   L_DicomFreeAssociate(hPDU);
}