GDCM
2.2.4
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
MessageExchangeDefinition
gdcmAAssociateACPDU.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: GDCM (Grassroots DICOM). A DICOM library
4
5
Copyright (c) 2006-2011 Mathieu Malaterre
6
All rights reserved.
7
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notice for more information.
12
13
=========================================================================*/
14
#ifndef GDCMAASSOCIATEACPDU_H
15
#define GDCMAASSOCIATEACPDU_H
16
17
#include "
gdcmTypes.h
"
18
#include "
gdcmApplicationContext.h
"
19
#include "
gdcmPresentationContextAC.h
"
20
#include "
gdcmUserInformation.h
"
21
#include "
gdcmBasePDU.h
"
22
23
#include <vector>
24
25
namespace
gdcm
26
{
27
28
namespace
network
29
{
30
class
AAssociateRQPDU;
31
37
class
AAssociateACPDU
:
public
BasePDU
38
{
39
public
:
40
AAssociateACPDU
();
41
std::istream &
Read
(std::istream &is);
42
const
std::ostream &
Write
(std::ostream &os)
const
;
43
44
void
AddPresentationContextAC
(
PresentationContextAC
const
&pcac );
45
46
typedef
std::vector<PresentationContextAC>::size_type
SizeType
;
47
const
PresentationContextAC
&
GetPresentationContextAC
(
SizeType
i ) {
48
assert( !PresContextAC.empty() && i < PresContextAC.size() );
49
return
PresContextAC[i];
50
}
51
SizeType
GetNumberOfPresentationContextAC
()
const
{
52
return
PresContextAC.size();
53
}
54
const
UserInformation
&
GetUserInformation
()
const
{
return
UserInfo; }
55
56
SizeType
Size
()
const
;
57
58
void
Print
(std::ostream &os)
const
;
59
bool
IsLastFragment
()
const
{
return
true
; }
60
61
void
InitFromRQ
(
AAssociateRQPDU
const
& rqpdu );
62
protected
:
63
friend
class
AAssociateRQPDU
;
64
void
SetCalledAETitle
(
const
char
calledaetitle[16]);
65
void
SetCallingAETitle
(
const
char
callingaetitle[16]);
66
67
private
:
68
void
InitSimple(
AAssociateRQPDU
const
& rqpdu );
69
70
private
:
71
static
const
uint8_t ItemType;
// PDUType ?
72
static
const
uint8_t Reserved2;
73
uint32_t PDULength;
// len of
74
static
const
uint16_t ProtocolVersion;
75
static
const
uint16_t Reserved9_10;
76
77
// This reserved field shall be sent with a value identical to the value
78
// received in the same field of the A-ASSOCIATE-RQ PDU, but its value
79
// shall not be tested when received.
80
char
Reserved11_26[16];
81
// This reserved field shall be sent with a value identical to the value
82
// received in the same field of the A-ASSOCIATE-RQ PDU, but its value
83
// shall not be tested when received.
84
char
Reserved27_42[16];
85
// This reserved field shall be sent with a value identical to the value
86
// received in the same field of the A-ASSOCIATE-RQ PDU, but its value
87
// shall not be tested when received.
88
char
Reserved43_74[32];
89
/*
90
75-xxx Variable items This variable field shall contain the following items: one Application
91
Context Item, one or more Presentation Context Item(s) and one User
92
Information Item. For a complete description of these items see Sections
93
7.1.1.2, 7.1.1.14, and 7.1.1.6.
94
*/
95
ApplicationContext
AppContext;
96
std::vector<PresentationContextAC> PresContextAC;
97
UserInformation
UserInfo;
98
};
99
100
}
// end namespace network
101
102
}
// end namespace gdcm
103
104
#endif //GDCMAASSOCIATEACPDU_H
Generated on Mon Sep 9 2013 14:21:55 for GDCM by
1.8.4