OFFIS DCMTK  Version 3.6.0
wlmactmg.h
1 /*
2  *
3  * Copyright (C) 1996-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmwlm
15  *
16  * Author: Thomas Wilkens
17  *
18  * Purpose: Activity manager class for basic worklist management service
19  * class provider engines.
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-10-14 13:16:39 $
23  * CVS/RCS Revision: $Revision: 1.18 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 #ifndef WlmActivityManager_h
31 #define WlmActivityManager_h
32 
33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/ofstd/ofcmdln.h" /* for OFCmdUnsignedInt */
35 #include "dcmtk/dcmdata/dcxfer.h" /* for E_TransferSyntax */
36 #include "dcmtk/dcmnet/dimse.h" /* for T_DIMSE_BlockingMode */
37 #include "dcmtk/dcmwlm/wltypdef.h" /* for WlmRefuseReasonType */
38 
39 class WlmDataSource;
40 class OFCondition;
41 class OFConsole;
42 
47 {
48  protected:
52  OFCmdUnsignedInt opt_port;
58  OFCmdUnsignedInt opt_sleepAfterFind;
60  OFCmdUnsignedInt opt_sleepDuringFind;
62  OFCmdUnsignedInt opt_maxPDU;
64  E_TransferSyntax opt_networkTransferSyntax;
73  int cmd_argc;
75  char **cmd_argv;
79  T_DIMSE_BlockingMode opt_blockMode;
90 
97 
102  void CleanChildren();
103 
109 
114  void AddProcessToTable( int pid, T_ASC_Association *assoc );
115 
120  void RemoveProcessFromTable( int pid );
121 
126  void RefuseAssociation( T_ASC_Association **assoc, WlmRefuseReasonType reason );
127 
132  void HandleAssociation( T_ASC_Association *assoc );
133 
142 
151  OFCondition HandleEchoSCP( T_ASC_Association *assoc, T_DIMSE_C_EchoRQ *req, T_ASC_PresentationContextID presId );
152 
161  OFCondition HandleFindSCP( T_ASC_Association *assoc, T_DIMSE_C_FindRQ *request, T_ASC_PresentationContextID presID );
162 
167 
173 
174 
175  public:
196  WlmDataSource *dataSourcev,
197  OFCmdUnsignedInt opt_portv,
198  OFBool opt_refuseAssociationv,
199  OFBool opt_rejectWithoutImplementationUIDv,
200  OFCmdUnsignedInt opt_sleepAfterFindv,
201  OFCmdUnsignedInt opt_sleepDuringFindv,
202  OFCmdUnsignedInt opt_maxPDUv,
203  E_TransferSyntax opt_networkTransferSyntaxv,
204  OFBool opt_failInvalidQueryv,
205  OFBool opt_singleProcessv,
206  int opt_maxAssociationsv,
207  T_DIMSE_BlockingMode opt_blockModev,
208  int opt_dimse_timeoutv,
209  int opt_acse_timeoutv,
210  OFBool opt_forkedChild = OFFalse,
211  int argcv = 0,
212  char *argvv[] = NULL );
213 
217 
224 };
225 
226 #endif
227 
228 /*
229 ** CVS Log
230 ** $Log: wlmactmg.h,v $
231 ** Revision 1.18 2010-10-14 13:16:39 joergr
232 ** Updated copyright header. Added reference to COPYRIGHT file.
233 **
234 ** Revision 1.17 2009-11-24 10:40:01 uli
235 ** Switched to logging mechanism provided by the "new" oflog module.
236 **
237 ** Revision 1.16 2009-09-30 08:40:34 uli
238 ** Make dcmwlm's include headers self-sufficient by including all
239 ** needed headers directly.
240 **
241 ** Revision 1.15 2006-12-15 14:49:21 onken
242 ** Removed excessive use char* and C-array in favour of OFString and
243 ** OFList. Simplified some implementation details.
244 **
245 ** Revision 1.14 2006/08/14 15:30:58 onken
246 ** Added WIN32 multiprocess mode to wlmscpfs.
247 **
248 ** Revision 1.13 2005/12/08 16:05:43 meichel
249 ** Changed include path schema for all DCMTK header files
250 **
251 ** Revision 1.12 2005/11/17 13:45:39 meichel
252 ** Added command line options for DIMSE and ACSE timeouts
253 **
254 ** Revision 1.11 2003/07/02 09:17:55 wilkens
255 ** Updated documentation to get rid of doxygen warnings.
256 **
257 ** Revision 1.10 2002/12/16 11:08:36 wilkens
258 ** Added missing #include "osconfig.h" to certain files.
259 **
260 ** Revision 1.9 2002/12/12 16:48:35 wilkens
261 ** Added some code to avoid compiler warning (unreachable code) on Sun CC 2.0.1.
262 **
263 ** Revision 1.8 2002/08/05 09:09:59 wilkens
264 ** Modfified the project's structure in order to be able to create a new
265 ** application which contains both wlmscpdb and ppsscpdb.
266 **
267 ** Revision 1.7 2002/07/17 13:10:37 wilkens
268 ** Corrected some minor logical errors in the wlmscpdb sources and completely
269 ** updated the wlmscpfs so that it does not use the original wlistctn sources
270 ** any more but standard wlm sources which are now used by all three variants
271 ** of wlmscps.
272 **
273 ** Revision 1.6 2002/06/10 11:25:06 wilkens
274 ** Made some corrections to keep gcc 2.95.3 quiet.
275 **
276 ** Revision 1.5 2002/04/18 14:20:09 wilkens
277 ** Modified Makefiles. Updated latest changes again. These are the latest
278 ** sources. Added configure file.
279 **
280 ** Revision 1.4 2002/01/08 19:10:04 joergr
281 ** Minor adaptations to keep the gcc compiler on Linux and Solaris happy.
282 ** Currently only the "file version" of the worklist SCP is supported on
283 ** Unix systems.
284 **
285 ** Revision 1.3 2002/01/08 17:45:34 joergr
286 ** Reformatted source files (replaced Windows newlines by Unix ones, replaced
287 ** tabulator characters by spaces, etc.)
288 **
289 ** Revision 1.2 2002/01/08 17:35:39 joergr
290 ** Reworked database support after trials at the hospital (modfied by MC/JR on
291 ** 2002-01-08).
292 **
293 **
294 */
void RemoveProcessFromTable(int pid)
This function removes one particular item from the table which stores all subprocess information...
This class encapsulates data structures and operations for basic worklist management service class pr...
Definition: wlmactmg.h:46
OFBool opt_singleProcess
indicates if the application is run in single process mode or not
Definition: wlmactmg.h:68
WlmActivityManager & operator=(const WlmActivityManager &Src)
Protected undefined operator=.
This class encapsulates data structures and operations for connecting to an arbitrary data source in ...
Definition: wlds.h:52
WlmActivityManager(const WlmActivityManager &Src)
Protected undefined copy-constructor.
int opt_dimse_timeout
timeout for DIMSE operations
Definition: wlmactmg.h:81
OFList< WlmProcessSlotType * > processTable
table of processes for non-single process mode
Definition: wlmactmg.h:89
OFBool opt_forkedChild
indicates, that this process was spawn as child from a parent process needed for multiprocess mode on...
Definition: wlmactmg.h:71
void AddProcessToTable(int pid, T_ASC_Association *assoc)
This function adds a process to the table that stores process information.
T_DIMSE_BlockingMode opt_blockMode
blocking mode for DIMSE operations
Definition: wlmactmg.h:79
OFBool opt_rejectWithoutImplementationUID
indicates if the application shall reject associations without implementation class uids ...
Definition: wlmactmg.h:56
OFCmdUnsignedInt opt_sleepDuringFind
indicates how long the application shall sleep during a find
Definition: wlmactmg.h:60
int numberOfSupportedAbstractSyntaxes
number of array fields
Definition: wlmactmg.h:87
OFBool opt_refuseAssociation
indicates if the application shall refuse any association
Definition: wlmactmg.h:54
E_TransferSyntax opt_networkTransferSyntax
preferred network transfer syntax
Definition: wlmactmg.h:64
OFCondition NegotiateAssociation(T_ASC_Association *assoc)
This function negotiates a presentation context which will be used by this application and the other ...
int cmd_argc
number of arguments in commandline, needed for multiprocess mode on WIN32
Definition: wlmactmg.h:73
void CleanChildren()
This function takes care of removing items referring to (terminated) subprocess from the table which ...
OFCondition WaitForAssociation(T_ASC_Network *net)
This function takes care of receiving, negotiating and accepting/refusing an association request...
OFCmdUnsignedInt opt_sleepAfterFind
indicates how long the application shall sleep after a find
Definition: wlmactmg.h:58
OFCondition HandleEchoSCP(T_ASC_Association *assoc, T_DIMSE_C_EchoRQ *req, T_ASC_PresentationContextID presId)
Having received a DIMSE C-ECHO-RQ message, this function takes care of sending a DIMSE C-ECHO-RSP mes...
OFCondition HandleFindSCP(T_ASC_Association *assoc, T_DIMSE_C_FindRQ *request, T_ASC_PresentationContextID presID)
This function processes a DIMSE C-FIND-RQ commmand that was received over the network connection...
int opt_acse_timeout
timeout for ACSE operations
Definition: wlmactmg.h:83
int opt_maxAssociations
maximum number of association for non-single process mode
Definition: wlmactmg.h:77
OFCmdUnsignedInt opt_maxPDU
max pdu size
Definition: wlmactmg.h:62
void RefuseAssociation(T_ASC_Association **assoc, WlmRefuseReasonType reason)
This function takes care of refusing an assocation request.
OFBool opt_failInvalidQuery
indicates if the application shall fail on an invalid C-Find RQ message
Definition: wlmactmg.h:66
OFCondition StartProvidingService()
Starts providing the implemented service for calling SCUs.
Singleton class which provides thread-safe access to the standard console output and error streams...
Definition: ofconsol.h:79
~WlmActivityManager()
destructor
char ** supportedAbstractSyntaxes
array of supported abstract syntaxes
Definition: wlmactmg.h:85
OFCondition ReceiveAndHandleCommands(T_ASC_Association *assoc)
This function takes care of handling the other DICOM application's request.
OFCmdUnsignedInt opt_port
port on which the application is listening
Definition: wlmactmg.h:52
General purpose class for condition codes.
Definition: ofcond.h:305
WlmDataSource * dataSource
data source connection object
Definition: wlmactmg.h:50
char ** cmd_argv
complete command line, needed for multiprocess mode on WIN32
Definition: wlmactmg.h:75
void HandleAssociation(T_ASC_Association *assoc)
This function takes care of handling the other DICOM application's request.


Generated on Sun Aug 23 2015 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.9.1