pynetdicom.presentation.negotiate_as_requestor¶
- 
pynetdicom.presentation.negotiate_as_requestor(rq_contexts, ac_contexts, roles=None)[source]¶
- Process the Presentation Contexts as an Association Requestor. - The Acceptor has processed the Requestor’s presentation context definition list and returned the results. We want to do two things: - Process the SCP/SCU Role Selection Negotiation items 
- Return a nice list of - PresentationContextwith the Results and original Abstract Syntax values to make things easier to use.
 - Presentation context ID 
- Abstract Syntax: one 
- Transfer syntax: one or more 
 - Presentation context ID 
- Result: one of - 0x00,- 0x01,- 0x02,- 0x03or- 0x04
- Transfer syntax: one, not to be tested if result is not - 0x00
 - Parameters
- rq_contexts (list of PresentationContext) – The Presentation Contexts sent to the peer as the A-ASSOCIATE’s Presentation Context Definition List. 
- ac_contexts (list of PresentationContext) – The Presentation Contexts return by the peer as the A-ASSOCIATE’s Presentation Context Definition Result List. 
- roles (dict or None) – If the Acceptor has included one or more SCP/SCU Role Selection Negotiation items then this will be a - dictof- {'SOP Class UID' : (SCU role, SCP role)}, otherwise- None(default)
 
- Returns
- The contexts in the returned Presentation Context Definition Result List, with added Abstract Syntax value. Items are sorted in increasing Context ID value and the SCP/SCU roles are set as per the negotiated outcome. 
- Return type
- list of PresentationContext