DCMTK  Version 3.6.1 20170228
OFFIS DICOM Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DVPSIPCClient Class Reference

a client for IPC message exchange between different processes of the DICOMscope application More...

Public Member Functions

 DVPSIPCClient (Uint32 clientType, const char *txt, int thePort, OFBool keepOpen)
 constructor More...
 
virtual ~DVPSIPCClient ()
 destructor
 
void notifyApplicationTerminates (Uint32 status)
 sends ApplicationTerminates notification to server. More...
 
void notifyReceivedUnencryptedDICOMConnection (Uint32 status, const char *txt)
 sends ReceivedUnencryptedDICOMConnection notification to server. More...
 
void notifyReceivedEncryptedDICOMConnection (Uint32 status, const char *txt)
 sends ReceivedEncryptedDICOMConnection notification to server. More...
 
void notifyConnectionClosed (Uint32 status)
 sends ConnectionClosed notification to server. More...
 
void notifyConnectionAborted (Uint32 status, const char *txt)
 sends ConnectionAborted notification to server. More...
 
void notifyRequestedUnencryptedDICOMConnection (Uint32 status, const char *txt)
 sends RequestedUnencryptedDICOMConnection notification to server. More...
 
void notifyRequestedEncryptedDICOMConnection (Uint32 status, const char *txt)
 sends RequestedEncryptedDICOMConnection notification to server. More...
 
void notifyReceivedDICOMObject (Uint32 status, const char *txt)
 sends ReceivedDICOMObject notification to server. More...
 
void notifySentDICOMObject (Uint32 status, const char *txt)
 sends SentDICOMObject notification to server. More...
 
OFBool isServerActive ()
 checks whether the message server has been found active upon creation of this object. More...
 

Private Member Functions

 DVPSIPCClient (const DVPSIPCClient &copy)
 private undefined copy constructor
 
DVPSIPCClientoperator= (const DVPSIPCClient &)
 private undefined copy assignment operator
 
void requestConnection ()
 request connection to server, store in 'connection' if successful.
 
OFBool performTransaction (DVPSIPCMessage &msg)
 perform message transaction with server. More...
 

Private Attributes

int port
 TCP/IP port number on which the server is listening.
 
OFBool serverActive
 true if the first connection attempt has succeeded, false otherwise
 
Uint32 applicationID
 application ID assigned by the server
 
OFBool keepConnectionOpen
 flag indicating whether we want to keep the connection open
 
DcmTransportConnectionconnection
 current transport connection
 

Detailed Description

a client for IPC message exchange between different processes of the DICOMscope application

Constructor & Destructor Documentation

DVPSIPCClient::DVPSIPCClient ( Uint32  clientType,
const char *  txt,
int  thePort,
OFBool  keepOpen 
)

constructor

Parameters
clientTypetype of client application, see constants defined in DVPSIPCMessage
txttextual description of client application
thePortTCP/IP port on which the server is listening
keepOpenflag indicating whether the connection should be kept open all the time or should be opened/closed for each transaction.

Member Function Documentation

OFBool DVPSIPCClient::isServerActive ( )
inline

checks whether the message server has been found active upon creation of this object.

Returns
OFTrue if server is active, OFFalse otherwise.
void DVPSIPCClient::notifyApplicationTerminates ( Uint32  status)

sends ApplicationTerminates notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
void DVPSIPCClient::notifyConnectionAborted ( Uint32  status,
const char *  txt 
)

sends ConnectionAborted notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
txttextual description of notification for server
void DVPSIPCClient::notifyConnectionClosed ( Uint32  status)

sends ConnectionClosed notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
void DVPSIPCClient::notifyReceivedDICOMObject ( Uint32  status,
const char *  txt 
)

sends ReceivedDICOMObject notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
txttextual description of DICOM object
void DVPSIPCClient::notifyReceivedEncryptedDICOMConnection ( Uint32  status,
const char *  txt 
)

sends ReceivedEncryptedDICOMConnection notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
txttextual description of notification for server
void DVPSIPCClient::notifyReceivedUnencryptedDICOMConnection ( Uint32  status,
const char *  txt 
)

sends ReceivedUnencryptedDICOMConnection notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
txttextual description of notification for server
void DVPSIPCClient::notifyRequestedEncryptedDICOMConnection ( Uint32  status,
const char *  txt 
)

sends RequestedEncryptedDICOMConnection notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
txttextual description of notification for server
void DVPSIPCClient::notifyRequestedUnencryptedDICOMConnection ( Uint32  status,
const char *  txt 
)

sends RequestedUnencryptedDICOMConnection notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
txttextual description of notification for server
void DVPSIPCClient::notifySentDICOMObject ( Uint32  status,
const char *  txt 
)

sends SentDICOMObject notification to server.

Parameters
Uint32message status, see constants defined in DVPSIPCMessage
txttextual description of DICOM object
OFBool DVPSIPCClient::performTransaction ( DVPSIPCMessage msg)
private

perform message transaction with server.

If serverActive is false, no connection attempt is performed.

Parameters
msgcontains message to be sent, overwritten with message received from server if successful
Returns
OFTrue if successful, OFFalse otherwise

The documentation for this class was generated from the following file:


Generated on Tue Feb 28 2017 for DCMTK Version 3.6.1 20170228 by Doxygen 1.8.8