-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[modbus] Export thing handler interface for upcoming bundles #4077
Conversation
Exporting the thing handler interface and the required other interfaces makes it possible to textend this binding by other bundles. Such an use case is when custom handlers are written to specific devices. Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
dfa3d25
to
67c70a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much. I was not aware of the current work on this. Thanks for the hint.
* @author Nagy Attila Gabor - Split the original ModbusBindingConstants in two | ||
*/ | ||
@NonNullByDefault | ||
public class ModbusBindingConstants { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we give this class (or the original ModbusBindingConstants class) a different name to make it clear for everyone that one of them is internal and the other one is public API? Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally agree, I just could not come up with a good name. As I can see this separation is fairly new, I would like to ask you guys to propose a naming convention here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Off-the-cuff: ModbusBindingConstants
and ModbusBindingConstantsInternal
. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, renamed the class
…ternal Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
a7fca49
to
91a43f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! |
…#4077) * [modbus] Export thing handler interface for upcoming bundles Exporting the thing handler interface and the required other interfaces makes it possible to textend this binding by other bundles. Such an use case is when custom handlers are written to specific devices. * [modbus] Renamed internal constants class to ModbusBindingConstantsInternal Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu> Signed-off-by: Pascal Larin <plarin@gmail.com>
…#4077) * [modbus] Export thing handler interface for upcoming bundles Exporting the thing handler interface and the required other interfaces makes it possible to textend this binding by other bundles. Such an use case is when custom handlers are written to specific devices. * [modbus] Renamed internal constants class to ModbusBindingConstantsInternal Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu>
…#4077) * [modbus] Export thing handler interface for upcoming bundles Exporting the thing handler interface and the required other interfaces makes it possible to textend this binding by other bundles. Such an use case is when custom handlers are written to specific devices. * [modbus] Renamed internal constants class to ModbusBindingConstantsInternal Signed-off-by: Nagy Attila Gabor <mrbig@sneaker.hu> Signed-off-by: Arjan Mels <arjan.mels@gmx.net>
This is a follow up to PR #4053
The modbus binding could easily be extended by other bundles to add device specific things and their handlers. There is already such a work in progress, see issue #3216
Fortunately @ssalonen did a nice work separating interfaces from actual implementations so exporting the base handler interfaces is quite straightforward.
This work is based on the zigbee and bluetooth package practices and work by @triller-telekom
I've split the ModbusBindingConstants class also in two: one that is public and could be used by other bundles and one that remains internal.