c7c8a5dadee02adaf81455627e3ebd0a3a511523
[framework/connectivity/bluez.git] / doc / thermometer-api.txt
1 BlueZ D-Bus Thermometer API description
2 ***************************************
3
4         Santiago Carot-Nemesio <sancane@gmail.com>
5
6 Health Thermometer Manager hierarchy
7 ====================================
8
9 Service         org.bluez
10 Interface       org.bluez.ThermometerManager1
11 Object path     [variable prefix]/{hci0,hci1,...}
12
13 Methods         RegisterWatcher(object agent)
14
15                         Registers a watcher to monitor scanned measurements.
16                         This agent will be notified about final temperature
17                         measurements.
18
19                         Possible Errors: org.bluez.Error.InvalidArguments
20
21                 UnregisterWatcher(object agent)
22
23                         Unregisters a watcher.
24
25                 EnableIntermediateMeasurement(object agent)
26
27                         Enables intermediate measurement notifications
28                         for this agent. Intermediate measurements will
29                         be enabled only for thermometers which support it.
30
31                         Possible Errors: org.bluez.Error.InvalidArguments
32
33                 DisableIntermediateMeasurement(object agent)
34
35                         Disables intermediate measurement notifications
36                         for this agent. It will disable notifications in
37                         thermometers when the last agent removes the
38                         watcher for intermediate measurements.
39
40                         Possible Errors: org.bluez.Error.InvalidArguments
41                                         org.bluez.Error.NotFound
42
43 Health Thermometer Profile hierarchy
44 ====================================
45
46 Service         org.bluez
47 Interface       org.bluez.Thermometer1
48 Object path     [variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX
49
50
51 Properties      boolean Intermediate [readonly]
52
53                         True if the thermometer supports intermediate
54                         measurement notifications.
55
56                 uint16 Interval (optional) [readwrite]
57
58                         The Measurement Interval defines the time (in
59                         seconds) between measurements. This interval is
60                         not related to the intermediate measurements and
61                         must be defined into a valid range. Setting it
62                         to zero means that no periodic measurements will
63                         be taken.
64
65                 uint16 Maximum (optional) [readonly]
66
67                         Defines the maximum value allowed for the interval
68                         between periodic measurements.
69
70                 uint16 Minimum (optional) [readonly]
71
72                         Defines the minimum value allowed for the interval
73                         between periodic measurements.
74
75
76 Health Thermometer Watcher hierarchy
77 ====================================
78
79 Service         unique name
80 Interface       org.bluez.ThermometerWatcher1
81 Object path     freely definable
82
83 Methods         void MeasurementReceived(dict measurement)
84
85                         This callback gets called when a measurement has been
86                         scanned in the thermometer.
87
88                         Measurement:
89
90                                 int16 Exponent:
91                                 int32 Mantissa:
92
93                                         Exponent and Mantissa values as
94                                         extracted from float value defined by
95                                         IEEE-11073-20601.
96
97                                         Measurement value is calculated as
98                                         (Mantissa) * (10^Exponent)
99
100                                         For special cases Exponent is
101                                         set to 0 and Mantissa is set to
102                                         one of following values:
103
104                                         +(2^23 - 1)     NaN (invalid or
105                                                         missing data)
106                                         -(2^23)         NRes
107                                         +(2^23 - 2)     +Infinity
108                                         -(2^23 - 2)     -Infinity
109
110                                 string Unit:
111
112                                         Possible values: "celsius" or
113                                                         "fahrenheit"
114
115                                 uint64 Time (optional):
116
117                                         Time of measurement, if
118                                         supported by device.
119                                         Expressed in seconds since epoch.
120
121                                 string Type (optional):
122
123                                         Only present if measurement type
124                                         is known.
125
126                                         Possible values: "armpit", "body",
127                                                 "ear", "finger", "intestines",
128                                                 "mouth", "rectum", "toe",
129                                                 "tympanum"
130
131                                 string Measurement:
132
133                                         Possible values: "final" or
134                                                         "intermediate"