pynetdicom.pdu_items.SOPClassCommonExtendedNegotiationSubItem

class pynetdicom.pdu_items.SOPClassCommonExtendedNegotiationSubItem[source]

A SOP Class Common Extended Negotiation Sub-item.

A SOP Class Common Extended Negotiation Sub-item allows Application Entities to exchange application information in a generic non-Service class specific form.

Notes

A SOP Class Common Extended Negotiation Sub-item requires the following parameters:

  • Item type (1, fixed, 0x57)

  • Sub-item version (1, fixed, 0x00)

  • Item length (1)

  • SOP class UID length (1)

  • SOP class UID (1)

  • Service class UID length (1)

  • Service class UID (1)

  • Related general SOP class identification length (1)

  • Related general SOP class identification sub fields (0 or more)

    • Related general SOP class UID length (1)

    • Related general SOP class UID (1)

Encoding

When encoded, a SOP Class Common Extended Negotiation Sub-item has the following structure, taken from Table D.3-12 (offsets shown with Python indexing). Items are always encoded using Big Endian. The SOP Class UID, Service Class UID and the UIDs in the Related General SOP Class Identification parameters are encoded as UIDs as per the rules in Part 5, Section 9.1 (ie NO trailing padding null byte).

Offset

Length

Description

0

1

Item type

1

1

Sub item version

2

2

Item length

4

2

SOP class UID length

6

Variable

SOP class UID

6 + SOP UID length

2

Service class UID length

8 + SOP UID length

Variable

Service class UID

8 + SOP UID length + Service UID length

2

Related general SOP class ID length

10 + SOP UID length + Service UID length

Variable

Related general SOP class ID

The Related General SOP Class Identification field is made up of a number of sub-fields with the following structure, taken from Table D.3-13.

Offset

Length

Description

0

2

Related general SOP class UID length

2

Variable

Related general SOP class UID

References

__init__() None[source]

Initialise a new Implementation Version Name Item.

Methods

__init__()

Initialise a new Implementation Version Name Item.

decode(bytestream)

Decode bytestream and use the result to set the field values of the PDU item.

encode()

Return the encoded PDU as bytes.

from_primitive(primitive)

Set the item's values using a SOP Class Common Extended Negotiation primitive.

to_primitive()

Return an SOP Class Common Extended Negotiation primitive from the current Item.

Attributes

item_length

Return the item's Item Length field value as int.

item_type

Return the item's Item Type field value as int.

related_general_sop_class_identification

Return the item's Related General SOP Class Identification field value.

related_general_sop_class_identification_length

Return the item's Related General SOP Class Identification Length field value.

service_class_uid

Return the item's Service Class UID field value.

service_class_uid_length

Return the item's Service Class UID Length field value.

sop_class_uid

Return the item's SOP Class UID field value.

sop_class_uid_length

Return the item's SOP Class UID Length field value.

from_primitive(primitive: SOPClassCommonExtendedNegotiation) None[source]

Set the item’s values using a SOP Class Common Extended Negotiation primitive.

Parameters:

primitive (pdu_primitives.SOPClassCommonExtendedNegotiation) – The primitive to use to set the Item’s field values.

property item_length: int

Return the item’s Item Length field value as int.

property related_general_sop_class_identification: List[UID]

Return the item’s Related General SOP Class Identification field value.

property related_general_sop_class_identification_length: int

Return the item’s Related General SOP Class Identification Length field value.

property service_class_uid: UID | None

Return the item’s Service Class UID field value.

property service_class_uid_length: int

Return the item’s Service Class UID Length field value.

property sop_class_uid: UID | None

Return the item’s SOP Class UID field value.

property sop_class_uid_length: int

Return the item’s SOP Class UID Length field value.

to_primitive() SOPClassCommonExtendedNegotiation[source]

Return an SOP Class Common Extended Negotiation primitive from the current Item.

Returns:

The primitive representation of the current Item.

Return type:

pdu_primitives.SOPClassCommonExtendedNegotiation