Skip to content

Add missing write_bool_input method to SafeBufferAccess#46

Merged
thiagoralves merged 1 commit into
developmentfrom
devin/1765313725-add-write-bool-input
Dec 9, 2025
Merged

Add missing write_bool_input method to SafeBufferAccess#46
thiagoralves merged 1 commit into
developmentfrom
devin/1765313725-add-write-bool-input

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Adds the missing write_bool_input method to the SafeBufferAccess class. This method was inadvertently omitted when the write_*_input methods were added in a previous commit, causing runtime errors when the Modbus master plugin attempts to write boolean values to PLC input buffers (e.g., %IX addresses).

Error being fixed:

(FAIL) Error in write_preconverted_iec_values: 'SafeBufferAccess' object has no attribute 'write_bool_input'

The new method follows the same pattern as write_bool_output and other write_*_input methods.

Review & Testing Checklist for Human

  • Verify the method signature matches the call site in modbus_master_memory.py (lines 270, 540) - expects (buffer_idx, bit_idx, value, thread_safe=False)
  • Test with a Modbus master configuration that writes to boolean input addresses (%IX) to confirm the error is resolved
  • Verify CI tests pass, particularly tests/pytest/modbus_master/test_modbus_slave_device.py which expects this method to exist

Recommended test plan: Deploy a runtime container built from this branch and run a PLC program that uses Modbus master to write to %IX addresses. The write_preconverted_iec_values error should no longer occur.

Notes

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@thiagoralves thiagoralves merged commit c7a23e2 into development Dec 9, 2025
1 check passed
@thiagoralves thiagoralves deleted the devin/1765313725-add-write-bool-input branch December 9, 2025 23:43
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.

1 participant