Skip to contentSkip to conversation

Heart Rate Profile v.2

PATCH In review Santiago Carot-Nemesio 2 participants 4 messages Feb 20, 2012 – Feb 24, 2012 Bluetooth drivers

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Heart Rate Profile API

---
 doc/heartrate-api.txt |   70 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 70 insertions(+), 0 deletions(-)
 create mode 100644 doc/heartrate-api.txt
doc/heartrate-api.txt new file +70 -0
new file mode 100644
index 0000000..f90e90b
@@ -0,0 +1,70 @@
+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 Reset [readonly]
+
+			True if energy expended is supportted.
+
+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 resetted.
+			Furthermore, the device will be automatically resetted
+			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}
+			}
\ No newline at end of file
Signature · 1 line
1.7.9.1
#2 lore raw

Re: [PATCH] Heart Rate Profile API

Hi Santiago,

Just minor typos below. After they are fixed, I think it is okay to go upstream.

doc/heartrate-api.txt line 53

Quoted 8 lines · Santiago Carot-Nemesio
doc/heartrate-api.txt new file +8 -0
+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 resetted.
+                       Furthermore, the device will be automatically resetted

resetted -> reset (two occurrences)

Quoted 10 lines

+                       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:
+                       {

Quoted 8 lines

+                               "Value" : uint16,
+                               "Energy" : uint16,
+                               "Contact" : boolean,
+                               "Location" : ("Other", "Chest", "Wrist","Finger",
+                                       "Hand", "Ear Lobe", "Foot"),
+                               "Interval" : array{uint16}
+                       }
\ No newline at end of file

Remember to add the missing newline on the last line of the file (Vim adds this automatically, so it avoids "collateral" changes if we simple add the newline at the end of text files).

Best Regards,

Signature · 3 lines
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
#3 lore raw

Re: [PATCH] Heart Rate Profile API

Hi Anderson

2012/2/23 Anderson Lizardo <[email protected]>:

Quoted 36 lines

Hi Santiago,

Just minor typos below. After they are fixed, I think it is okay to go upstream.

doc/heartrate-api.txt line 53

Quoted 8 lines · Santiago Carot-Nemesio
doc/heartrate-api.txt new file +8 -0
+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 resetted.
+                       Furthermore, the device will be automatically resetted

resetted -> reset (two occurrences)

Quoted 10 lines

+                       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:
+                       {

Quoted 8 lines

+                               "Value" : uint16,
+                               "Energy" : uint16,
+                               "Contact" : boolean,
+                               "Location" : ("Other", "Chest", "Wrist","Finger",
+                                       "Hand", "Ear Lobe", "Foot"),
+                               "Interval" : array{uint16}
+                       }
\ No newline at end of file

Quoted 4 lines

Remember to add the missing newline on the last line of the file (Vim adds this automatically, so it avoids "collateral" changes if we simple add the newline at the end of text files).

It was an oversight. I'll send another patch fixing these issues. thanks.