33 #include "dcmtk/config/osconfig.h" 35 #include "dcmtk/oflog/oflog.h" 36 #include "dcmtk/dcmdata/dctk.h" 37 #include "dcmtk/dcmnet/dimse.h" 38 #include "dcmtk/dcmnet/dcasccff.h" 39 #include "dcmtk/dcmnet/dcasccfg.h" 46 #include "dcmtk/dcmtls/tlstrans.h" 47 #include "dcmtk/dcmtls/tlslayer.h" 75 DCMSCP_ACTION_UNDEFINED,
77 DCMSCP_ACTION_REFUSE_ASSOCIATION
82 enum DcmRefuseReasonType
85 DCMSCP_TOO_MANY_ASSOCIATIONS,
89 DCMSCP_BAD_APPLICATION_CONTEXT_NAME,
91 DCMSCP_BAD_APPLICATION_ENTITY_SERVICE,
95 DCMSCP_NO_IMPLEMENTATION_CLASS_UID,
97 DCMSCP_NO_PRESENTATION_CONTEXTS,
174 const T_ASC_SC_ROLE role = ASC_SC_ROLE_DEFAULT,
175 const OFString &profile =
"DEFAULT");
181 void setPort(
const Uint16 port);
188 void setAETitle(
const OFString &aetitle);
196 void setRespondWithCalledAETitle(
const OFBool useCalled);
219 void forceAssociationRefuse(
const OFBool doRefuse);
225 void setMaxReceivePDULength(
const Uint32 maxRecPDU);
239 char *argv[] = NULL);
245 void setMaxAssociations(
const Uint16 maxAssocs);
256 void setDIMSEBlockingMode(
const T_DIMSE_BlockingMode blockingMode);
262 void setDIMSETimeout(
const Uint32 dimseTimeout);
267 void setACSETimeout(
const Uint32 acseTimeout);
273 void setVerbosePCMode(
const OFBool mode);
280 Uint16 getPort()
const;
292 OFBool getRespondWithCalledAETitle()
const;
297 OFBool getRefuseAssociation()
const;
302 Uint32 getMaxReceivePDULength()
const;
307 OFBool getSingleProcess()
const;
316 Uint16 getMaxAssociations()
const;
321 T_DIMSE_BlockingMode getDIMSEBlockingMode()
const;
326 Uint32 getDIMSETimeout()
const;
331 Uint32 getACSETimeout()
const;
338 OFBool getVerbosePCMode()
const;
347 OFBool isConnected()
const;
353 Uint16 numAssociations()
const;
375 Uint32 getPeerMaxPDULength()
const;
400 DcmSCPActionType &desiredAction);
405 virtual void notifyAssociationAcknowledge();
410 virtual void notifyReleaseRequest();
415 virtual void notifyAbortRequest();
420 virtual void notifyAssociationTermination();
426 virtual void notifyDIMSEError(
const OFCondition &cond);
433 virtual OFBool stopAfterCurrentAssociation();
442 virtual OFCondition sendSTOREResponse(T_ASC_PresentationContextID presID,
455 T_ASC_PresentationContextID presID);
468 T_ASC_PresentationContextID presID,
470 Uint16 &eventTypeID);
495 virtual OFBool calledAETitleAccepted(
const OFString &callingAE,
519 virtual void cleanChildren();
534 virtual void addProcessToTable(
int pid);
542 virtual void removeProcessFromTable(
int pid);
548 virtual void refuseAssociation(DcmRefuseReasonType reason);
553 virtual void handleAssociation();
570 OFCondition sendDIMSEMessage(
const T_ASC_PresentationContextID presID,
573 DIMSE_ProgressCallback callback,
574 void *callbackContext,
598 OFCondition receiveDIMSECommand(T_ASC_PresentationContextID *presID,
602 const Uint32 timeout = 0);
617 OFCondition receiveDIMSEDataset(T_ASC_PresentationContextID *presID,
619 DIMSE_ProgressCallback callback,
620 void *callbackContext);
719 void dropAndDestroyAssociation();
time_t startTime
Start time.
OFString acceptedTransferSyntax
Transfer Syntax accepted for this Presentation Context (UID)
Uint32 m_maxReceivePDULength
Maximum PDU size the SCP is able to receive.
Uint8 proposedSCRole
SCP role as proposed from SCU.
Uint8 presentationContextID
Presentation Context ID as proposed by SCU.
T_DIMSE_BlockingMode m_blockMode
Blocking mode for DIMSE operations.
Base class for implementing a DICOM Service Class Provider (SCP).
OFString m_aetitle
AETitle to be used for responding to SCU (default: DCMTK_SCP).
OFBool m_forkedChild
Indicates, that this process was spawn as child from a parent process needed for multiprocess mode un...
this class maintains a list of association negotiation profiles that can be addressed by symbolic key...
DIC_AE calledAETitle
Called AE title.
Uint16 m_port
Port on which the SCP is listening for association requests. The default port is 104.
DcmAssociationConfiguration * m_assocConfig
Association configuration.
OFList< DcmProcessSlotType * > m_processTable
Table of processes for non-single process mode.
Uint16 m_maxAssociations
Maximum number of association for multi-process mode.
DIC_AE callingAETitle
Calling AE title.
OFString m_assocCfgProfileName
Profile in association configuration that should be used.
Structure representing single process in multi-process mode.
OFBool m_respondWithCalledAETitle
If set, the AE Title as received in the request (called AE Title) is used in response (default: OFTru...
OFBool m_refuseAssociation
Indicates if the application shall refuse any association attempt regardless of what the SCU proposes...
OFBool m_singleProcess
Indicates if SCP is run in single process mode or not.
OFBool m_verbosePCMode
Verbose PC mode.
DIC_NODENAME peerName
Name of peer.
T_ASC_Association * m_assoc
Current association run by this SCP.
a class handling the DICOM dataset format (files without meta header)
Uint8 acceptedSCRole
Role acccepted by SCP for this Presentation Context.
OFBool hasStorageAbility
Indicator if process has storage ability.
a simple string class that implements a subset of std::string.
OFString abstractSyntax
Abstract Syntax name (UID) as proposed by SCU.
Uint32 m_acseTimeout
Timeout for ACSE operations in seconds.
Uint32 m_dimseTimeout
Timeout for DIMSE operations in seconds.
General purpose class for condition codes.
Structure representing a single Presentation Context.