Odil
A C++11 library for the DICOM standard
Public Types | Public Member Functions | Protected Attributes | List of all members
odil::message::Message Class Reference

Base class for all DIMSE messages. More...

#include <Message.h>

Inheritance diagram for odil::message::Message:
Inheritance graph
[legend]

Public Types

enum  Command {
  C_STORE_RQ = 0x0001 , C_STORE_RSP = 0x8001 , C_FIND_RQ = 0x0020 , C_FIND_RSP = 0x8020 ,
  C_CANCEL_RQ = 0x0FFF , C_GET_RQ = 0x0010 , C_GET_RSP = 0x8010 , C_MOVE_RQ = 0x0021 ,
  C_MOVE_RSP = 0x8021 , C_ECHO_RQ = 0x0030 , C_ECHO_RSP = 0x8030 , N_EVENT_REPORT_RQ = 0x0100 ,
  N_EVENT_REPORT_RSP = 0x8100 , N_GET_RQ = 0x0110 , N_GET_RSP = 0x8110 , N_SET_RQ = 0x0120 ,
  N_SET_RSP = 0x8120 , N_ACTION_RQ = 0x0130 , N_ACTION_RSP = 0x8130 , N_CREATE_RQ = 0x0140 ,
  N_CREATE_RSP = 0x8140 , N_DELETE_RQ = 0x0150 , N_DELETE_RSP = 0x8150
}
 
enum  Priority { LOW = 0x0002 , MEDIUM = 0x0000 , HIGH = 0x0001 }
 
enum  DataSetType { PRESENT = 0x0000 , ABSENT = 0x0101 }
 

Public Member Functions

 Message (std::shared_ptr< DataSet > command_set=std::make_shared< DataSet >(), std::shared_ptr< DataSet > data_set={})
 Create a message with an empty command set and no data set. More...
 
 Message (Message const &)=default
 
 Message (Message &&)=default
 
Messageoperator= (Message const &)=default
 
Messageoperator= (Message &&)=default
 
virtual ~Message ()=default
 
std::shared_ptr< DataSet const > get_command_set () const
 Return the command set of the message (by reference or shared pointer). More...
 
bool has_data_set () const
 Test whether as data set is present in the message. More...
 
std::shared_ptr< DataSet const > get_data_set () const
 Return the data set of the message, raise an exception if no data set is present. More...
 
std::shared_ptr< DataSetget_data_set ()
 Return the data set of the message, raise an exception if no data set is present. More...
 
void set_data_set (std::shared_ptr< DataSet > data_set)
 Set the data set of the message. More...
 
void delete_data_set ()
 Delete the data set in this message. More...
 
Value::Integer const & get_command_field () const
 Return the registry::CommandField element of the command set. More...
 
void set_command_field (Value::Integer const &value)
 Set the registry::CommandField element of the command set. More...
 

Protected Attributes

std::shared_ptr< DataSet_command_set
 Command set of the message. More...
 
std::shared_ptr< DataSet_data_set
 Data set of the message. More...
 

Detailed Description

Base class for all DIMSE messages.

Member Enumeration Documentation

◆ Command

Enumerator
C_STORE_RQ 
C_STORE_RSP 
C_FIND_RQ 
C_FIND_RSP 
C_CANCEL_RQ 
C_GET_RQ 
C_GET_RSP 
C_MOVE_RQ 
C_MOVE_RSP 
C_ECHO_RQ 
C_ECHO_RSP 
N_EVENT_REPORT_RQ 
N_EVENT_REPORT_RSP 
N_GET_RQ 
N_GET_RSP 
N_SET_RQ 
N_SET_RSP 
N_ACTION_RQ 
N_ACTION_RSP 
N_CREATE_RQ 
N_CREATE_RSP 
N_DELETE_RQ 
N_DELETE_RSP 

◆ DataSetType

Enumerator
PRESENT 
ABSENT 

◆ Priority

Enumerator
LOW 
MEDIUM 
HIGH 

Constructor & Destructor Documentation

◆ Message() [1/3]

odil::message::Message::Message ( std::shared_ptr< DataSet command_set = std::make_shared< DataSet >(),
std::shared_ptr< DataSet data_set = {} 
)

Create a message with an empty command set and no data set.

◆ Message() [2/3]

odil::message::Message::Message ( Message const &  )
default

◆ Message() [3/3]

odil::message::Message::Message ( Message &&  )
default

◆ ~Message()

virtual odil::message::Message::~Message ( )
virtualdefault

Member Function Documentation

◆ delete_data_set()

void odil::message::Message::delete_data_set ( )

Delete the data set in this message.

◆ get_command_field()

Value::Integer const& odil::message::Message::get_command_field ( ) const
inline

Return the registry::CommandField element of the command set.

◆ get_command_set()

std::shared_ptr<DataSet const> odil::message::Message::get_command_set ( ) const

Return the command set of the message (by reference or shared pointer).

◆ get_data_set() [1/2]

std::shared_ptr<DataSet> odil::message::Message::get_data_set ( )

Return the data set of the message, raise an exception if no data set is present.

◆ get_data_set() [2/2]

std::shared_ptr<DataSet const> odil::message::Message::get_data_set ( ) const

Return the data set of the message, raise an exception if no data set is present.

◆ has_data_set()

bool odil::message::Message::has_data_set ( ) const

Test whether as data set is present in the message.

◆ operator=() [1/2]

Message& odil::message::Message::operator= ( Message &&  )
default

◆ operator=() [2/2]

Message& odil::message::Message::operator= ( Message const &  )
default

◆ set_command_field()

void odil::message::Message::set_command_field ( Value::Integer const &  value)
inline

Set the registry::CommandField element of the command set.

◆ set_data_set()

void odil::message::Message::set_data_set ( std::shared_ptr< DataSet data_set)

Set the data set of the message.

Member Data Documentation

◆ _command_set

std::shared_ptr<DataSet> odil::message::Message::_command_set
protected

Command set of the message.

◆ _data_set

std::shared_ptr<DataSet> odil::message::Message::_data_set
protected

Data set of the message.


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