pynetdicom.pdu_primitives.SCP_SCU_RoleSelectionNegotiation

class pynetdicom.pdu_primitives.SCP_SCU_RoleSelectionNegotiation[source]

A representation of the SCP/SCU Role Selection Negotiation primitive.

Allows peer AEs to negotiate the roles in which they will serve for each SOP Class or Meta SOP Class supported on the association. This negotiation is optional.

The association Requestor may use one SCP/SCU Role Selection item for each SOP Class as identified by its corresponding Abstract Syntax Name and shall be one of three role values:

  • Requestor is SCU only

  • Requestor is SCP only

  • Requestor is both SCU/SCP

If the SCP/SCU Role Selection item is absent the default role for a Requestor is SCU and for an Acceptor is SCP.

Identical for both A-ASSOCIATE-RQ and A-ASSOCIATE-AC.

Examples

>>> from pynetdicom.pdu_primitives import SCP_SCU_RoleSelectionNegotiation
>>> item = SCP_SCU_RoleSelectionNegotiation()
>>> item.sop_class_uid = '1.2.840.10008.5.1.4.1.1.2'
>>> item.scu_role = True
>>> item.scp_role = False

References

__init__() None[source]

Methods

__init__()

from_primitive()

Convert the primitive to a PDU item ready to be encoded

Attributes

scp_role

Get or set the SCP Role.

scu_role

Get or set the SCU Role.

sop_class_uid

Get or set the SOP Class UID.

from_primitive() SCP_SCU_RoleSelectionSubItem[source]

Convert the primitive to a PDU item ready to be encoded

Returns:

item

Return type:

pdu_items.SCP_SCU_RoleSelectionSubItem

Raises:
  • ValueError – If no SOP Class UID, SCU Role or SCP Role is set

  • ValueError – If SCU Role and SCP Role are both False

property scp_role: bool | None

Get or set the SCP Role.

Parameters:

value (bool) – True if supported, False otherwise (default)

Raises:

TypeError – If value is not a bool

property scu_role: bool | None

Get or set the SCU Role.

Parameters:

value (bool) – True if supported, False otherwise

Raises:

TypeError – If value is not a bool

property sop_class_uid: UID | None

Get or set the SOP Class UID.

Parameters:

value (pydicom.uid.UID, bytes or str) – The corresponding Abstract Syntax UID

Raises:

TypeError – If value is not a pydicom.uid.UID, bytes or str