This repository was archived by the owner on Feb 16, 2019. It is now read-only.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This pull request implements the RACP characteristic for the Glucose Profile. RACP is the record access control point, which the client will interact to query records.
The mapping of this characteristic can be found in https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.record_access_control_point.xml . We use it as a guide to do the serialization and deserialization.
The constructor for this characteristic take in a BluetoothGattCharacteristic object from the Android Bluetooth stack, parse and create a RACP object. This RACP object has all the deserialized data field available for the business application.
Different from other characteristics, the RACP not only does the reading (hence need parsing) from a remote device. It also do the writing to a remote device. As a result, we need to do serialization (composing). We implement a Composable interface, so that we can converted a RACP object into byte array that can be consumed by the Android Bluetooth.