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

Cordio: Pal Gap implementation #5313

Merged
merged 11 commits into from Jan 11, 2018

Conversation

Projects
None yet
8 participants
@pan-
Member

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-

This comment has been minimized.

Member

pan- commented Oct 12, 2017

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

@theotherjimmy

This comment has been minimized.

Contributor

theotherjimmy commented Oct 13, 2017

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

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

This comment has been minimized.

@scartmell-arm

scartmell-arm Oct 13, 2017

Contributor

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));
}

This comment has been minimized.

@pan-

pan- Oct 15, 2017

Member

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 pan-:ble-cordio-pal-gap branch 2 times, most recently Oct 15, 2017

@pan-

This comment has been minimized.

Member

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.

@adbridge adbridge added needs: CI and removed needs: work labels Oct 24, 2017

pan- added some commits Oct 11, 2017

BLE: Adaptation interface of the GAP layer.
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.
BLE: Generic Access Service Adaptation layer
Add an abstraction which manage the state of the GAP service exposed by the GATT server.
BLE: Add generic event filter.
This filter prevent events to be signaled multiple times to the upper layer. It
also signal events to a newly set event processor hook.
BLE: Event Queue interface at the pal level.
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.
BLE: Add generic GAP implementation.
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 pan-:ble-cordio-pal-gap branch to c8747aa Oct 31, 2017

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Nov 2, 2017

/morph build

@0xc0170

This comment has been minimized.

Member

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

This comment has been minimized.

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

This comment has been minimized.

@pan-

This comment has been minimized.

Member

pan- commented Nov 8, 2017

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

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@0xc0170

This comment has been minimized.

Member

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-

This comment has been minimized.

Member

pan- commented Jan 8, 2018

@0xc0170 Any update on this ?

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Jan 8, 2018

/morph build

@mbed-ci

This comment has been minimized.

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

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Jan 9, 2018

@cmonr cmonr merged commit dc87f0b into ARMmbed:master Jan 11, 2018

17 checks passed

AWS-CI uVisor Build & Test Verification build successful.
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Local events testing has passed
Details
travis-ci/littlefs Local littlefs testing has passed
Details
travis-ci/mbed2-ATMEL Local mbed2-ATMEL testing has passed
Details
travis-ci/mbed2-MAXIM Local mbed2-MAXIM testing has passed
Details
travis-ci/mbed2-NORDIC Local mbed2-NORDIC testing has passed
Details
travis-ci/mbed2-NUVOTON Local mbed2-NUVOTON testing has passed
Details
travis-ci/mbed2-NXP Local mbed2-NXP testing has passed
Details
travis-ci/mbed2-SILICON_LABS Local mbed2-SILICON_LABS testing has passed
Details
travis-ci/mbed2-STM Local mbed2-STM testing has passed
Details
travis-ci/tools Local tools testing has passed
Details

@cmonr cmonr removed the ready for merge label Jan 11, 2018

@pan- pan- deleted the pan-:ble-cordio-pal-gap branch Jul 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment