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

Base class for all DIMSE response messages. More...

#include <Response.h>

Inheritance diagram for odil::message::Response:
Inheritance graph
[legend]
Collaboration diagram for odil::message::Response:
Collaboration graph
[legend]

Public Types

enum  Status {
  Success =0x0000, Cancel =0xFE00, Pending =0xFF00, AttributeListError =0x0107,
  AttributeValueOutOfRange =0x0116, SOPClassNotSupported =0x0122, ClassInstanceConflict =0x0119, DuplicateSOPInstance =0x0111,
  DuplicateInvocation =0x0210, InvalidArgumentValue =0x0115, InvalidAttributeValue =0x0106, InvalidObjectInstance =0x0117,
  MissingAttribute =0x0120, MissingAttributeValue =0x0121, MistypedArgument =0x0212, NoSuchArgument =0x0114,
  NoSuchAttribute =0x0105, NoSuchEventType =0x0113, NoSuchSOPInstance =0x0112, NoSuchSOPClass =0x0118,
  ProcessingFailure =0x0110, ResourceLimitation =0x0213, UnrecognizedOperation =0x0211, NoSuchActionType =0x0123,
  RefusedNotAuthorized =0x0124
}
 General status codes, from PS3.7, C. More...
 
- Public Types inherited from odil::message::Message
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

 Response (Value::Integer message_id_being_responded_to, Value::Integer status)
 Create a response with given message id and status;. More...
 
 Response (std::shared_ptr< Message const > message)
 Create a response from the Message ID Being Responded To and the Status stored in the message command set. More...
 
 ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO (message_id_being_responded_to, registry::MessageIDBeingRespondedTo) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO(offending_element
 
registry::OffendingElement ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO (error_comment, registry::ErrorComment) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(error_id
 
registry::OffendingElement registry::ErrorID ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO (affected_sop_instance_uid, registry::AffectedSOPInstanceUID) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO(attribute_identifier_list
 
registry::OffendingElement registry::ErrorID registry::AttributeIdentifierList bool is_pending () const
 Test whether the status class is pending. More...
 
bool is_warning () const
 Test whether the status class is warning. More...
 
bool is_failure () const
 Test whether the status class is failure. More...
 
void set_status_fields (std::shared_ptr< DataSet const > status_fields)
 Set the status fields (cf. PS.37, C) More...
 
- Public Member Functions inherited from 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. 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...
 

Static Public Member Functions

static bool is_pending (Value::Integer status)
 Test whether the status class is pending. More...
 
static bool is_warning (Value::Integer status)
 Test whether the status class is warning. More...
 
static bool is_failure (Value::Integer status)
 Test whether the status class is failure. More...
 

Additional Inherited Members

- Protected Attributes inherited from odil::message::Message
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 response messages.

Member Enumeration Documentation

◆ Status

General status codes, from PS3.7, C.

Enumerator
Success 
Cancel 
Pending 
AttributeListError 
AttributeValueOutOfRange 
SOPClassNotSupported 
ClassInstanceConflict 
DuplicateSOPInstance 
DuplicateInvocation 
InvalidArgumentValue 
InvalidAttributeValue 
InvalidObjectInstance 
MissingAttribute 
MissingAttributeValue 
MistypedArgument 
NoSuchArgument 
NoSuchAttribute 
NoSuchEventType 
NoSuchSOPInstance 
NoSuchSOPClass 
ProcessingFailure 
ResourceLimitation 
UnrecognizedOperation 
NoSuchActionType 
RefusedNotAuthorized 

Constructor & Destructor Documentation

◆ Response() [1/2]

odil::message::Response::Response ( Value::Integer  message_id_being_responded_to,
Value::Integer  status 
)

Create a response with given message id and status;.

◆ Response() [2/2]

odil::message::Response::Response ( std::shared_ptr< Message const >  message)

Create a response from the Message ID Being Responded To and the Status stored in the message command set.

Raise an exception is either of those elements is missing.

Member Function Documentation

◆ is_failure() [1/2]

static bool odil::message::Response::is_failure ( Value::Integer  status)
static

Test whether the status class is failure.

◆ is_failure() [2/2]

bool odil::message::Response::is_failure ( ) const

Test whether the status class is failure.

◆ is_pending() [1/2]

static bool odil::message::Response::is_pending ( Value::Integer  status)
static

Test whether the status class is pending.

◆ is_pending() [2/2]

registry::OffendingElement registry::ErrorID registry::AttributeIdentifierList bool odil::message::Response::is_pending ( ) const

Test whether the status class is pending.

◆ is_warning() [1/2]

static bool odil::message::Response::is_warning ( Value::Integer  status)
static

Test whether the status class is warning.

◆ is_warning() [2/2]

bool odil::message::Response::is_warning ( ) const

Test whether the status class is warning.

◆ ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO()

odil::message::Response::ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO ( message_id_being_responded_to  ,
registry::MessageIDBeingRespondedTo   
)

◆ ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO() [1/2]

registry::OffendingElement odil::message::Response::ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO ( error_comment  ,
registry::ErrorComment   
)

◆ ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO() [2/2]

registry::OffendingElement registry::ErrorID odil::message::Response::ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO ( affected_sop_instance_uid  ,
registry::AffectedSOPInstanceUID   
)

◆ set_status_fields()

void odil::message::Response::set_status_fields ( std::shared_ptr< DataSet const >  status_fields)

Set the status fields (cf. PS.37, C)


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