[ul] Implement generic Extended Negotiation#734
Open
pgimeno4d wants to merge 3 commits intoEnet4:masterfrom
Open
[ul] Implement generic Extended Negotiation#734pgimeno4d wants to merge 3 commits intoEnet4:masterfrom
pgimeno4d wants to merge 3 commits intoEnet4:masterfrom
Conversation
9cd9c0a to
c9ad719
Compare
(Clippy nitpicking)
For the Storage SOP Classes used with C-STORE (PS3.4 B.3.1.1 and B.3.1.2), bytes can have values other than 0 or 1, so the sentence was wrong.
Contributor
Author
|
Rebased on top of #727 so that it can be properly tested with that change applied. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
Negotiationtrait which contains, for the moment, theextended_negotiationmethod. In future it can also help implement Role Selection negotiation (#731) and possibly other currently unimplemented features like Common Extended Negotiation. Note I'm also interested in #731 and will probably submit a patch if this one is merged, as it will depend on said trait.This is a case where the client and the server differ substantially. The
Negotiationtrait is only for the server; the client just adds pairs SOP Class / Byte array. After the association succeeds, they both have the same set of pairs, which they can look up to determine which extended options are active, through the new methodextended_negotiation_for(sop_class_uid: &str)or by walking theuser_variables().Everything is quite low-level, to cover for all current and hopefully future versions of the standard. It's easy to send invalid bytes, for instance.
I'm not quite sure if this is a breaking change. It did not break anything in our application, which is a server. The addition of a new generic concerned me a bit.
Edit: Forgot to mention, this obviously depends on #727, otherwise the bytestream is not correct.