Skip to contentSkip to conversation

Heart Rate Profile API

PATCH In review Santiago Carot-Nemesio 4 participants 4 messages Mar 3, 2012 – Mar 5, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Heart Rate Profile API

---
 doc/heartrate-api.txt |   72 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 doc/heartrate-api.txt
doc/heartrate-api.txt new file +72 -0
new file mode 100644
index 0000000..5dcaa52
@@ -0,0 +1,72 @@
+BlueZ D-Bus Heart Rate API description
+****************************************
+
+	Santiago Carot-Nemesio <[email protected]>
+
+Heart Rate Profile hierarchy
+============================
+
+Service		org.bluez
+Interface	org.bluez.HeartRate
+Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
+
+Methods		dict GetProperties()
+
+			Returns all properties for the interface. See the
+			Properties section for the available properties.
+
+		RegisterWatcher(object agent)
+
+			Registers a watcher to monitor heart rate measurements.
+
+			Possible Errors: org.bluez.Error.InvalidArguments
+
+		UnregisterWatcher(object agent)
+
+			Unregisters a watcher.
+
+			Possible Errors: org.bluez.Error.InvalidArguments
+					org.bluez.Error.NotFound
+
+		Reset()
+
+			Restart the accumulation of energy expended from zero.
+
+			Possible Errors: org.bluez.Error.NotSupported
+
+Properties	boolean ResetSupported [readonly]
+
+			True if energy expended is supported.
+
+Heart Rate Watcher hierarchy
+============================
+Service		unique name
+Interface	org.bluez.HeartRateWatcher
+Object path	freely definable
+
+Methods		void MeasurementReceived(dict measure)
+
+			This callback is called whenever a heart rate measurement
+			is received from the heart rate device. The unit for the
+			Value is expressed in beats per minute (bpm). The energy
+			field is optional and represents the accumulated energy
+			expended in kilo Joules since last time it was reset.
+			Furthermore, the device will be automatically reset when
+			it is needed.
+			The Contact field, if present, indicates that the device
+			supports contact sensor, besides it will be true if skin
+			contact is detected. The optional interval field is an
+			array containing RR-Interval values which represent the
+			time between two R-Wave detections, where the RR-Interval
+			Value 0 is older than the Value 1 and so on.
+
+			Dict is defined as below:
+			{
+				"Value" : uint16,
+				"Energy" : uint16,
+				"Contact" : boolean,
+				"Location" : ("Other", "Chest", "Wrist","Finger",
+					"Hand", "Ear Lobe", "Foot"),
+				"Interval" : array{uint16}
+			}
+
Signature · 1 line
1.7.9.2
#1 lore raw

Hi Santiago.

Quoted 4 lines · Santiago Carot-Nemesio

---
 doc/heartrate-api.txt |   72 +++++++++++++++++++++++++++++++++++++++++++++++++

 1 file changed, 72 insertions(+)

 create mode 100644 doc/heartrate-api.txt

ack.

Regards,

Signature · 3 lines
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
#2 lore raw
In reply to Santiago Carot-Nemesio

Hi Santiago,

A couple of issues still:

doc/heartrate-api.txt line 4

Quoted 5 lines · Santiago Carot-Nemesio
doc/heartrate-api.txt new file +4 -0
@@ -0,0 +1,72 @@
+BlueZ D-Bus Heart Rate API description
+****************************************
+
+	Santiago Carot-Nemesio <[email protected]>

Is the above supposed to be a copyright statement? If so, fix it. (the documentation files need that anyway).

doc/heartrate-api.txt line 43

Quoted 3 lines
doc/heartrate-api.txt new file +3 -0
+Heart Rate Watcher hierarchy
+============================
+Service		unique name

Add an empty line after the header.

Quoted 18 lines
doc/heartrate-api.txt new file +18 -0
+Interface	org.bluez.HeartRateWatcher
+Object path	freely definable
+
+Methods		void MeasurementReceived(dict measure)
+
+			This callback is called whenever a heart rate measurement
+			is received from the heart rate device. The unit for the
+			Value is expressed in beats per minute (bpm). The energy
+			field is optional and represents the accumulated energy
+			expended in kilo Joules since last time it was reset.
+			Furthermore, the device will be automatically reset when
+			it is needed.
+			The Contact field, if present, indicates that the device
+			supports contact sensor, besides it will be true if skin
+			contact is detected. The optional interval field is an
+			array containing RR-Interval values which represent the
+			time between two R-Wave detections, where the RR-Interval
+			Value 0 is older than the Value 1 and so on.

doc/heartrate-api.txt line 71

Quoted 10 lines
doc/heartrate-api.txt new file +10 -0
+
+			Dict is defined as below:
+			{
+				"Value" : uint16,
+				"Energy" : uint16,
+				"Contact" : boolean,
+				"Location" : ("Other", "Chest", "Wrist","Finger",
+					"Hand", "Ear Lobe", "Foot"),
+				"Interval" : array{uint16}
+			}

Please reformat the above to be less than 80 characters wide. Right now some lines are either 80 or 81.

Johan

maintainer
#3 lore raw
In reply to Santiago Carot-Nemesio

Hi Santiago,

Quoted 69 lines
 doc/heartrate-api.txt |   72 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 doc/heartrate-api.txt
doc/heartrate-api.txt new file +59 -0
new file mode 100644
index 0000000..5dcaa52
@@ -0,0 +1,72 @@
+BlueZ D-Bus Heart Rate API description
+****************************************
+
+	Santiago Carot-Nemesio <[email protected]>
+
+Heart Rate Profile hierarchy
+============================
+
+Service		org.bluez
+Interface	org.bluez.HeartRate
+Object path	[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
+
+Methods		dict GetProperties()
+
+			Returns all properties for the interface. See the
+			Properties section for the available properties.
+
+		RegisterWatcher(object agent)
+
+			Registers a watcher to monitor heart rate measurements.
+
+			Possible Errors: org.bluez.Error.InvalidArguments
+
+		UnregisterWatcher(object agent)
+
+			Unregisters a watcher.
+
+			Possible Errors: org.bluez.Error.InvalidArguments
+					org.bluez.Error.NotFound
+
+		Reset()
+
+			Restart the accumulation of energy expended from zero.
+
+			Possible Errors: org.bluez.Error.NotSupported
+
+Properties	boolean ResetSupported [readonly]
+
+			True if energy expended is supported.
+
+Heart Rate Watcher hierarchy
+============================
+Service		unique name
+Interface	org.bluez.HeartRateWatcher
+Object path	freely definable
+
+Methods		void MeasurementReceived(dict measure)
+
+			This callback is called whenever a heart rate measurement
+			is received from the heart rate device. The unit for the
+			Value is expressed in beats per minute (bpm). The energy
+			field is optional and represents the accumulated energy
+			expended in kilo Joules since last time it was reset.
+			Furthermore, the device will be automatically reset when
+			it is needed.
+			The Contact field, if present, indicates that the device
+			supports contact sensor, besides it will be true if skin
+			contact is detected. The optional interval field is an
+			array containing RR-Interval values which represent the

doc/heartrate-api.txt line 69

Quoted 10 lines
doc/heartrate-api.txt new file +10 -0
+			time between two R-Wave detections, where the RR-Interval
+			Value 0 is older than the Value 1 and so on.
+
+			Dict is defined as below:
+			{
+				"Value" : uint16,
+				"Energy" : uint16,
+				"Contact" : boolean,
+				"Location" : ("Other", "Chest", "Wrist","Finger",
+					"Hand", "Ear Lobe", "Foot"),

values are lower-case and either one word or connected via -. Also I think it is earlobe and not ear lobe. Oxford dictionary please ;)

Regards

Marcel