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

Allow GattAttributes to have variable length #127

Merged
merged 3 commits into from
Dec 2, 2015

Conversation

andresag01
Copy link

Previously the concepts of initLength and lenth were clearly separated. However, this was at the cost of registering all characteristics in the SoftDevice as having variable length. Clearly, this is not the desired behaviour. Therefore, an additional field '_hasVariableLen' is added to the GattAttribute to address the problem. Also, the GattAttribute and GattCharacteristic constructors have been modified to take a boolean that sets '_hasVariableLen'.
@rgrover

@@ -311,6 +311,8 @@ class GattCharacteristic {
* The length in bytes of this characteristic's value.
* @param[in] maxLen
* The max length in bytes of this characteristic's value.
* @param[in] hasVariableLen
* Whether the attribute's value length changes overtime.
Copy link
Contributor

Choose a reason for hiding this comment

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

over time :)

Andres Amaya Garcia added 3 commits December 2, 2015 11:26
Previously the concepts of initLength and lenth were clearly separated.
However, this was at the cost of registering all characteristics in the
SoftDevice as having variable length. Clearly, this is not the desired
behaviour. Therefore, an additional field '_hasVariableLen' is added to the
GattAttribute to address the problem. Also, the GattAttribute and
GattCharacteristic constructors have been modified to take a boolean that
sets '_hasVariableLen'.
The following subclasses of GattCharacteristic now have fixed length by passing
false as the last parameter to the GattCharacteristic constructore:

* ReadOnlyGattCharacteristic
* WriteOnlyGattCharacteristic
* ReadWriteGattCharacteristic
* WriteOnlyArrayGattCharacteristic
* ReadOnlyArrayGattCharacteristic
* ReadWriteArrayGattCharacteristic
The following subclasses of GattCharacteristic are modified to have variable
size:

* WriteOnlyGattCharacteristic
* ReadWriteGattCharacteristic
* WriteOnlyArrayGattCharacteristic
* ReadWriteArrayGattCharacteristic
@andresag01
Copy link
Author

@rgrover: made changes according to comments

rgrover added a commit that referenced this pull request Dec 2, 2015
Allow GattAttributes to have variable length
@rgrover rgrover merged commit d71c316 into ARMmbed:develop Dec 2, 2015
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