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

Expose DisplayName to RequestValidator #134

Merged

Conversation

helynranta
Copy link
Contributor

We have a need to Validate incoming request to modbus server based on which IP address it is coming from. To do this I exposed DisplayName property of ModbusRequestHandler to user with RequestValidator. However, adding new parameter is breaking change. So I just ended up adding new args object for it, so next addition don't require changes for users of the library. There is already an issue here for similar need: #133

@Apollo3zehn Apollo3zehn added the v6 label Oct 10, 2024
@Apollo3zehn
Copy link
Owner

I like your solution. Only thing I would change is the name DisplayName to something like ConnectionName.

Could you please also update the documentation files doc/samples/modbus_validator.md and doc/index.md so the reflect you changes?

- Refactor RequestValidator to take Args object instead of list of parameters (breaking change!)
- Add ConnectionName as one of the parameters for user to validate
@helynranta helynranta force-pushed the feature/request-validator-args branch from ebd8bef to d0845f6 Compare October 11, 2024 05:52
@helynranta
Copy link
Contributor Author

I rename the variable to ConnectionName and updated the docs to reflect changes

@Apollo3zehn Apollo3zehn merged commit f962475 into Apollo3zehn:dev Oct 15, 2024
@Apollo3zehn
Copy link
Owner

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants