Skip to content

Improve ble docs #5392

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 50 commits into from
Nov 16, 2017
Merged

Improve ble docs #5392

merged 50 commits into from
Nov 16, 2017

Conversation

pan-
Copy link
Member

@pan- pan- commented Oct 27, 2017

Description

Improve the content of the documentation of most BLE related items.
Elements related to the GattServer and the services have not been updated.

The declarations have been reformatted to be more in line with mbed OS guidelines.

Some elements marked has deprecated in their documentation have been annotated with the MBED_DEPRECATED to have the documentation and the code in line.

Status

READY

Migrations

NO

pan- and others added 24 commits October 27, 2017 12:11
- Improve detailed description of the class.
- Add undefined params tparams and return documentation.
- Add pre and postcondition when valuable.
- Put the elements of the file in the ble.common group.
- The class has been documented with a detailed example and explanation of its
responsabilities.
- Members have been reordered and regrouped logically.
- Deprecated annotation has been added to relevant members.
- BLE::BLE, BLE::waitForEvent has been deprecated to match with their existing
description.
@pan-
Copy link
Member Author

pan- commented Oct 27, 2017

@AnotherButler @marcbonnici Could you review the additions I made to the documentation ?

OnEventsToProcessCallback_t;

/**
* Register a callback called when the BLE stack has pending work.

Choose a reason for hiding this comment

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

Double space after pending.

*
* @return BLE_ERROR_NONE if the underlying stack and all other services of
* the BLE API were shutdown correctly.
* Call to this function is initiated by BLE::init, instanceID identify the

Choose a reason for hiding this comment

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

I think this could do with rewording slightly.
"Call to this function is initiated by.." -> "Calls to this function are initiated by.." or "A call to this function is initiated by.."

* Accessor to GattServer. This function is used by BLE::gattServer().
* Accessor to the vendor implementation of the Gap interface.
*
* @return A reference to a Gap object associated to this BLE instance.

Choose a reason for hiding this comment

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

This uses "this BLE instance" and all the following Doc Strings use "this BLEInstanceBase instance". Which one is correct?

* Return the instance of the vendor implementation of BLEInstanceBase.
*
* @important Contrary to its name, this function does not return a new instance
* at eachcall. It rather act like an accessor to a singleton.

Choose a reason for hiding this comment

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

"eachcall" -> "each call"

* A connection handle is an unsigned integer capable of holding a pointer.
* The real type (either a pointer to an object or an integer) is opaque and
* platform dependent.
* Opaque reference to a connection

Choose a reason for hiding this comment

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

Missing full stop

* - 128 bits UUIDs: Complete representation of an UUID. They are comonly used
* for user defined UUID.
*
* This class act as an addapter over these two kind of UUIDs to allow

Choose a reason for hiding this comment

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

"addapter" -> "adapter"

*/
static const unsigned MAX_UUID_STRING_LENGTH = LENGTH_OF_LONG_UUID * 2 + 4;

public:

/**
* Creates a new 128-bit UUID.
* construct a 128-bit UUID from a string.

Choose a reason for hiding this comment

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

"construct" -> "Construct"

* upto four of them. The UUID is stored internally as a 16 byte
* array, LSB (little endian), which is opposite from the string.
* @note Upper and lower case are supported.
* @note Hyphens are optional and the string must at most includes up to four

Choose a reason for hiding this comment

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

"the string must at most includes up to four of them" -> "the string must include at most four." ?

* different service or characteristics on the BLE device.
*
* @note We do not yet support 32-bit shortened UUIDs.
* @note User defined UUID are comonly named vendor-specific UUIDs accross

Choose a reason for hiding this comment

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

"comonly" -> "commonly"

*
* @return true if this != @p other, false otherwise.
* @return true if both UUIDs are equal and false otherwise.

Choose a reason for hiding this comment

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

Should be "if both UUIDs are not equal"

Fix typos, spelling and conjugation.
@pan- pan- force-pushed the improve-ble-docs branch from 119775e to 3c3592a Compare October 30, 2017 15:41
@pan-
Copy link
Member Author

pan- commented Oct 30, 2017

@marcbonnici Many thanks for the review, it helps a lot.

Amanda Butler added 14 commits November 7, 2017 16:20
Change passive to active voice.
Make minor copy edits, mostly for nonrestrictive clauses.
Make minor copy edits, mostly for active voice and comma use.
Copy edit, mostly for consistent punctuation.
Copy edit, mostly for consistent tense and consistent use of hyphens.
Make minor copy edits, mostly for consistent tense.
Make minor copy edits for active voice and phrasing.
Copy edit, mostly for consistent tense across documents.
Copy edit for active voice.
Copy edit, mostly for consistent tense and hyphenation.
Copy edit file.
Make copy edits to file.
@theotherjimmy
Copy link
Contributor

/morph build

@mbed-ci
Copy link

mbed-ci commented Nov 13, 2017

Build : SUCCESS

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

Triggering tests

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

@mbed-ci
Copy link

mbed-ci commented Nov 13, 2017

@mbed-ci
Copy link

mbed-ci commented Nov 13, 2017

@adbridge
Copy link
Contributor

This is dependent on #5060 scheduled for 5.7

@pan- pan- deleted the improve-ble-docs 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