LDicomAssociate::IsAsyncOperations

#include "ltdic.h"

L_BOOL LDicomAssociate::IsAsyncOperations(L_VOID)

Determines whether Asynchronous Operations are supported.

Returns

TRUE

The DICOM Associate supports Asynchronous Operations.

FALSE

The DICOM Associate does not support Asynchronous Operations.

Comments

If a DICOM Associate connection does not support Asynchronous Operations, then an Application Entity must wait for the response from one message before sending another. If Asynchronous Operations are supported, multiple messages may be sent without waiting for a response. The number of messages that may be sent is set using LDicomAssociate::SetAsyncOperations.

To determine the number of Asynchronous Operations that may be invoked without a response, call LDicomAssociate::GetInvokedOperations. To determine the number of operations that have been completed, call LDicomAssociate::GetPerformedOperations.

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:

LDicomAssociate::GetInvokedOperations, LDicomAssociate::GetPerformedOperations, LDicomAssociate::SetAsyncOperations

Topics:

Working with DICOM Associate Connections

Example

L_INT LDicomAssociate_IsAsyncOperationsExample(LDicomAssociate *m_pDicomAssociate)
{
   L_INT    nRet;
   CString  cStr;
   //...Assume associate object has been created
   if (m_pDicomAssociate->IsAsyncOperations() )
   {
      //get the operations counts
      L_UINT16 lInvoked = m_pDicomAssociate->GetInvokedOperations();
      L_UINT16 lPerformed = m_pDicomAssociate->GetPerformedOperations();
      
      //now disable it
      nRet = m_pDicomAssociate->SetAsyncOperations( FALSE, 0, 0);
      if(nRet != DICOM_SUCCESS)
         return nRet;
      cStr.Format(TEXT("AsyncOperations Disabled:\n\tInvoked[%d]\n\tPerformed[%d]"), lInvoked, lPerformed);
      AfxMessageBox(cStr);
   }
   else
   {
      nRet = m_pDicomAssociate->SetAsyncOperations( TRUE, 0, 0);
      if(nRet != DICOM_SUCCESS)
         return nRet;
      AfxMessageBox(TEXT("AsyncOperations enabled"));
   }
   return DICOM_SUCCESS;
}