Skip to content

feat(s7commplus): add multi-write APIs - #819

Open
gijzelaerr wants to merge 2 commits into
masterfrom
feat/795-s7commplus-multi-write
Open

feat(s7commplus): add multi-write APIs#819
gijzelaerr wants to merge 2 commits into
masterfrom
feat/795-s7commplus-multi-write

Conversation

@gijzelaerr

@gijzelaerr gijzelaerr commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • add db_write_multi() to the synchronous and asynchronous S7CommPlus clients
  • add the requested write_multi() convenience alias
  • encode regular-session writes in one existing SET_MULTI_VARIABLES request
  • preserve V1-initial/substreamed compatibility by issuing one SET_VAR_SUBSTREAMED request per item
  • cover disconnected behavior, cross-DB sync/async integration, and the substreamed fallback

Verification

  • uv run --frozen pytest (1826 passed, 78 skipped)
  • uv run --frozen pre-commit run --all-files
  • uv build --no-sources

Fixes #795

@gijzelaerr

Copy link
Copy Markdown
Owner Author

@bvanelli I refreshed this branch onto current master, added coverage for the substreamed fallback, and requested your review.

Since you have both current V2 and legacy/session-key PLC coverage, could you also try one db_write_multi() round trip on each available protocol path? The useful result is simply the PLC model/protocol, whether all values were written, and whether a following read returns them; no raw capture is needed unless it fails.

pip install --upgrade "python-snap7 @ git+https://github.com/gijzelaerr/python-snap7.git@feat/795-s7commplus-multi-write"

The current head passes 1,826 tests, the complete pre-commit suite, and the package build.

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.

S7CommPlus multi-write (SetMultiVariables for data)

1 participant