33 #include "dcmtk/config/osconfig.h"
34 #include "dcmtk/dcmdata/dctypes.h"
35 #include "dcmtk/ofstd/ofstring.h"
115 static const Uint32 OK;
116 static const Uint32 requestApplicationID;
117 static const Uint32 assignApplicationID;
118 static const Uint32 applicationTerminates;
119 static const Uint32 receivedUnencryptedDICOMConnection;
120 static const Uint32 receivedEncryptedDICOMConnection;
121 static const Uint32 connectionClosed;
122 static const Uint32 connectionAborted;
123 static const Uint32 requestedUnencryptedDICOMConnection;
124 static const Uint32 requestedEncryptedDICOMConnection;
125 static const Uint32 receivedDICOMObject;
126 static const Uint32 sentDICOMObject;
129 static const Uint32 statusOK;
130 static const Uint32 statusWarning;
131 static const Uint32 statusError;
134 static const Uint32 clientOther;
135 static const Uint32 clientStoreSCP;
136 static const Uint32 clientStoreSCU;
137 static const Uint32 clientPrintSCP;
138 static const Uint32 clientPrintSCU;
139 static const Uint32 clientQRSCP;
179 DVPSIPCClient(Uint32 clientType,
const char *txt,
int thePort, OFBool keepOpen);
Uint32 payloadAllocated
number of bytes allocated in payload
void notifyReceivedUnencryptedDICOMConnection(Uint32 status, const char *txt)
sends ReceivedUnencryptedDICOMConnection notification to server.
Uint32 payloadReadOffset
read offset into payload in bytes
OFBool receive(DcmTransportConnection &connection)
receives a messages from the given transport connection and stores it in the current object...
DVPSIPCClient & operator=(const DVPSIPCClient &)
private undefined copy assignment operator
unsigned char * payload
pointer to raw payload data in big endian byte order
OFBool performTransaction(DVPSIPCMessage &msg)
perform message transaction with server.
void addStringToPayload(const char *str)
adds a character string into the message payload.
this class represents a TCP/IP based transport connection which can be a transparent TCP/IP socket co...
void setMessageType(Uint32 msgtype)
sets the message type
virtual ~DVPSIPCMessage()
destructor
class for IPC message exchange between different processes of the DICOMscope application ...
Uint32 messageType
type of message
void notifyReceivedEncryptedDICOMConnection(Uint32 status, const char *txt)
sends ReceivedEncryptedDICOMConnection notification to server.
DVPSIPCMessage & operator=(const DVPSIPCMessage &)
copy assignment operator
OFBool keepConnectionOpen
flag indicating whether we want to keep the connection open
void notifySentDICOMObject(Uint32 status, const char *txt)
sends SentDICOMObject notification to server.
void erasePayload()
removes all payload
OFBool send(DcmTransportConnection &connection)
sends the current message over the given transport connection.
Uint32 payloadUsed
number of bytes actually used in payload
DcmTransportConnection * connection
current transport connection
void notifyReceivedDICOMObject(Uint32 status, const char *txt)
sends ReceivedDICOMObject notification to server.
void addIntToPayload(Uint32 i)
adds an integer into the message payload.
OFBool serverActive
true if the first connection attempt has succeeded, false otherwise
virtual ~DVPSIPCClient()
destructor
Uint32 applicationID
application ID assigned by the server
OFBool extractStringFromPayload(OFString &str)
extracts a string from the message payload and copies it into the given str object.
int port
TCP/IP port number on which the server is listening.
void notifyConnectionAborted(Uint32 status, const char *txt)
sends ConnectionAborted notification to server.
OFBool isServerActive()
checks whether the message server has been found active upon creation of this object.
Uint32 getMessageType()
returns the message type
void notifyRequestedUnencryptedDICOMConnection(Uint32 status, const char *txt)
sends RequestedUnencryptedDICOMConnection notification to server.
a simple string class that implements a subset of std::string.
DVPSIPCClient(Uint32 clientType, const char *txt, int thePort, OFBool keepOpen)
constructor
void rewindPayload()
rewinds the read offset to the beginning of the message payload
a client for IPC message exchange between different processes of the DICOMscope application ...
OFBool extractIntFromPayload(Uint32 &i)
extracts an integer from the message payload.
void notifyApplicationTerminates(Uint32 status)
sends ApplicationTerminates notification to server.
void resizePayload(Uint32 i)
resize payload if necessary such that at least i bytes can be written
void notifyConnectionClosed(Uint32 status)
sends ConnectionClosed notification to server.
void requestConnection()
request connection to server, store in 'connection' if successful.
DVPSIPCMessage()
default constructor
void notifyRequestedEncryptedDICOMConnection(Uint32 status, const char *txt)
sends RequestedEncryptedDICOMConnection notification to server.