GDCM 3.0.24
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"
20#include "gdcmUserInformation.h"
21#include "gdcmBasePDU.h"
22
23#include <vector>
24
25namespace gdcm
26{
27
28namespace network
29{
30class AAssociateRQPDU;
31
38{
39public:
41 std::istream &Read(std::istream &is) override;
42 const std::ostream &Write(std::ostream &os) const override;
43
45
46 typedef std::vector<PresentationContextAC>::size_type SizeType;
48 assert( !PresContextAC.empty() && i < PresContextAC.size() );
49 return PresContextAC[i];
50 }
52 return PresContextAC.size();
53 }
54 const UserInformation &GetUserInformation() const { return UserInfo; }
55
56 SizeType Size() const override;
57
58 void Print(std::ostream &os) const override;
59 bool IsLastFragment() const override { return true; }
60
61 void InitFromRQ( AAssociateRQPDU const & rqpdu );
62protected:
63 friend class AAssociateRQPDU;
64 void SetCalledAETitle(const char calledaetitle[16]);
65 void SetCallingAETitle(const char callingaetitle[16]);
66
67private:
68 void InitSimple( AAssociateRQPDU const & rqpdu );
69
70private:
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
AAssociateACPDU.
Definition gdcmAAssociateACPDU.h:38
const UserInformation & GetUserInformation() const
Definition gdcmAAssociateACPDU.h:54
std::vector< PresentationContextAC >::size_type SizeType
Definition gdcmAAssociateACPDU.h:46
void AddPresentationContextAC(PresentationContextAC const &pcac)
bool IsLastFragment() const override
Definition gdcmAAssociateACPDU.h:59
void InitFromRQ(AAssociateRQPDU const &rqpdu)
SizeType GetNumberOfPresentationContextAC() const
Definition gdcmAAssociateACPDU.h:51
const PresentationContextAC & GetPresentationContextAC(SizeType i)
Definition gdcmAAssociateACPDU.h:47
void SetCalledAETitle(const char calledaetitle[16])
std::istream & Read(std::istream &is) override
void Print(std::ostream &os) const override
SizeType Size() const override
void SetCallingAETitle(const char callingaetitle[16])
const std::ostream & Write(std::ostream &os) const override
AAssociateRQPDU.
Definition gdcmAAssociateRQPDU.h:36
ApplicationContext.
Definition gdcmApplicationContext.h:33
BasePDU.
Definition gdcmBasePDU.h:51
PresentationContextAC.
Definition gdcmPresentationContextAC.h:33
UserInformation.
Definition gdcmUserInformation.h:44
Definition gdcmASN1.h:21