pynetdicom.pdu.P_DATA_TF¶
-
class
pynetdicom.pdu.
P_DATA_TF
¶ A P-DATA-TF PDU.
A P-DATA-TF PDU is used once an association has been established to send DIMSE message data.
-
pdu_length
¶ The number of bytes from the first byte following the PDU Length field to the last byte of the PDU.
- Type
int
-
pdu_type
¶ The PDU Type field value (0x04).
- Type
int
-
presentation_data_value_items
¶ The Presentation Data Value Item(s) field value.
- Type
list of pdu.PresentationDataValueItem
Notes
A P-DATA-TF PDU requires the following parameters:
PDU type (1, fixed value, 0x04)
PDU length (1)
Presentation data value Item(s) (1 or more)
Encoding
When encoded, a P-DATA-TF PDU has the following structure, taken from Table 9-22 1 (offsets shown with Python indexing). PDUs are always encoded using Big Endian 2.
Offset
Length
Description
0
1
PDU type
1
1
Reserved
2
4
PDU length
6
Variable
Presentation data value items
References
-
__init__
()¶ Initialise a new P-DATA-TF PDU.
Methods
__init__
()Initialise a new P-DATA-TF PDU.
decode
(bytestream)Decode bytestream and use the result to set the field values of the PDU.
encode
()Return the encoded PDU as bytes.
from_primitive
(primitive)Setup the current PDU using a P-DATA primitive.
Return a P-DATA primitive from the current PDU.
Attributes
Return the PDU Length field value as an int.
Return the PDU Type field value an int.
-
decode
(bytestream)¶ Decode bytestream and use the result to set the field values of the PDU.
- Parameters
bytestream (bytes) – The PDU data to be decoded.
-
encode
()¶ Return the encoded PDU as bytes.
- Returns
The encoded PDU.
- Return type
bytes
-
from_primitive
(primitive)¶ Setup the current PDU using a P-DATA primitive.
- Parameters
primitive (pdu_primitives.P_DATA) – The primitive to use to set the current PDU field values.
-
property
pdu_length
Return the PDU Length field value as an int.
-
property
pdu_type
Return the PDU Type field value an int.
-
to_primitive
()¶ Return a P-DATA primitive from the current PDU.
- Returns
The primitive representation of the current PDU.
- Return type
-