Health Thermometer Profile API
RFC 1/1 Health Thermometer Profile API
--- doc/thermometer.txt | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 doc/thermometer.txt
doc/thermometer.txt new file +125 -0
@@ -0,0 +1,125 @@ +BlueZ D-Bus Thermomether API description +**************************************** + + Santiago Carot-Nemesio <[email protected]> + +Health Thermomether Profile hierarchy +===================================== + +Service org.bluez +Interface org.bluez.Thermometer +Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + + +Methods void SetProperty(string name, variant value) + + Changes the value of the specified property. Only + read-write properties can be changed. On success + this will emit a PropertyChanged signal. + + Possible Errors: org.bluez.Error.InvalidArguments + + dict GetProperties() + + Returns all properties for the interface. See the + Properties section for the available properties. + + RegisterThermometerWatcher(object agent) + + Registers a watcher to monitor scanned measures.The agent + will be notified about final. + + Possible Errors: org.bluez.Error.InvalidArguments + + UnregisterThermometerWatcher(object agent) + + Unregisters a watcher. + + Final and intermediate temperatures won't be notified to + this agent any more. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + + EnableIntermediateMeasures(object agent) + + Enables intermediate measure notifications for this agent + if the thermometer supports it. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + + DisableIntermediateMeasures(object agent) + + Disables intermediate measure notifications for this + agent. It will disable notifications in the thermometer + when the last agent removes the watcher for intermediate + measures. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + +Signals PropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + +Properties boolean Intermediate [readonly] + + True if the thermometer supports intermediate measure + notifications. + + uint16 Interval (optional) [readwrite] + + The Measurement Interval defines the time (in seconds) + between measurements. This interval is not related to + the intermediates measures and must be defined into + a valid range. Setting it to zero meaning that no + periodic measurements will be taken. + + uint16 Minimum (optional) [readonly] + + Defines the maximum value allowed for the interval + between periodic measurements. + + uint16 Maximum (optional) [readonly] + + Defines the minimuum value allowed for the interval + between periodic measurements. + + +Health Thermometer Watcher hierarchy +==================================== +Service unique name +Interface org.bluez.ThermometerWatcher +Object path freely definable + +Methods void MeasureReceived(dict measure) + + This callback gets called when a measure has been + scanned in the thermometer. The Time entry in the dict + will be only present if the device supports storing of + data. The time value is expressed in seconds since epoch. + The value represented is (mantissa) x (10**exponent) + See foot note for special values when treating with + health devices. + + Dict is defined as below: + { + "Exponent" : int8, + "Mantissa" : int32, + "Unit" : ("Celsius" or "Fahrenheit"), + "Time" : uint64, + "Type" : ("Armpit", "Body", "Ear", "Finger", + "Intestines", "Mouth", "Rectum", "Toe", + "Tympanum"), + "Measurement" : ("Final" or "Intermediate"), + } + + For special cases, the exponent shall always be zero and + the mantissa should be one of following values: + + NRes = -(2**23) + NaN = +(2**23-1) + INFINITY = (2**23-2) + -INFINITY = -(2**23-2)
Signature · 1 line
1.7.5.2
Hi Santiago,
doc/thermometer.txt line 1
Quoted 12 lines · Santiago Carot-Nemesio
---
doc/thermometer.txt | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++1 files changed, 125 insertions(+), 0 deletions(-)create mode 100644
doc/thermometer.txtdoc/thermometer.txt new file +1
-0@@ -0,0 +1,125 @@ +BlueZ D-Bus Thermomether API description
Typo: Thermomether -> Thermometer
doc/thermometer.txt line 7
Quoted 6 lines
doc/thermometer.txt new file +6
-0+**************************************** + + Santiago Carot-Nemesio <[email protected]> + +Health Thermomether Profile hierarchy +=====================================
Typo: Thermomether -> Thermometer
Quoted 12 lines
doc/thermometer.txt new file +12
-0+ +Service org.bluez +Interface org.bluez.Thermometer +Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + + +Methods void SetProperty(string name, variant value) + + Changes the value of the specified property. Only + read-write properties can be changed. On success + this will emit a PropertyChanged signal. +
doc/thermometer.txt line 29
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ Possible Errors: org.bluez.Error.InvalidArguments + + dict GetProperties() + + Returns all properties for the interface. See the + Properties section for the available properties. + + RegisterThermometerWatcher(object agent) + + Registers a watcher to monitor scanned measures.The agent
Typo: measures -> measurements
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ will be notified about final. + + Possible Errors: org.bluez.Error.InvalidArguments + + UnregisterThermometerWatcher(object agent) + + Unregisters a watcher.
doc/thermometer.txt line 46
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ + Final and intermediate temperatures won't be notified to + this agent any more. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + + EnableIntermediateMeasures(object agent) + + Enables intermediate measure notifications for this agent
Typo: measure -> measurement
doc/thermometer.txt line 52
Quoted 6 lines
doc/thermometer.txt new file +6
-0+ if the thermometer supports it. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + + DisableIntermediateMeasures(object agent)
What about a second argument to RegisterThermometerWatcher() that enables/disables intermediate measurements ?
doc/thermometer.txt line 54
Quoted 2 lines
doc/thermometer.txt new file +2
-0+ + Disables intermediate measure notifications for this
Typo: measure -> measurement
doc/thermometer.txt line 57
Quoted 3 lines
doc/thermometer.txt new file +3
-0+ agent. It will disable notifications in the thermometer + when the last agent removes the watcher for intermediate + measures.
Typo: measures -> measurements
doc/thermometer.txt line 69
Quoted 12 lines
doc/thermometer.txt new file +12
-0+ + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + +Signals PropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + +Properties boolean Intermediate [readonly] + + True if the thermometer supports intermediate measure
Typo: measure -> measurement
doc/thermometer.txt line 76
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ notifications. + + uint16 Interval (optional) [readwrite] + + The Measurement Interval defines the time (in seconds) + between measurements. This interval is not related to + the intermediates measures and must be defined into
Typo: intermediates -> intermediate
Typo: measures -> measurements
doc/thermometer.txt line 77
Quoted 1 line
doc/thermometer.txt new file +1
-0+ a valid range. Setting it to zero meaning that no
Typo: meaning -> means
doc/thermometer.txt line 80
Quoted 3 lines
doc/thermometer.txt new file +3
-0+ periodic measurements will be taken. + + uint16 Minimum (optional) [readonly]
This is inverted with Maximum.
doc/thermometer.txt line 87
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ + Defines the maximum value allowed for the interval + between periodic measurements. + + uint16 Maximum (optional) [readonly] + + Defines the minimuum value allowed for the interval
Typo: minimuum -> minimum
doc/thermometer.txt line 97
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ between periodic measurements. + + +Health Thermometer Watcher hierarchy +==================================== +Service unique name +Interface org.bluez.ThermometerWatcher +Object path freely definable + +Methods void MeasureReceived(dict measure)
typo (measure vs. measurement)
doc/thermometer.txt line 105
Quoted 8 lines
doc/thermometer.txt new file +8
-0+ + This callback gets called when a measure has been + scanned in the thermometer. The Time entry in the dict + will be only present if the device supports storing of + data. The time value is expressed in seconds since epoch. + The value represented is (mantissa) x (10**exponent) + See foot note for special values when treating with + health devices.
IIRC, the "Type" value is also optional.
Quoted 23 lines
doc/thermometer.txt new file +20
-1+ + Dict is defined as below: + { + "Exponent" : int8, + "Mantissa" : int32, + "Unit" : ("Celsius" or "Fahrenheit"), + "Time" : uint64, + "Type" : ("Armpit", "Body", "Ear", "Finger", + "Intestines", "Mouth", "Rectum", "Toe", + "Tympanum"), + "Measurement" : ("Final" or "Intermediate"), + } + + For special cases, the exponent shall always be zero and + the mantissa should be one of following values: + + NRes = -(2**23) + NaN = +(2**23-1) + INFINITY = (2**23-2) + -INFINITY = -(2**23-2) --1.7.5.2
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Regards,
Signature · 3 lines
Anderson Lizardo Instituto Nokia de Tecnologia - INdT Manaus - Brazil
Hello,
2011/6/28 Anderson Lizardo <[email protected]>:
Quoted 73 lines
Hi Santiago,
doc/thermometer.txt line 1
Quoted 12 lines · Santiago Carot-Nemesio
---
doc/thermometer.txt | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++1 files changed, 125 insertions(+), 0 deletions(-)create mode 100644
doc/thermometer.txtdoc/thermometer.txt new file +1
-0@@ -0,0 +1,125 @@ +BlueZ D-Bus Thermomether API descriptionTypo: Thermomether -> Thermometer
doc/thermometer.txt line 7
Quoted 6 lines
doc/thermometer.txt new file +6
-0+**************************************** + + Santiago Carot-Nemesio <[email protected]> + +Health Thermomether Profile hierarchy +=====================================Typo: Thermomether -> Thermometer
Quoted 12 lines
doc/thermometer.txt new file +12
-0+ +Service org.bluez +Interface org.bluez.Thermometer +Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + + +Methods void SetProperty(string name, variant value) + + Changes the value of the specified property. Only + read-write properties can be changed. On success + this will emit a PropertyChanged signal. +doc/thermometer.txt line 29
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ Possible Errors: org.bluez.Error.InvalidArguments + + dict GetProperties() + + Returns all properties for the interface. See the + Properties section for the available properties. + + RegisterThermometerWatcher(object agent) + + Registers a watcher to monitor scanned measures.The agentTypo: measures -> measurements
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ will be notified about final. + + Possible Errors: org.bluez.Error.InvalidArguments + + UnregisterThermometerWatcher(object agent) + + Unregisters a watcher.doc/thermometer.txt line 46
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ + Final and intermediate temperatures won't be notified to + this agent any more. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + + EnableIntermediateMeasures(object agent) + + Enables intermediate measure notifications for this agentTypo: measure -> measurement
Quoted 9 lines
doc/thermometer.txt line 52
Quoted 6 lines
doc/thermometer.txt new file +6
-0+ if the thermometer supports it. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + + DisableIntermediateMeasures(object agent)What about a second argument to
RegisterThermometerWatcher()that enables/disables intermediate measurements ?
The idea is that applications can enable/disable intermediate measurement notifications without have to unregister from the thermometer service. If we use only a method for that purpose we are forcing to applications to register and unregister themself from the service even if they only want to disable this feature but remain receiving final measures.
In any case comments about it are welcome.
Quoted 118 lines
doc/thermometer.txt line 54
Quoted 3 lines
doc/thermometer.txt new file +2
-0+ + Disables intermediate measure notifications for thisTypo: measure -> measurement
doc/thermometer.txt line 57
Quoted 3 lines
doc/thermometer.txt new file +3
-0+ agent. It will disable notifications in the thermometer + when the last agent removes the watcher for intermediate + measures.Typo: measures -> measurements
doc/thermometer.txt line 69
Quoted 12 lines
doc/thermometer.txt new file +12
-0+ + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + +Signals PropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + +Properties boolean Intermediate [readonly] + + True if the thermometer supports intermediate measureTypo: measure -> measurement
doc/thermometer.txt line 76
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ notifications. + + uint16 Interval (optional) [readwrite] + + The Measurement Interval defines the time (in seconds) + between measurements. This interval is not related to + the intermediates measures and must be defined intoTypo: intermediates -> intermediate
Typo: measures -> measurementsdoc/thermometer.txt line 77
Quoted 1 line
doc/thermometer.txt new file +1
-0+ a valid range. Setting it to zero meaning that noTypo: meaning -> means
doc/thermometer.txt line 80
Quoted 3 lines
doc/thermometer.txt new file +3
-0+ periodic measurements will be taken. + + uint16 Minimum (optional) [readonly]This is inverted with Maximum.
doc/thermometer.txt line 87
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ + Defines the maximum value allowed for the interval + between periodic measurements. + + uint16 Maximum (optional) [readonly] + + Defines the minimuum value allowed for the intervalTypo: minimuum -> minimum
doc/thermometer.txt line 97
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ between periodic measurements. + + +Health Thermometer Watcher hierarchy +==================================== +Service unique name +Interface org.bluez.ThermometerWatcher +Object path freely definable + +Methods void MeasureReceived(dict measure)typo (measure vs. measurement)
doc/thermometer.txt line 105
Quoted 8 lines
doc/thermometer.txt new file +8
-0+ + This callback gets called when a measure has been + scanned in the thermometer. The Time entry in the dict + will be only present if the device supports storing of + data. The time value is expressed in seconds since epoch. + The value represented is (mantissa) x (10**exponent) + See foot note for special values when treating with + health devices.IIRC, the "Type" value is also optional.
Quoted 23 lines
doc/thermometer.txt new file +20
-1+ + Dict is defined as below: + { + "Exponent" : int8, + "Mantissa" : int32, + "Unit" : ("Celsius" or "Fahrenheit"), + "Time" : uint64, + "Type" : ("Armpit", "Body", "Ear", "Finger", + "Intestines", "Mouth", "Rectum", "Toe", + "Tympanum"), + "Measurement" : ("Final" or "Intermediate"), + } + + For special cases, the exponent shall always be zero and + the mantissa should be one of following values: + + NRes = -(2**23) + NaN = +(2**23-1) + INFINITY = (2**23-2) + -INFINITY = -(2**23-2) --1.7.5.2
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlRegards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
Quoted 139 lines · Santiago Carot-Nemesio
---
doc/thermometer.txt | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++1 files changed, 125 insertions(+), 0 deletions(-)create mode 100644
doc/thermometer.txtdoc/thermometer.txt new file +125
-1@@ -0,0 +1,125 @@ +BlueZ D-Bus Thermomether API description +**************************************** + + Santiago Carot-Nemesio <[email protected]> + +Health Thermomether Profile hierarchy +===================================== + +Service org.bluez +Interface org.bluez.Thermometer +Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + + +Methods void SetProperty(string name, variant value) + + Changes the value of the specified property. Only + read-write properties can be changed. On success + this will emit a PropertyChanged signal. + + Possible Errors: org.bluez.Error.InvalidArguments + + dict GetProperties() + + Returns all properties for the interface. See the + Properties section for the available properties. + + RegisterThermometerWatcher(object agent) + + Registers a watcher to monitor scanned measures.The agent + will be notified about final. + + Possible Errors: org.bluez.Error.InvalidArguments + + UnregisterThermometerWatcher(object agent) + + Unregisters a watcher. + + Final and intermediate temperatures won't be notified to + this agent any more. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + + EnableIntermediateMeasures(object agent) + + Enables intermediate measure notifications for this agent + if the thermometer supports it. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + + DisableIntermediateMeasures(object agent) + + Disables intermediate measure notifications for this + agent. It will disable notifications in the thermometer + when the last agent removes the watcher for intermediate + measures. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + +Signals PropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + +Properties boolean Intermediate [readonly] + + True if the thermometer supports intermediate measure + notifications. + + uint16 Interval (optional) [readwrite] + + The Measurement Interval defines the time (in seconds) + between measurements. This interval is not related to + the intermediates measures and must be defined into + a valid range. Setting it to zero meaning that no + periodic measurements will be taken. + + uint16 Minimum (optional) [readonly] + + Defines the maximum value allowed for the interval + between periodic measurements. + + uint16 Maximum (optional) [readonly] + + Defines the minimuum value allowed for the interval + between periodic measurements. + + +Health Thermometer Watcher hierarchy +==================================== +Service unique name +Interface org.bluez.ThermometerWatcher +Object path freely definable + +Methods void MeasureReceived(dict measure) + + This callback gets called when a measure has been + scanned in the thermometer. The Time entry in the dict + will be only present if the device supports storing of + data. The time value is expressed in seconds since epoch. + The value represented is (mantissa) x (10**exponent) + See foot note for special values when treating with + health devices. + + Dict is defined as below: + { + "Exponent" : int8, + "Mantissa" : int32, + "Unit" : ("Celsius" or "Fahrenheit"), + "Time" : uint64, + "Type" : ("Armpit", "Body", "Ear", "Finger", + "Intestines", "Mouth", "Rectum", "Toe", + "Tympanum"), + "Measurement" : ("Final" or "Intermediate"), + } + + For special cases, the exponent shall always be zero and + the mantissa should be one of following values: + + NRes = -(2**23) + NaN = +(2**23-1) + INFINITY = (2**23-2) + -INFINITY = -(2**23-2) --1.7.5.2
Quoted 1 line
--
Is this proposal going to use reference count for property setting of notification/indication? and if one of the applications enables immediate alert notification, then all other applications will receive the notification even if they have not registered it?
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi mike,
2011/6/28 mike tsai <[email protected]>:
Quoted 141 lines
Quoted 139 lines · Santiago Carot-Nemesio
---
doc/thermometer.txt | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++1 files changed, 125 insertions(+), 0 deletions(-)create mode 100644
doc/thermometer.txtdoc/thermometer.txt new file +125
-1@@ -0,0 +1,125 @@ +BlueZ D-Bus Thermomether API description +**************************************** + + Santiago Carot-Nemesio <[email protected]> + +Health Thermomether Profile hierarchy +===================================== + +Service org.bluez +Interface org.bluez.Thermometer +Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + + +Methods void SetProperty(string name, variant value) + + Changes the value of the specified property. Only + read-write properties can be changed. On success + this will emit a PropertyChanged signal. + + Possible Errors: org.bluez.Error.InvalidArguments + + dict GetProperties() + + Returns all properties for the interface. See the + Properties section for the available properties. + + RegisterThermometerWatcher(object agent) + + Registers a watcher to monitor scanned measures.The agent + will be notified about final. + + Possible Errors: org.bluez.Error.InvalidArguments + + UnregisterThermometerWatcher(object agent) + + Unregisters a watcher. + + Final and intermediate temperatures won't be notified to + this agent any more. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + + EnableIntermediateMeasures(object agent) + + Enables intermediate measure notifications for this agent + if the thermometer supports it. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + + DisableIntermediateMeasures(object agent) + + Disables intermediate measure notifications for this + agent. It will disable notifications in the thermometer + when the last agent removes the watcher for intermediate + measures. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + +Signals PropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + +Properties boolean Intermediate [readonly] + + True if the thermometer supports intermediate measure + notifications. + + uint16 Interval (optional) [readwrite] + + The Measurement Interval defines the time (in seconds) + between measurements. This interval is not related to + the intermediates measures and must be defined into + a valid range. Setting it to zero meaning that no + periodic measurements will be taken. + + uint16 Minimum (optional) [readonly] + + Defines the maximum value allowed for the interval + between periodic measurements. + + uint16 Maximum (optional) [readonly] + + Defines the minimuum value allowed for the interval + between periodic measurements. + + +Health Thermometer Watcher hierarchy +==================================== +Service unique name +Interface org.bluez.ThermometerWatcher +Object path freely definable + +Methods void MeasureReceived(dict measure) + + This callback gets called when a measure has been + scanned in the thermometer. The Time entry in the dict + will be only present if the device supports storing of + data. The time value is expressed in seconds since epoch. + The value represented is (mantissa) x (10**exponent) + See foot note for special values when treating with + health devices. + + Dict is defined as below: + { + "Exponent" : int8, + "Mantissa" : int32, + "Unit" : ("Celsius" or "Fahrenheit"), + "Time" : uint64, + "Type" : ("Armpit", "Body", "Ear", "Finger", + "Intestines", "Mouth", "Rectum", "Toe", + "Tympanum"), + "Measurement" : ("Final" or "Intermediate"), + } + + For special cases, the exponent shall always be zero and + the mantissa should be one of following values: + + NRes = -(2**23) + NaN = +(2**23-1) + INFINITY = (2**23-2) + -INFINITY = -(2**23-2) --1.7.5.2
Quoted 6 lines
Quoted 1 line
--
Is this proposal going to use reference count for property setting of notification/indication? and if one of the applications enables immediate alert notification, then all other applications will receive the notification even if they have not registered it?
Yes, the idea is just the same as suggested by Anderson. We will use a reference counter to enable/disable indications and notification. Applications won't manage characteristics and properties directly, the plugin will do it based on the number of watchers subscribed.
With respect to second question, no, only agents which enable intermediate notifications will be notified. Rest of agents only will be notified about final measures.
Regards.
Hi Anderson,
2011/6/28 Anderson Lizardo <[email protected]>:
Quoted 187 lines
Hi Santiago,
doc/thermometer.txt line 1
Quoted 12 lines · Santiago Carot-Nemesio
---
doc/thermometer.txt | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++1 files changed, 125 insertions(+), 0 deletions(-)create mode 100644
doc/thermometer.txtdoc/thermometer.txt new file +1
-0@@ -0,0 +1,125 @@ +BlueZ D-Bus Thermomether API descriptionTypo: Thermomether -> Thermometer
doc/thermometer.txt line 7
Quoted 6 lines
doc/thermometer.txt new file +6
-0+**************************************** + + Santiago Carot-Nemesio <[email protected]> + +Health Thermomether Profile hierarchy +=====================================Typo: Thermomether -> Thermometer
Quoted 12 lines
doc/thermometer.txt new file +12
-0+ +Service org.bluez +Interface org.bluez.Thermometer +Object path [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX + + +Methods void SetProperty(string name, variant value) + + Changes the value of the specified property. Only + read-write properties can be changed. On success + this will emit a PropertyChanged signal. +doc/thermometer.txt line 29
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ Possible Errors: org.bluez.Error.InvalidArguments + + dict GetProperties() + + Returns all properties for the interface. See the + Properties section for the available properties. + + RegisterThermometerWatcher(object agent) + + Registers a watcher to monitor scanned measures.The agentTypo: measures -> measurements
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ will be notified about final. + + Possible Errors: org.bluez.Error.InvalidArguments + + UnregisterThermometerWatcher(object agent) + + Unregisters a watcher.doc/thermometer.txt line 46
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ + Final and intermediate temperatures won't be notified to + this agent any more. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + + EnableIntermediateMeasures(object agent) + + Enables intermediate measure notifications for this agentTypo: measure -> measurement
doc/thermometer.txt line 52
Quoted 6 lines
doc/thermometer.txt new file +6
-0+ if the thermometer supports it. + + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotSupported + + DisableIntermediateMeasures(object agent)What about a second argument to
RegisterThermometerWatcher()that enables/disables intermediate measurements ?doc/thermometer.txt line 54
Quoted 2 lines
doc/thermometer.txt new file +2
-0+ + Disables intermediate measure notifications for thisTypo: measure -> measurement
doc/thermometer.txt line 57
Quoted 3 lines
doc/thermometer.txt new file +3
-0+ agent. It will disable notifications in the thermometer + when the last agent removes the watcher for intermediate + measures.Typo: measures -> measurements
doc/thermometer.txt line 69
Quoted 12 lines
doc/thermometer.txt new file +12
-0+ + Possible Errors: org.bluez.Error.InvalidArguments + org.bluez.Error.NotFound + +Signals PropertyChanged(string name, variant value) + + This signal indicates a changed value of the given + property. + +Properties boolean Intermediate [readonly] + + True if the thermometer supports intermediate measureTypo: measure -> measurement
doc/thermometer.txt line 76
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ notifications. + + uint16 Interval (optional) [readwrite] + + The Measurement Interval defines the time (in seconds) + between measurements. This interval is not related to + the intermediates measures and must be defined intoTypo: intermediates -> intermediate
Typo: measures -> measurementsdoc/thermometer.txt line 77
Quoted 1 line
doc/thermometer.txt new file +1
-0+ a valid range. Setting it to zero meaning that noTypo: meaning -> means
doc/thermometer.txt line 80
Quoted 3 lines
doc/thermometer.txt new file +3
-0+ periodic measurements will be taken. + + uint16 Minimum (optional) [readonly]This is inverted with Maximum.
doc/thermometer.txt line 87
Quoted 7 lines
doc/thermometer.txt new file +7
-0+ + Defines the maximum value allowed for the interval + between periodic measurements. + + uint16 Maximum (optional) [readonly] + + Defines the minimuum value allowed for the intervalTypo: minimuum -> minimum
doc/thermometer.txt line 97
Quoted 10 lines
doc/thermometer.txt new file +10
-0+ between periodic measurements. + + +Health Thermometer Watcher hierarchy +==================================== +Service unique name +Interface org.bluez.ThermometerWatcher +Object path freely definable + +Methods void MeasureReceived(dict measure)typo (measure vs. measurement)
doc/thermometer.txt line 105
Quoted 8 lines
doc/thermometer.txt new file +8
-0+ + This callback gets called when a measure has been + scanned in the thermometer. The Time entry in the dict + will be only present if the device supports storing of + data. The time value is expressed in seconds since epoch. + The value represented is (mantissa) x (10**exponent) + See foot note for special values when treating with + health devices.IIRC, the "Type" value is also optional.
Quoted 23 lines
doc/thermometer.txt new file +20
-1+ + Dict is defined as below: + { + "Exponent" : int8, + "Mantissa" : int32, + "Unit" : ("Celsius" or "Fahrenheit"), + "Time" : uint64, + "Type" : ("Armpit", "Body", "Ear", "Finger", + "Intestines", "Mouth", "Rectum", "Toe", + "Tympanum"), + "Measurement" : ("Final" or "Intermediate"), + } + + For special cases, the exponent shall always be zero and + the mantissa should be one of following values: + + NRes = -(2**23) + NaN = +(2**23-1) + INFINITY = (2**23-2) + -INFINITY = -(2**23-2) --1.7.5.2
Quoted 8 lines
Quoted 5 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlRegards,
Thanks for your notes.
I'll submit a patch fixing this issues during the day if nobody has more comments about this API.
Best regards.
Hi Anderson,
(cut)
Quoted 10 lines
Quoted 9 lines
+
+ This callback gets called when a measure has been
+ scanned in the thermometer. The Time entry in the dict
+ will be only present if the device supports storing of
+ data. The time value is expressed in seconds since epoch.
+ The value represented is (mantissa) x (10**exponent)
+ See foot note for special values when treating with
+ health devices.
Quoted 2 lines
IIRC, the "Type" value is also optional.
Sorry, I didn't see this comment before.
You are right, there are two ways to notify the type of the measurements. In a non-static fashion the Temperature Characteristic will be used instead of adding this information with the measure at notification time. On the other hands, the Temperature Characteristic won't be used If the thermometer can take measurements from different places. In this case the type information will be added when the natification occurs. Only one of both methods can be used but not both at the same time.
The first version of the API included the type as property when static values were used. At last, we decided get ride of this property to always include it in the callback. It is just an idea take from Luiz Augusto's comments to simplify the API. You can see the old API discussion in previous emails if you feel like it.
Best regards.