Prefer evicting control functions that would lose address contention#685
Open
ad3154 wants to merge 1 commit into
Open
Prefer evicting control functions that would lose address contention#685ad3154 wants to merge 1 commit into
ad3154 wants to merge 1 commit into
Conversation
This change modifies the behavior of our address claiming process to more readily evict a control function on the bus from its address if our internal control function would win contention. Previously we were being "nice" and always finding an open address. Although our earlier behavior was supported by the "Build an address table" section of ISO 11783-5, This change will improve an internal control function's ability to be placed at a desired address. This flexibility is probably good, but if you have low quality J1939 devices that fail to properly do the address claim process, you might still want to avoid conflicting with them in your preferred address.
afeeac1 to
d781a7d
Compare
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.
Describe your changes
This change modifies the behavior of our address claiming process to more readily evict a control function on the bus from its address if our internal control function would win contention. Previously we were being "nice" and always finding an open address. Although our earlier behavior was supported by the "Build an address table" section of ISO 11783-5, This change will improve an internal control function's ability to be placed at a desired address. This flexibility is probably good, but if you have low quality J1939 devices that fail to properly do the address claim process, you might still want to avoid conflicting with them in your preferred address.
As always, you can pass the null address (or nothing) as your preferred address to just arbitrate an address, which is usually the most interoperable choice and "nicest" for others on the bus.
How has this been tested?
Added a bespoke unit test for this condition