Skip to content

Add typed DB access methods#632

Merged
gijzelaerr merged 1 commit intomasterfrom
feature/typed-data-access
Mar 20, 2026
Merged

Add typed DB access methods#632
gijzelaerr merged 1 commit intomasterfrom
feature/typed-data-access

Conversation

@gijzelaerr
Copy link
Owner

Summary

  • Adds db_read_*/db_write_* convenience methods for common S7 data types
  • Supported types: bool, byte, int, uint, word, dint, udint, dword, real, lreal, string, wstring
  • Thin wrappers around db_read/db_write + existing util getters/setters
  • No breaking changes — all existing APIs unchanged

Closes #617

Test plan

  • 24 tests pass (tests/test_typed_access.py)
  • Roundtrip tests for all types
  • Edge cases (min/max values, bit preservation, negative numbers, empty strings)
  • mypy strict mode passes
  • ruff check/format passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Adds db_read_*/db_write_* convenience methods for bool, byte, int, uint,
word, dint, udint, dword, real, lreal, string, and wstring types.
Closes #617

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gijzelaerr gijzelaerr merged commit ab09964 into master Mar 20, 2026
37 checks passed
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.

Typed data access layer (high-level read/write API)

1 participant