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

refactor: Consolidate attribute get code into NimBLERemoteGattUtils #293

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

thekurtovic
Copy link
Collaborator

No description provided.

@thekurtovic
Copy link
Collaborator Author

thekurtovic commented Jan 16, 2025

Basically includes the 3 refactors with slight changes to make the generic call work.
I wanted to move the code out of the header and use explicit template instantiation but haven't had any luck so far.
Testing this right now, so far not good.
Tested, can confirm it works.

@h2zero
Copy link
Owner

h2zero commented Jan 17, 2025

I need some time to test/review this further but it looks great so far.

@h2zero
Copy link
Owner

h2zero commented Jan 18, 2025

I think we should move this outside of NimBLEUtils because this code should either belong to the client class or it's own remote attribute class so that it can be excluded when CONFIG_BT_NIMBLE_ROLE_CENTRAL is not defined.

@thekurtovic
Copy link
Collaborator Author

I originally had the code like this, and had the template function in NimBLESomething.
class NimBLEAttribute : public NimBLESomething
class NimBLEClient : public NimBLESomething

Would that work? Can you can suggest a suitable name?

@h2zero
Copy link
Owner

h2zero commented Jan 19, 2025

Instead of inheriting I think we should just add it to a header file NimBLERemoteGattUtils.h

@h2zero
Copy link
Owner

h2zero commented Jan 21, 2025

The P4 build errors are not caused by this PR, upstream issue. Please add fail-fast: false here:

@thekurtovic thekurtovic changed the title refactor: Consolidate attribute get code into NimBLEUtils refactor: Consolidate attribute get code into NimBLERemoteGattUtils Jan 26, 2025
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.

2 participants