Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Modbus function 0x2B/0E Read DeviceIdentifiers, add get/set SlaveID, get/set ResponseTimeout, get . #185

Closed
wants to merge 7 commits into from

Conversation

rob040
Copy link

@rob040 rob040 commented Feb 20, 2023

Add method to change/request (get/set) the SlaveID.
Add method to change/request (get/set) the ResponseTimeout.
Add method to request the response size of data in the response buffer.
Add Modbus function 0x2B/0E Read DeviceIdentifiers ku8MBReadDeviceIdentifiers.

Description

Several issues multiple users reported about are resolved

Issues Resolved

#183 Changing Slave ID
#182 ReadHoldingRegisters takes 2seconds
#144 BUG REPORT: does not compile with -Werror=uninitialized due to bug in ModbusMaster::requestFrom(...) ==> requestFrom method has been removed.
#135 removed set slave id function
#124 Set own timeout?

Check List

General

  • Code follows coding style defined in STYLE.md
  • Doxygen comments are included inline with code
  • No unnecessary whitespace; check with git diff --check before committing.
    -> trailing whitespace removed as separate commit ac85132

The following have been modified to reflect new features, if warranted

  • README.md
  • keywords.txt (use tabs as whitespace separators)
  • library.properties
  • examples/ - update or create new ones, as warranted

The following have NOT been modified

  • doc/ - will be updated upon versioned release
  • .ruby-gemset
  • .ruby-version
  • CHANGELOG.md - will be updated upon versioned release (HISTORY.md is deprecated)
  • Gemfile
  • LICENSE
  • VERSION - will be updated upon versioned release

…extraneous whitespace, without any code change.
…eady marked to be eliminated, and its implementation was flawed.

Comment out unneeded private members txBuffer, rxBuffer.
Name the public member arguments; do not let the user guess which argument is what. Also do not require the user to consult the documentation.
Include the small inline functions into ModbusMaster.h; this also eliminates the compilation warning about defined but unused crc16_update().
Add Debug option, to allow to see what actually is send and received, and if some rubbish is received between transmit and receive, which would point to hardware related issues.
Add method to change/request (get/set) the ResponseTimeout.
Add method to request the response size of data in the response buffer.
Add Modbus function 0x2B/0E Read DeviceIdentifiers ku8MBReadDeviceIdentifiers.
… receive() has now been fixed. Apparently never tested.

This solves e15a1dc in a different, more robust way, by taking it out of the for loop and including the MaxBufferSize check.
Fix description of getResponseSize().
@rob040 rob040 closed this by deleting the head repository Sep 22, 2024
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