Dimse.Association.Negotiation (Dimse v0.8.7)

Copy Markdown View Source

Presentation context negotiation logic.

When an A-ASSOCIATE-RQ arrives, the SCP must decide which presentation contexts to accept, reject, or accept with an alternative transfer syntax. This module implements the matching algorithm.

Result Codes (PS3.8 Section 9.3.3.2)

  • 0 — acceptance
  • 1 — user rejection
  • 2 — no reason (provider rejection)
  • 3 — abstract syntax not supported (provider rejection)
  • 4 — transfer syntaxes not supported (provider rejection)

Summary

Functions

Negotiates presentation contexts from an A-ASSOCIATE-RQ.

Functions

negotiate(proposed, supported_abstract_syntaxes, supported_transfer_syntaxes)

@spec negotiate(
  proposed :: [Dimse.Pdu.PresentationContext.t()],
  supported_abstract_syntaxes :: MapSet.t(String.t()),
  supported_transfer_syntaxes :: MapSet.t(String.t())
) ::
  {[Dimse.Pdu.PresentationContext.t()],
   %{required(pos_integer()) => {String.t(), String.t()}}}

Negotiates presentation contexts from an A-ASSOCIATE-RQ.

Returns presentation contexts with result codes for the A-ASSOCIATE-AC response, plus a map of %{context_id => {abstract_syntax, transfer_syntax}} for accepted contexts.