pynetdicom.pdu.A_RELEASE_RQ

class pynetdicom.pdu.A_RELEASE_RQ(primitive: A_RELEASE | None = None)[source]

An A-RELEASE-RQ PDU.

An A-RELEASE-RQ PDU is used once an association has been established to initiate the release of the association.

pdu_type

The PDU Type field value (0x05).

Type:

int

Notes

An A-RELEASE-RQ PDU requires the following parameters:

  • PDU type (1, fixed value, 0x05)

  • PDU length (1, fixed value, 4)

Encoding

When encoded, an A-RELEASE-RQ PDU has the following structure, taken from Table 9-24 (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

4

Reserved

References

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

Initialise a new A-RELEASE-RQ PDU.

Parameters:

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

Methods

__init__([primitive])

Initialise a new A-RELEASE-RQ 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 an A-RELEASE (request) primitive.

to_primitive()

Return an A-RELEASE (request) 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.

static from_primitive(primitive: A_RELEASE) None[source]

Setup the current PDU using an A-RELEASE (request) primitive.

Parameters:

primitive (pdu_primitives.A_RELEASE) – The primitive to use to set the current PDU field values.

property pdu_length: int

Return the PDU Length field value as an int.

static to_primitive() A_RELEASE[source]

Return an A-RELEASE (request) primitive from the current PDU.

Returns:

The primitive representation of the current PDU.

Return type:

pdu_primitives.A_RELEASE