Odil
A C++11 library for the DICOM standard
Toggle main menu visibility
Loading...
Searching...
No Matches
Response.h
Go to the documentation of this file.
1
/*************************************************************************
2
* odil - Copyright (C) Universite de Strasbourg
3
* Distributed under the terms of the CeCILL-B license, as published by
4
* the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6
* for details.
7
************************************************************************/
8
9
#ifndef _0dd2e31e_212a_494a_a8d3_93b235336658
10
#define _0dd2e31e_212a_494a_a8d3_93b235336658
11
12
#include "
odil/message/Message.h
"
13
#include "
odil/odil.h
"
14
#include "
odil/registry.h
"
15
#include "
odil/Value.h
"
16
17
namespace
odil
18
{
19
20
namespace
message
21
{
22
24
class
ODIL_API
Response
:
public
Message
25
{
26
public
:
28
enum
Status
29
{
30
Success
=0x0000,
31
// Warning: 0001 or Bxxx
32
// Failure: Axxx or Cxxx
33
Cancel
=0xFE00,
34
Pending
=0xFF00,
35
36
// Warning Status Classes, PS3.7, C.3
37
AttributeListError
=0x0107,
38
AttributeValueOutOfRange
=0x0116,
39
40
// Failure Status Classes, PS3.7, C.4
41
SOPClassNotSupported
=0x0122,
42
ClassInstanceConflict
=0x0119,
43
DuplicateSOPInstance
=0x0111,
44
DuplicateInvocation
=0x0210,
45
InvalidArgumentValue
=0x0115,
46
InvalidAttributeValue
=0x0106,
47
InvalidObjectInstance
=0x0117,
48
MissingAttribute
=0x0120,
49
MissingAttributeValue
=0x0121,
50
MistypedArgument
=0x0212,
51
NoSuchArgument
=0x0114,
52
NoSuchAttribute
=0x0105,
53
NoSuchEventType
=0x0113,
54
NoSuchSOPInstance
=0x0112,
55
NoSuchSOPClass
=0x0118,
56
ProcessingFailure
=0x0110,
57
ResourceLimitation
=0x0213,
58
UnrecognizedOperation
=0x0211,
59
NoSuchActionType
=0x0123,
60
RefusedNotAuthorized
=0x0124,
61
};
62
64
static
bool
is_pending
(
Value::Integer
status);
65
67
static
bool
is_warning
(
Value::Integer
status);
68
70
static
bool
is_failure
(
Value::Integer
status);
71
73
Response
(
Value::Integer
message_id_being_responded_to,
Value::Integer
status);
74
81
Response
(std::shared_ptr<Message const>
message
);
82
83
ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO
(
84
message_id_being_responded_to,
registry::MessageIDBeingRespondedTo
)
85
ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO
(status,
registry::Status
)
86
87
ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO
(
88
offending_element,
registry::OffendingElement
)
89
ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO
(
90
error_comment,
registry
::ErrorComment)
91
ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO
(
92
error_id,
registry
::ErrorID)
93
ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO
(
94
affected_sop_instance_uid,
registry
::AffectedSOPInstanceUID)
95
ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO
(
96
attribute_identifier_list,
registry
::AttributeIdentifierList)
97
99
bool
is_pending
() const;
100
102
bool
is_warning
() const;
103
105
bool
is_failure
() const;
106
108
void
set_status_fields
(std::shared_ptr<
DataSet
const> status_fields);
109
};
110
111
}
112
113
}
114
115
#endif
// _0dd2e31e_212a_494a_a8d3_93b235336658
Value.h
odil::DataSet
DICOM Data set.
Definition
DataSet.h:30
odil::Value::Integer
int64_t Integer
Integer type.
Definition
Value.h:42
odil::message::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.
odil::message::Response::is_failure
static bool is_failure(Value::Integer status)
Test whether the status class is failure.
odil::message::Response::is_warning
static bool is_warning(Value::Integer status)
Test whether the status class is warning.
odil::message::Response::Response
Response(Value::Integer message_id_being_responded_to, Value::Integer status)
Create a response with given message id and status;.
odil::message::Response::ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO
registry::OffendingElement ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO(error_comment, registry::ErrorComment) ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(error_id
odil::message::Response::is_pending
static bool is_pending(Value::Integer status)
Test whether the status class is pending.
odil::message::Response::ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO
ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(message_id_being_responded_to, registry::MessageIDBeingRespondedTo) ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO(offending_element
odil::message::Response::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...
odil::message::Response::set_status_fields
void set_status_fields(std::shared_ptr< DataSet const > status_fields)
Set the status fields (cf. PS.37, C).
odil::message::Response::Status
Status
General status codes, from PS3.7, C.
Definition
Response.h:29
odil::message::Response::Success
@ Success
Definition
Response.h:30
odil::message::Response::InvalidObjectInstance
@ InvalidObjectInstance
Definition
Response.h:47
odil::message::Response::MissingAttribute
@ MissingAttribute
Definition
Response.h:48
odil::message::Response::MissingAttributeValue
@ MissingAttributeValue
Definition
Response.h:49
odil::message::Response::NoSuchAttribute
@ NoSuchAttribute
Definition
Response.h:52
odil::message::Response::NoSuchSOPClass
@ NoSuchSOPClass
Definition
Response.h:55
odil::message::Response::UnrecognizedOperation
@ UnrecognizedOperation
Definition
Response.h:58
odil::message::Response::Cancel
@ Cancel
Definition
Response.h:33
odil::message::Response::InvalidArgumentValue
@ InvalidArgumentValue
Definition
Response.h:45
odil::message::Response::InvalidAttributeValue
@ InvalidAttributeValue
Definition
Response.h:46
odil::message::Response::DuplicateInvocation
@ DuplicateInvocation
Definition
Response.h:44
odil::message::Response::RefusedNotAuthorized
@ RefusedNotAuthorized
Definition
Response.h:60
odil::message::Response::NoSuchActionType
@ NoSuchActionType
Definition
Response.h:59
odil::message::Response::AttributeValueOutOfRange
@ AttributeValueOutOfRange
Definition
Response.h:38
odil::message::Response::NoSuchEventType
@ NoSuchEventType
Definition
Response.h:53
odil::message::Response::ResourceLimitation
@ ResourceLimitation
Definition
Response.h:57
odil::message::Response::ClassInstanceConflict
@ ClassInstanceConflict
Definition
Response.h:42
odil::message::Response::AttributeListError
@ AttributeListError
Definition
Response.h:37
odil::message::Response::NoSuchArgument
@ NoSuchArgument
Definition
Response.h:51
odil::message::Response::ProcessingFailure
@ ProcessingFailure
Definition
Response.h:56
odil::message::Response::SOPClassNotSupported
@ SOPClassNotSupported
Definition
Response.h:41
odil::message::Response::NoSuchSOPInstance
@ NoSuchSOPInstance
Definition
Response.h:54
odil::message::Response::Pending
@ Pending
Definition
Response.h:34
odil::message::Response::MistypedArgument
@ MistypedArgument
Definition
Response.h:50
odil::message::Response::DuplicateSOPInstance
@ DuplicateSOPInstance
Definition
Response.h:43
Message.h
ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO
#define ODIL_MESSAGE_OPTIONAL_FIELD_INTEGER_MACRO(name, tag)
Definition
Message.h:67
ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO
#define ODIL_MESSAGE_OPTIONAL_FIELD_STRING_MACRO(name, tag)
Definition
Message.h:70
ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO
#define ODIL_MESSAGE_MANDATORY_FIELD_INTEGER_MACRO(name, tag)
Definition
Message.h:61
odil::message
Definition
Cancellation.h:21
odil::registry
Definition
registry.h:97
odil::registry::OffendingElement
Tag const OffendingElement(0x0000, 0x0901)
odil::registry::Status
Tag const Status(0x0000, 0x0900)
odil::registry::MessageIDBeingRespondedTo
Tag const MessageIDBeingRespondedTo(0x0000, 0x0120)
odil
Definition
Association.h:25
odil.h
ODIL_API
#define ODIL_API
Definition
odil.h:28
registry.h
src
odil
message
Response.h
Generated by
1.17.0