Restore the GattData::process public API #311
Merged
+51
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in the Embassy Matrix chat, having a public
GattData::process
API allows for "mixed-processing" scenarios, where the ATT PDUs are pulled using the "raw" ATTConnection
type - yet - some of those PDUs are delegated to (an) attribute server viaGattData::process
, while others are processed at the ATT PDU level.This is precisely what the Matter BTP implementation over trouble does here.
(This API was retired by GIT commit cb8985e#diff-27c58f7be9fbba9f7582453b30b6cde8d67e41414fe9004daea290d4c87da375 and I'm just restoring it here, except based on
DynamicAttributeServer
now, as that's what the newGattConnection
has and needs.)===
Additionally, I've addressed two hygienic issues in the
#[gatt_server]
proc-macro, where an unqualifiedError
type was used which was clashing with whatever the user had imported in terms ofError
and which furthermore required the user to explicitly importtrouble_host::Error
which is NOK.===
Will un-draft once I test it a bit and confirm it works.