Skip to content

Cordio: Pal Gap implementation #5313

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

Merged
merged 11 commits into from
Jan 11, 2018
Merged

Cordio: Pal Gap implementation #5313

merged 11 commits into from
Jan 11, 2018

Conversation

pan-
Copy link
Member

@pan- pan- commented Oct 12, 2017

Description

This PR replace the existing specific Gap implementation by the generic Gap implementation. The following pal implementations has been added for pal::Gap and pal::GenericAccessService.

The Gatt server function write and areUpdateEnabled has also been fixed, they where relying on the default gatt connection handle which is plainly incorrect in a multiple client context.

Status

READY

Migrations

NO

Related PRs

#5311

Note

Diff can be found here: https://github.com/pan-/mbed/compare/ble-generic-gap..pan-:ble-cordio-pal-gap

@pan-
Copy link
Member Author

pan- commented Oct 12, 2017

@marcbonnici @0xc0170 @scartmell-arm Could you review this PR ?

@theotherjimmy
Copy link
Contributor

@AnotherButler FYI huge bit of new docs in this PR.

* @return true if the inner value of lhs and rhs are not equal and false
* otherwise.
*/
friend bool operator!=(SafeEnum lhs, SafeEnum rhs) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comparison operators could be implemented in terms of each other so only == and < need to be maintained if anything changes.

friend bool operator!=(SafeEnum lhs, SafeEnum rhs) {
  return !(operator==(lhs, rhs));
}

Copy link
Member Author

@pan- pan- Oct 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed however it is not necessary to use the prefix notation to invoke the equal operator, the infix notation is fine (lhs == rhs).

@pan- pan- force-pushed the ble-cordio-pal-gap branch 2 times, most recently from 788c67f to e8e23e8 Compare October 15, 2017 16:34
@pan-
Copy link
Member Author

pan- commented Oct 16, 2017

@AnotherButler APIs in this PR are no meant to be publicly used. They are supposed to be used by partners which implement mbed BLE.

It would be a good thing to have the documentation of these APIs in a porting guide of the BLE platform abstraction layer however it would be terrible and counter productive to have references to these APIs in the documentation of the public API.

pan- added 9 commits October 31, 2017 17:32
This interface expose the primitives needed to realize operations defined in
the GAP layer. Data types, event and function definitions follow closely HCI
commands and events defined in the Bluetooth specification.
Add an abstraction which manage the state of the GAP service exposed by the GATT server.
This filter prevent events to be signaled multiple times to the upper layer. It
also signal events to a newly set event processor hook.
To help generic code, an interface of an event queue at the PAL level has been
added. Implementation can either rely on the event mechanism internal to the
stack or use the SimpleEventQueue implementation provided by this patch.
Generic implementation of the GAP class. It allows porters to have a working Gap
implementation by implementing the following abstraction layer primitives:
- pal::Gap: Adaptation for GAP related primitives.
- pal::EventQueue: simple interface to the inner event queue of the stack.
  pal::SimpleEventQueue can also be used as an implementation.
- pal::GenericAccessService: Accessors to the Generic Access Service present in
  the GATT server.
@pan- pan- force-pushed the ble-cordio-pal-gap branch from e8e23e8 to c8747aa Compare October 31, 2017 17:43
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2017

/morph build

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 2, 2017

@pan- This depend on #5311 as it states, is that correct? what order they should be integrated (it is a chain of patches).

@mbed-ci
Copy link

mbed-ci commented Nov 2, 2017

Build : SUCCESS

Build number : 410
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5313/

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci
Copy link

mbed-ci commented Nov 2, 2017

@pan-
Copy link
Member Author

pan- commented Nov 8, 2017

@0xc0170 Order: #5295 => #5296 => #5299 => #5300 => #5311 => #5313 . It is indicated in the Related PR section.

@mbed-ci
Copy link

mbed-ci commented Nov 8, 2017

Build : SUCCESS

Build number : 471
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5313/

Triggering tests

/morph test
/morph uvisor-test

@mbed-ci
Copy link

mbed-ci commented Nov 9, 2017

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 9, 2017

@0xc0170 Order: #5295 => #5296 => #5299 => #5300 => #5311 => #5313 . It is indicated in the Related PR section.

Thanks, will follow the order. The first should get in today, then the second one and so on.

@0xc0170 0xc0170 removed the needs: CI label Nov 9, 2017
@pan-
Copy link
Member Author

pan- commented Jan 8, 2018

@0xc0170 Any update on this ?

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 8, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jan 8, 2018

Build : SUCCESS

Build number : 818
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/5313/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Jan 8, 2018

@mbed-ci
Copy link

mbed-ci commented Jan 8, 2018

@cmonr cmonr merged commit dc87f0b into ARMmbed:master Jan 11, 2018
@pan- pan- deleted the ble-cordio-pal-gap branch July 3, 2018 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants