LDicomDS::InitCS

#include "ltdic.h"

L_VOID LDicomDS::InitCS(nCommand, bRequest)

L_UINT16 nCommand;

/* type of command */

L_BOOL bRequest;

/* flag that indicates the type of command set to initialize */

Creates the Command Set and inserts the elements for the specified command.

Parameter

Description

nCommand

Type of command to create. Possible values are:

 

Value

Meaning

 

COMMAND_C_STORE

[0x0001] Composite Store Command

 

COMMAND_C_FIND

[0x0020] Composite Find Command

 

COMMAND_C_GET

[0x0010] Composite Get Command

 

COMMAND_C_MOVE

[0x0021] Composite Move Command

 

COMMAND_C_CANCEL

[0x0FFF] Composite Cancel Command

 

COMMAND_C_ECHO

[0x0030] Composite Echo Command

 

COMMAND_N_REPORT

[0x0100] Normalized Report Command

 

COMMAND_N_GET

[0x0110] Normalized Get Command

 

COMMAND_N_SET

[0x0120] Normalized Set Command

 

COMMAND_N_ACTION

[0x0130] Normalized Action Command

 

COMMAND_N_CREATE

[0x0140] Normalized Create Command

 

COMMAND_N_DELETE

[0x0150] Normalized Delete Command

bRequest

Flag that indicates whether to create the command set as a request or a response. Possible values are:

 

Value

Meaning

 

TRUE

Create the command set as a request.

 

FALSE

Create the command set as a response.

Returns

None.

Comments

A Command set is a special type of Data Set. Therefore, to create a Command Set you must first call LDicomDS::LDicomDS and initialize the newly created Data Set by calling LDicomDS::InitCS.

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:

LDicomDS::GetInfoCS, LDicomDS::LDicomDS, LDicomDS::~LDicomDS

Topics:

Working with Command Sets

Example

This example creates a Data Set as a Command Set and gets information about the command.

L_INT LDicomDS_InitCSExample()
{
   LDicomDS    DS(NULL);
   L_UINT16    nCommand;
   L_BOOL      bRequest;
   L_TCHAR     buf[180];
   DS.InitCS(COMMAND_C_STORE, TRUE);
   DS.GetInfoCS(&nCommand, &bRequest);
   wsprintf(buf, TEXT("Command = %d\n"), nCommand);
   if(bRequest)
      lstrcat(buf, TEXT("Request"));
   else
      lstrcat(buf, TEXT("Response"));
   ::MessageBox(NULL, buf, TEXT("Test"), MB_OK);
   return DICOM_SUCCESS;
}