pynetdicom.pdu.A_ABORT_RQ¶
-
class
pynetdicom.pdu.
A_ABORT_RQ
¶ An A-ABORT-RQ PDU.
An A-ABORT-RQ PDU is used to abort the association.
-
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 (0x07).
Type: int
-
reason_diagnostic
¶ The Reason/Diagnostic field value.
Type: int
-
source
¶ The Source field value.
Type: int
Notes
An A-ABORT-RQ PDU requires the following parameters:
- PDU type (1, fixed value, 0x06)
- PDU length (1, fixed value, 4)
- Source (1)
- Reason/Diagnostic (1)
Encoding
When encoded, an A-ABORT-RQ PDU has the following structure, taken from Table 9-26 [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 1 Reserved 7 1 Reserved 8 1 Source 9 1 Reason/Diagnostic References
[1] DICOM Standard, Part 8, Section 9.3.8 [2] DICOM Standard, Part 8, Section 9.3.1 -
__init__
()¶ Initialise a new A-ABORT-RQ PDU.
Methods
__init__
()Initialise a new A-ABORT-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-ABORT or A-P-ABORT primitive. to_primitive
()Return an A-ABORT or A-P-ABORT 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 an int. reason_str
Return a str description of the Reason/Diagnostic field value. source_str
Return a str description of the Source field value. -
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 an A-ABORT or A-P-ABORT primitive.
Parameters: primitive (pdu_primitives.A_ABORT or pdu_primitives.A_P_ABORT) – The primitive to use to set the current PDU field values.
-
pdu_length
Return the PDU Length field value as an int.
-
pdu_type
Return the PDU Type field value an int.
-
reason_str
¶ Return a str description of the Reason/Diagnostic field value.
-
source_str
¶ Return a str description of the Source field value.
-
to_primitive
()¶ Return an A-ABORT or A-P-ABORT primitive from the current PDU.
Returns: The primitive representation of the current PDU. Return type: pdu_primitives.A_ABORT or pdu_primitives.A_P_ABORT
-