class for IPC message exchange between different processes of the DICOMscope application
More...
|
|
| DVPSIPCMessage () |
| | default constructor
|
|
| DVPSIPCMessage (const DVPSIPCMessage ©) |
| | copy constructor
|
|
virtual | ~DVPSIPCMessage () |
| | destructor
|
|
DVPSIPCMessage & | operator= (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.
|
|
| void | resizePayload (size_t i) |
| | resize payload if necessary such that at least i bytes can be written
|
|
|
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
|
class for IPC message exchange between different processes of the DICOMscope application
◆ addIntToPayload()
| void DVPSIPCMessage::addIntToPayload |
( |
Uint32 | i | ) |
|
adds an integer into the message payload.
- Parameters
-
◆ addStringToPayload()
| void DVPSIPCMessage::addStringToPayload |
( |
const char * | str | ) |
|
adds a character string into the message payload.
The total payload should not exceed maximumPayloadSize because the receiver rejects larger messages.
- Parameters
-
| str | zero terminated string, may be NULL (in which case an empty string is added) |
◆ extractIntFromPayload()
| OFBool DVPSIPCMessage::extractIntFromPayload |
( |
Uint32 & | i | ) |
|
extracts an integer from the message payload.
- Parameters
-
| i | integer is written into this parameter |
- Returns
- OFTrue if successful, OFFalse otherwise
◆ extractStringFromPayload()
| OFBool DVPSIPCMessage::extractStringFromPayload |
( |
OFString & | str | ) |
|
extracts a string from the message payload and copies it into the given str object.
- Parameters
-
| str | string is written into this parameter |
- Returns
- OFTrue if successful, OFFalse otherwise
◆ getMessageType()
| Uint32 DVPSIPCMessage::getMessageType |
( |
| ) |
|
|
inline |
returns the message type
- Returns
- message type
References messageType.
◆ receive()
receives a messages from the given transport connection and stores it in the current object, replacing any existing payload.
A message announcing a payload larger than maximumPayloadSize is rejected without being read.
- Parameters
-
| connection | transport connection to be used |
- Returns
- OFTrue if successful, OFFalse otherwise.
◆ resizePayload()
| void DVPSIPCMessage::resizePayload |
( |
size_t | i | ) |
|
|
private |
resize payload if necessary such that at least i bytes can be written
- Parameters
-
| i | number of bytes required in buffer |
◆ send()
sends the current message over the given transport connection.
- Parameters
-
| connection | transport connection to be used |
- Returns
- OFTrue if successful, OFFalse otherwise.
◆ setMessageType()
| void DVPSIPCMessage::setMessageType |
( |
Uint32 | msgtype | ) |
|
|
inline |
sets the message type
- Parameters
-
References messageType.
◆ maximumPayloadSize
| const Uint32 DVPSIPCMessage::maximumPayloadSize |
|
static |
maximum size of the message payload in bytes, i.e.
the maximum total size of the values written with addIntToPayload() and addStringToPayload(). A message whose payload exceeds this limit is rejected by receive() and should, therefore, not be created by the sender either. The current value is 1 MByte (1048576 bytes), which is far above the size of the messages defined for this interface, since these consist of a few integers and one short text.
The documentation for this class was generated from the following file:
- dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h