Skip to content

Document set_path_hash_mode / get_path_hash_mode in README - #103

Open
joeyleake wants to merge 1 commit into
meshcore-dev:mainfrom
joeyleake:docs/84-document-path-hash-mode
Open

Document set_path_hash_mode / get_path_hash_mode in README#103
joeyleake wants to merge 1 commit into
meshcore-dev:mainfrom
joeyleake:docs/84-document-path-hash-mode

Conversation

@joeyleake

Copy link
Copy Markdown

Fixes #84

Problem

set_path_hash_mode() and get_path_hash_mode() already existed in
src/meshcore/commands/device.py, but neither was listed in README.md's
command reference table, so there was no way to discover them short of
reading the source. The issue reporter assumed the functionality itself
was missing.

Fix

Added both to the Device Commands table under "Advanced Configuration",
next to the existing set_multi_acks entry. The description explains what
path hash mode actually controls — how many bytes of each hop's node ID
are stored per hop in advertised/logged paths (bytes per hop = mode + 1) —
based on the actual encoding logic in reader.py
(path_hash_mode = plen >> 6, path_byte_count = path_len * (path_hash_mode + 1)) and commands/base.py's encode_reply_path, not just
a restated stub.

No code changes — docs only.

Testing

Full suite: 179 passed, 2 failed (test_send_cmd,
test_advert_path_preserves_embedded_zero_bytes) — both pre-existing on a
clean main checkout, unrelated to this change.

Both commands already existed in commands/device.py but had no entry in
the README's command reference table, so users had no way to discover
them (reported as "missing"). Add rows under Advanced Configuration
explaining that mode controls how many bytes of each hop's node ID are
stored per hop in advertised/logged paths (bytes per hop = mode + 1),
matching the plen >> 6 / hash_mode + 1 logic in reader.py and
commands/base.py.

Fixes meshcore-dev#84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing path_hash_len command?

1 participant