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);
187 void notifyApplicationTerminates(Uint32 status);
193 void notifyReceivedUnencryptedDICOMConnection(Uint32 status,
const char *txt);
199 void notifyReceivedEncryptedDICOMConnection(Uint32 status,
const char *txt);
204 void notifyConnectionClosed(Uint32 status);
210 void notifyConnectionAborted(Uint32 status,
const char *txt);
216 void notifyRequestedUnencryptedDICOMConnection(Uint32 status,
const char *txt);
222 void notifyRequestedEncryptedDICOMConnection(Uint32 status,
const char *txt);
228 void notifyReceivedDICOMObject(Uint32 status,
const char *txt);
234 void notifySentDICOMObject(Uint32 status,
const char *txt);
252 void requestConnection();
Uint32 payloadAllocated
number of bytes allocated in payload
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...
unsigned char * payload
pointer to raw payload data in big endian byte order
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
DVPSIPCMessage & operator=(const DVPSIPCMessage &)
copy assignment operator
OFBool keepConnectionOpen
flag indicating whether we want to keep the connection open
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 addIntToPayload(Uint32 i)
adds an integer into the message payload.
OFBool serverActive
true if the first connection attempt has succeeded, false otherwise
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.
OFBool isServerActive()
checks whether the message server has been found active upon creation of this object.
Uint32 getMessageType()
returns the message type
a simple string class that implements a subset of std::string.
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 resizePayload(Uint32 i)
resize payload if necessary such that at least i bytes can be written
DVPSIPCMessage()
default constructor