Skip to content

Prefer evicting control functions that would lose address contention#685

Open
ad3154 wants to merge 1 commit into
mainfrom
adrian/more-evictions
Open

Prefer evicting control functions that would lose address contention#685
ad3154 wants to merge 1 commit into
mainfrom
adrian/more-evictions

Conversation

@ad3154
Copy link
Copy Markdown
Member

@ad3154 ad3154 commented Apr 22, 2026

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

@ad3154 ad3154 requested review from GwnDaan and martonmiklos April 22, 2026 23:51
@ad3154 ad3154 self-assigned this Apr 22, 2026
@ad3154 ad3154 added the iso: network managment Related to the ISO-11783:5 standard label Apr 22, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

iso: network managment Related to the ISO-11783:5 standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant