pynetdicom.pdu_primitives.SCP_SCU_RoleSelectionNegotiation¶
-
class
pynetdicom.pdu_primitives.
SCP_SCU_RoleSelectionNegotiation
¶ 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
DICOM Standard, Part 7, Annex D.3.3.4
-
__init__
() → None¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
()Initialize self.
Convert the primitive to a PDU item ready to be encoded
Attributes
Get or set the SCP Role.
Get or set the SCU Role.
Get or set the SOP Class UID.
-
from_primitive
() → pynetdicom.pdu_items.SCP_SCU_RoleSelectionSubItem¶ Convert the primitive to a PDU item ready to be encoded
- Returns
item
- Return type
- 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
¶ 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
¶ 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
¶ 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