pynetdicom.pdu.P_DATA_TF

class pynetdicom.pdu.P_DATA_TF(primitive: P_DATA | None = None)[source]

A P-DATA-TF PDU.

A P-DATA-TF PDU is used once an association has been established to send DIMSE message data.

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 (offsets shown with Python indexing). PDUs are always encoded using Big Endian.

Offset

Length

Description

0

1

PDU type

1

1

Reserved

2

4

PDU length

6

Variable

Presentation data value items

References

__init__(primitive: P_DATA | None = None) None[source]

Initialise a new P-DATA-TF PDU.

Parameters:

primitive (pynetdicom.pdu_primitive.P_DATA) – The primitive to use to initialise the PDU.

Methods

__init__([primitive])

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.

to_primitive()

Return a P-DATA primitive from the current PDU.

Attributes

pdu_length

Return the PDU Length field value as an int.

pdu_type

Return the PDU Type field value as int.

from_primitive(primitive: P_DATA) None[source]

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: int

Return the PDU Length field value as an int.

to_primitive() P_DATA[source]

Return a P-DATA primitive from the current PDU.

Returns:

The primitive representation of the current PDU.

Return type:

pdu_primitives.P_DATA