DCMTK  Version 3.6.1 20120515
OFFIS DICOM Toolkit
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
DVPSIPCMessage Class Reference

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

List of all members.

Public Member Functions

 DVPSIPCMessage ()
 default constructor
 DVPSIPCMessage (const DVPSIPCMessage &copy)
 copy constructor
virtual ~DVPSIPCMessage ()
 destructor
DVPSIPCMessageoperator= (const DVPSIPCMessage &)
 copy assignment operator
void setMessageType (Uint32 msgtype)
 sets the message type
Uint32 getMessageType ()
 returns the message type
void addStringToPayload (const char *str)
 adds a character string into the message payload.
void addIntToPayload (Uint32 i)
 adds an integer into the message payload.
OFBool extractStringFromPayload (OFString &str)
 extracts a string from the message payload and copies it into the given str object.
OFBool extractIntFromPayload (Uint32 &i)
 extracts an integer from the message payload.
void rewindPayload ()
 rewinds the read offset to the beginning of the message payload
void erasePayload ()
 removes all payload
OFBool send (DcmTransportConnection &connection)
 sends the current message over the given transport connection.
OFBool receive (DcmTransportConnection &connection)
 receives a messages from the given transport connection and stores it in the current object, replacing any existing payload.

Static Public Attributes

static const Uint32 OK
static const Uint32 requestApplicationID
static const Uint32 assignApplicationID
static const Uint32 applicationTerminates
static const Uint32 receivedUnencryptedDICOMConnection
static const Uint32 receivedEncryptedDICOMConnection
static const Uint32 connectionClosed
static const Uint32 connectionAborted
static const Uint32 requestedUnencryptedDICOMConnection
static const Uint32 requestedEncryptedDICOMConnection
static const Uint32 receivedDICOMObject
static const Uint32 sentDICOMObject
static const Uint32 statusOK
static const Uint32 statusWarning
static const Uint32 statusError
static const Uint32 clientOther
static const Uint32 clientStoreSCP
static const Uint32 clientStoreSCU
static const Uint32 clientPrintSCP
static const Uint32 clientPrintSCU
static const Uint32 clientQRSCP

Private Member Functions

void resizePayload (Uint32 i)
 resize payload if necessary such that at least i bytes can be written

Private Attributes

Uint32 messageType
 type of message
Uint32 payloadUsed
 number of bytes actually used in payload
Uint32 payloadAllocated
 number of bytes allocated in payload
Uint32 payloadReadOffset
 read offset into payload in bytes
unsigned char * payload
 pointer to raw payload data in big endian byte order

Detailed Description

class for IPC message exchange between different processes of the DICOMscope application


Member Function Documentation

void DVPSIPCMessage::addIntToPayload ( Uint32  i)

adds an integer into the message payload.

Parameters:
valueto write
void DVPSIPCMessage::addStringToPayload ( const char *  str)

adds a character string into the message payload.

Parameters:
strzero terminated string, may be NULL (in which case an empty string is added)
OFBool DVPSIPCMessage::extractIntFromPayload ( Uint32 &  i)

extracts an integer from the message payload.

Parameters:
iinteger is written into this parameter
Returns:
OFTrue if successful, OFFalse otherwise

extracts a string from the message payload and copies it into the given str object.

Parameters:
strstring is written into this parameter
Returns:
OFTrue if successful, OFFalse otherwise
Uint32 DVPSIPCMessage::getMessageType ( ) [inline]

returns the message type

Returns:
message type

receives a messages from the given transport connection and stores it in the current object, replacing any existing payload.

Parameters:
connectiontransport connection to be used
Returns:
OFTrue if successful, OFFalse otherwise.
void DVPSIPCMessage::resizePayload ( Uint32  i) [private]

resize payload if necessary such that at least i bytes can be written

Parameters:
inumber of bytes required in buffer
OFBool DVPSIPCMessage::send ( DcmTransportConnection connection)

sends the current message over the given transport connection.

Parameters:
connectiontransport connection to be used
Returns:
OFTrue if successful, OFFalse otherwise.
void DVPSIPCMessage::setMessageType ( Uint32  msgtype) [inline]

sets the message type

Parameters:
msgtypenew message type

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


Generated on Tue May 15 2012 for DCMTK Version 3.6.1 20120515 by Doxygen 1.7.5.1-20111027