wlmactmg.h

00001 /*
00002  *
00003  *  Copyright (C) 1996-2005, OFFIS
00004  *
00005  *  This software and supporting documentation were developed by
00006  *
00007  *    Kuratorium OFFIS e.V.
00008  *    Healthcare Information and Communication Systems
00009  *    Escherweg 2
00010  *    D-26121 Oldenburg, Germany
00011  *
00012  *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
00013  *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
00014  *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
00015  *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
00016  *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
00017  *
00018  *  Module:  dcmwlm
00019  *
00020  *  Author:  Thomas Wilkens
00021  *
00022  *  Purpose: Activity manager class for basic worklist management service
00023  *           class provider engines.
00024  *
00025  *  Last Update:      $Author: meichel $
00026  *  Update Date:      $Date: 2005/12/08 16:05:43 $
00027  *  Source File:      $Source: /share/dicom/cvs-depot/dcmtk/dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h,v $
00028  *  CVS/RCS Revision: $Revision: 1.13 $
00029  *  Status:           $State: Exp $
00030  *
00031  *  CVS/RCS Log at end of file
00032  *
00033  */
00034 
00035 #ifndef WlmActivityManager_h
00036 #define WlmActivityManager_h
00037 
00038 #include "dcmtk/config/osconfig.h"
00039 
00040 class WlmDataSource;
00041 class OFCondition;
00042 class OFConsole;
00043 
00047 class WlmActivityManager
00048 {
00049   protected:
00051     WlmDataSource *dataSource;
00053     OFCmdUnsignedInt opt_port;
00055     OFBool opt_refuseAssociation;
00057     OFBool opt_rejectWithoutImplementationUID;
00059     OFCmdUnsignedInt opt_sleepAfterFind;
00061     OFCmdUnsignedInt opt_sleepDuringFind;
00063     OFCmdUnsignedInt opt_maxPDU;
00065     E_TransferSyntax opt_networkTransferSyntax;
00067     OFBool opt_verbose;
00069     OFBool opt_debug;
00071     OFBool opt_failInvalidQuery;
00073     OFBool opt_singleProcess;
00075     int opt_maxAssociations;
00077     T_DIMSE_BlockingMode opt_blockMode;
00079     int opt_dimse_timeout;
00081     int opt_acse_timeout;
00083     char **supportedAbstractSyntaxes;
00085     int numberOfSupportedAbstractSyntaxes;
00087     OFConsole *logStream;
00089     WlmProcessTableType processTable;
00090 
00094     void DumpMessage( const char *message );
00095 
00101     OFCondition WaitForAssociation( T_ASC_Network *net );
00102 
00107     void CleanChildren();
00108 
00113     OFCondition NegotiateAssociation( T_ASC_Association *assoc );
00114 
00119     void AddProcessToTable( int pid, T_ASC_Association *assoc );
00120 
00124     int CountChildProcesses();
00125 
00130     void RemoveProcessFromTable( int pid );
00131 
00136     void RefuseAssociation( T_ASC_Association **assoc, WlmRefuseReasonType reason );
00137 
00142     void HandleAssociation( T_ASC_Association *assoc );
00143 
00151     OFCondition ReceiveAndHandleCommands( T_ASC_Association *assoc );
00152 
00161     OFCondition HandleEchoSCP( T_ASC_Association *assoc, T_DIMSE_C_EchoRQ *req, T_ASC_PresentationContextID presId );
00162 
00171     OFCondition HandleFindSCP( T_ASC_Association *assoc, T_DIMSE_C_FindRQ *request, T_ASC_PresentationContextID presID );
00172 
00176     WlmActivityManager( const WlmActivityManager &Src );
00177 
00182     WlmActivityManager &operator=( const WlmActivityManager &Src );
00183 
00184 
00185   public:
00205     WlmActivityManager(
00206         WlmDataSource *dataSourcev, 
00207         OFCmdUnsignedInt opt_portv, 
00208         OFBool opt_refuseAssociationv, 
00209         OFBool opt_rejectWithoutImplementationUIDv, 
00210         OFCmdUnsignedInt opt_sleepAfterFindv, 
00211         OFCmdUnsignedInt opt_sleepDuringFindv, 
00212         OFCmdUnsignedInt opt_maxPDUv, 
00213         E_TransferSyntax opt_networkTransferSyntaxv, 
00214         OFBool opt_verbosev, 
00215         OFBool opt_debugv, 
00216         OFBool opt_failInvalidQueryv, 
00217         OFBool opt_singleProcessv, 
00218         int opt_maxAssociationsv, 
00219         T_DIMSE_BlockingMode opt_blockModev,
00220         int opt_dimse_timeoutv,
00221         int opt_acse_timeoutv,
00222         OFConsole *logStreamv );
00223 
00226     ~WlmActivityManager();
00227 
00233     OFCondition StartProvidingService();
00234 };
00235 
00236 #endif
00237 
00238 /*
00239 ** CVS Log
00240 ** $Log: wlmactmg.h,v $
00241 ** Revision 1.13  2005/12/08 16:05:43  meichel
00242 ** Changed include path schema for all DCMTK header files
00243 **
00244 ** Revision 1.12  2005/11/17 13:45:39  meichel
00245 ** Added command line options for DIMSE and ACSE timeouts
00246 **
00247 ** Revision 1.11  2003/07/02 09:17:55  wilkens
00248 ** Updated documentation to get rid of doxygen warnings.
00249 **
00250 ** Revision 1.10  2002/12/16 11:08:36  wilkens
00251 ** Added missing #include "osconfig.h" to certain files.
00252 **
00253 ** Revision 1.9  2002/12/12 16:48:35  wilkens
00254 ** Added some code to avoid compiler warning (unreachable code) on Sun CC 2.0.1.
00255 **
00256 ** Revision 1.8  2002/08/05 09:09:59  wilkens
00257 ** Modfified the project's structure in order to be able to create a new
00258 ** application which contains both wlmscpdb and ppsscpdb.
00259 **
00260 ** Revision 1.7  2002/07/17 13:10:37  wilkens
00261 ** Corrected some minor logical errors in the wlmscpdb sources and completely
00262 ** updated the wlmscpfs so that it does not use the original wlistctn sources
00263 ** any more but standard wlm sources which are now used by all three variants
00264 ** of wlmscps.
00265 **
00266 ** Revision 1.6  2002/06/10 11:25:06  wilkens
00267 ** Made some corrections to keep gcc 2.95.3 quiet.
00268 **
00269 ** Revision 1.5  2002/04/18 14:20:09  wilkens
00270 ** Modified Makefiles. Updated latest changes again. These are the latest
00271 ** sources. Added configure file.
00272 **
00273 ** Revision 1.4  2002/01/08 19:10:04  joergr
00274 ** Minor adaptations to keep the gcc compiler on Linux and Solaris happy.
00275 ** Currently only the "file version" of the worklist SCP is supported on
00276 ** Unix systems.
00277 **
00278 ** Revision 1.3  2002/01/08 17:45:34  joergr
00279 ** Reformatted source files (replaced Windows newlines by Unix ones, replaced
00280 ** tabulator characters by spaces, etc.)
00281 **
00282 ** Revision 1.2  2002/01/08 17:35:39  joergr
00283 ** Reworked database support after trials at the hospital (modfied by MC/JR on
00284 ** 2002-01-08).
00285 **
00286 **
00287 */


Generated on 20 Dec 2005 for OFFIS DCMTK Version 3.5.4 by Doxygen 1.4.5