Complete 4.0 feature set: setters, array helpers, block transfer, CPU state#693
Merged
gijzelaerr merged 2 commits intomasterfrom Apr 15, 2026
Merged
Complete 4.0 feature set: setters, array helpers, block transfer, CPU state#693gijzelaerr merged 2 commits intomasterfrom
gijzelaerr merged 2 commits intomasterfrom
Conversation
Missing data type setters: - set_lint, set_ulint: 64-bit signed/unsigned integer - set_ltime: nanosecond timedelta (LTIME) - set_ltod: nanosecond time-of-day (LTOD) - set_ldt: nanosecond epoch datetime (LDT) - All exported from snap7.util and registered in SymbolTable dispatch Optimized SymbolTable.read_many(): - Now uses read_multi_vars for batched reads (via optimizer when enabled) instead of reading each tag individually - Falls back to single read for single-tag requests Array read/write helpers: - db_read_array(db, start, count, fmt): read N values using struct format - db_write_array(db, start, values, fmt): pack and write N values - Supports any struct format (REAL, INT, DINT, etc.) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
S7CommPlus operations (experimental): - get_cpu_state(): read CPU state via EXPLORE on CPU exec unit object - upload_block(block_type, block_number): read program block via GET_VAR_SUBSTREAMED, with legacy full_upload fallback - download_block(block_type, block_number, data): write program block via SET_VAR_SUBSTREAMED, with legacy download fallback All exposed through s7.Client with S7CommPlus/legacy fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Fills the remaining feature gaps for 4.0 completeness.
Missing data type setters:
set_lint,set_ulint,set_ltime,set_ltod,set_ldtsnap7.util, registered in SymbolTable dispatch maps_TYPE_SIZEOptimized
SymbolTable.read_many():read_multi_vars(using the optimizer when enabled) instead of reading one tag at a timeArray read/write helpers:
db_read_array(db, start, count, fmt)— read N values with struct formatdb_write_array(db, start, values, fmt)— pack and write N valuesclient.db_read_array(1, 0, 20, ">f")reads 20 REALsS7CommPlus operations (experimental):
get_cpu_state()— via EXPLORE on CPU exec unitupload_block(block_type, block_number)— via GET_VAR_SUBSTREAMED, legacy fallbackdownload_block(block_type, block_number, data)— via SET_VAR_SUBSTREAMED, legacy fallbackTest plan
🤖 Generated with Claude Code