-
Notifications
You must be signed in to change notification settings - Fork 0
/
pdata.hpp
72 lines (53 loc) · 1.73 KB
/
pdata.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef P_DATA_HPP_INCLUDE_GUARD_4520084566
#define P_DATA_HPP_INCLUDE_GUARD_4520084566
/****************************************************************************
*
* Abstract Base Class for P-DATA Service
*
*
****************************************************************************/
#include "socket/Base.hpp"
#include "socket/Socket.hpp"
#include "Types.hpp"
#include "DataSet.hpp"
#include "Buffer.hpp"
/*
We could redesign the following two classes to mirror the standard better
by having PDataTF HAVE A list<> of PDVs. I think we can avoid copying-related
performance issues if this is THE place where the associated DataSets reside, and
they are passed to other classes by reference. After all, I don't see why a
Command or Data message would ever be changed after it had been received.
*/
namespace dicom
{
namespace MessageControlHeader
{
typedef BYTE Code;
const Code DATASET = 0x00,
COMMAND = 0x01,
LAST_FRAGMENT = 0x02;
}
/*!
defined in Part8, table 9-22
Further documentation in Part 8, Annex E
I think this class needs to be seriously re-thought, or even removed altogether,
as it's implementation is very misleading. This class does _not_ corresponding
exactly to the P_DATA_TF request primitive, rather it serves to manage a _stream_
of them!
We need to know the maximum length specified during association negotiation.
*/
class PDataTF
{
public:
Buffer buffer_;
const static BYTE ItemType = 0x04;
const static BYTE Reserved1 = 0x00;
UINT32 Length;
int MsgStatus;
BYTE PresentationContextID;
BYTE MessageHeader;
bool ReadDynamic(Network::Socket& socket);
PDataTF(int ByteOrder);
};
}//namespace dicom
#endif //P_DATA_HPP_INCLUDE_GUARD_4520084566