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
DICOM Standard, Part 7, Annex D.3.3.4
Methods
__init__
()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() SCP_SCU_RoleSelectionSubItem [source]¶
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