Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_ch.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Characteristic constants.
6  *
7  * Copyright (c) 2011-2018 Arm Ltd. All Rights Reserved.
8  * Arm Ltd. confidential and proprietary.
9  *
10  * IMPORTANT. Your use of this file is governed by a Software License Agreement
11  * ("Agreement") that must be accepted in order to download or otherwise receive a
12  * copy of this file. You may not use or copy this file for any purpose other than
13  * as described in the Agreement. If you do not agree to all of the terms of the
14  * Agreement do not use this file and delete all copies in your possession or control;
15  * if you do not have a copy of the Agreement, you must contact Arm Ltd. prior
16  * to any use, copying or further distribution of this software.
17  */
18 /*************************************************************************************************/
19 
20 #ifndef SVC_CH_H
21 #define SVC_CH_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup SERVICE_CONSTANTS
28  * \{ */
29 
30 /**************************************************************************************************
31  Macros
32 **************************************************************************************************/
33 
34 /** \name Appearance Values
35  *
36  */
37 /**@{*/
38 #define CH_APPEAR_UNKNOWN 0 /*!< \brief Unknown */
39 #define CH_APPEAR_PHONE 64 /*!< \brief Generic Phone */
40 #define CH_APPEAR_COMPUTER 128 /*!< \brief Generic Computer */
41 #define CH_APPEAR_WATCH 192 /*!< \brief Generic Watch */
42 #define CH_APPEAR_WATCH_SPORTS 193 /*!< \brief Watch: Sports Watch */
43 #define CH_APPEAR_CLOCK 256 /*!< \brief Generic Clock */
44 #define CH_APPEAR_DISPLAY 320 /*!< \brief Generic Display */
45 #define CH_APPEAR_REMOTE 384 /*!< \brief Generic Remote Control */
46 #define CH_APPEAR_GLASSES 448 /*!< \brief Generic Eye-glasses */
47 #define CH_APPEAR_TAG 512 /*!< \brief Generic Tag */
48 #define CH_APPEAR_KEYRING 576 /*!< \brief Generic Keyring */
49 #define CH_APPEAR_PLAYER 640 /*!< \brief Generic Media Player */
50 #define CH_APPEAR_BARCODE 704 /*!< \brief Generic Barcode Scanner */
51 #define CH_APPEAR_THERM 768 /*!< \brief Generic Thermometer */
52 #define CH_APPEAR_THERM_EAR 769 /*!< \brief Thermometer: Ear */
53 #define CH_APPEAR_HR 832 /*!< \brief Generic Heart rate Sensor */
54 #define CH_APPEAR_HR_BELT 833 /*!< \brief Heart Rate Sensor: Heart Rate Belt */
55 #define CH_APPEAR_BP 896 /*!< \brief Generic Blood Pressure */
56 #define CH_APPEAR_BP_ARM 897 /*!< \brief Blood Pressure: Arm */
57 #define CH_APPEAR_BP_WRIST 898 /*!< \brief Blood Pressure: Wrist */
58 #define CH_APPEAR_HID 960 /*!< \brief Human Interface Device (HID) */
59 #define CH_APPEAR_HID_KEYBOARD 961 /*!< \brief Keyboard */
60 #define CH_APPEAR_HID_MOUSE 962 /*!< \brief Mouse */
61 #define CH_APPEAR_HID_JOYSTICK 963 /*!< \brief Joystick */
62 #define CH_APPEAR_HID_GAMEPAD 964 /*!< \brief Gamepad */
63 #define CH_APPEAR_HID_TABLET 965 /*!< \brief Digitizer Tablet */
64 #define CH_APPEAR_HID_READER 966 /*!< \brief Card Reader */
65 #define CH_APPEAR_HID_PEN 967 /*!< \brief Digital Pen */
66 #define CH_APPEAR_HID_BARCODE 968 /*!< \brief Barcode Scanner */
67 #define CH_APPEAR_GLUCOSE 1024 /*!< \brief Generic Glucose Meter */
68 #define CH_APPEAR_RUN 1088 /*!< \brief Generic: Running Walking Sensor */
69 #define CH_APPEAR_RUN_IN_SHOE 1089 /*!< \brief Running Walking Sensor: In-Shoe */
70 #define CH_APPEAR_RUN_ON_SHOE 1090 /*!< \brief Running Walking Sensor: On-Shoe */
71 #define CH_APPEAR_RUN_ON_HIP 1091 /*!< \brief Running Walking Sensor: On-Hip */
72 #define CH_APPEAR_CYCL 1152 /*!< \brief Generic: Cycling */
73 #define CH_APPEAR_CYCL_COMP 1153 /*!< \brief Cycling: Cycling Computer */
74 #define CH_APPEAR_CYCL_SPEED 1154 /*!< \brief Cycling: Speed Sensor */
75 #define CH_APPEAR_CYCL_CAD 1155 /*!< \brief Cycling: Cadence Sensor */
76 #define CH_APPEAR_CYCL_POWER 1156 /*!< \brief Cycling: Power Sensor */
77 #define CH_APPEAR_CYCL_SPEED_CAD 1157 /*!< \brief Cycling: Speed and Cadence Sensor */
78 
79 #define CH_APPEAR_LEN 2 /*!< \brief Length in bytes*/
80 /**@}*/
81 
82 /** \name Alert Level Values
83  *
84  */
85 /**@{*/
86 #define CH_ALERT_LVL_NONE 0 /*!< \brief No Alert */
87 #define CH_ALERT_LVL_MILD 1 /*!< \brief Mild Alert */
88 #define CH_ALERT_LVL_HIGH 2 /*!< \brief High Alert */
89 
90 #define CH_ALERT_LVL_LEN 1 /*!< \brief Length in bytes*/
91 /**@}*/
92 
93 /** \name Heart Rate Measurement Flags
94  *
95  */
96 /**@{*/
97 #define CH_HRM_FLAGS_VALUE_8BIT 0x00 /*!< \brief Heart Rate Value Format is set to UINT8 */
98 #define CH_HRM_FLAGS_VALUE_16BIT 0x01 /*!< \brief Heart Rate Value Format is set to UINT16 */
99 #define CH_HRM_FLAGS_SENSOR_NOT_SUP 0x00 /*!< \brief Sensor Contact feature is not supported */
100 #define CH_HRM_FLAGS_SENSOR_NOT_DET 0x04 /*!< \brief Sensor Contact feature is supported, but contact is not detected */
101 #define CH_HRM_FLAGS_SENSOR_DET 0x06 /*!< \brief Sensor Contact feature is supported and contact is detected */
102 #define CH_HRM_FLAGS_ENERGY_EXP 0x08 /*!< \brief Energy Expended field is present */
103 #define CH_HRM_FLAGS_RR_INTERVAL 0x10 /*!< \brief One or more RR-Interval values are present */
104 /**@}*/
105 
106 /** \name Heart Rate Measurement Field Lengths
107  *
108  */
109 /**@{*/
110 #define CH_HRM_LEN_VALUE_8BIT 1 /*!< \brief Heart rate measurement 8-bit value length. */
111 #define CH_HRM_LEN_VALUE_16BIT 2 /*!< \brief Heart rate measurement 16-bit value length. */
112 #define CH_HRM_LEN_ENERGY_EXP 2 /*!< \brief Heart rate measurement exponent value length. */
113 #define CH_HRM_LEN_RR_INTERVAL 2 /*!< \brief Heart rate measurement RR interval value length. */
114 /**@}*/
115 
116 /** \name Body Sensor Locations
117  *
118  */
119 /**@{*/
120 #define CH_BSENSOR_LOC_OTHER 0 /*!< \brief Other */
121 #define CH_BSENSOR_LOC_CHEST 1 /*!< \brief Chest */
122 #define CH_BSENSOR_LOC_WRIST 2 /*!< \brief Wrist */
123 #define CH_BSENSOR_LOC_FINGER 3 /*!< \brief Finger */
124 #define CH_BSENSOR_LOC_HAND 4 /*!< \brief Hand */
125 #define CH_BSENSOR_LOC_EARLOBE 5 /*!< \brief Ear Lobe */
126 #define CH_BSENSOR_LOC_FOOT 6 /*!< \brief Foot */
127 
128 #define CH_BSENSOR_LOC_LEN 1 /*!< \brief Length in bytes */
129 /**@}*/
130 
131 /** \name Heart Rate Control Point
132  *
133  */
134 /**@{*/
135 #define CH_HRCP_RESET_ENERGY_EXP 1 /*!< \brief Reset Energy Expended */
136 /**@}*/
137 
138 /** \name Alert Notification Control Point
139  *
140  */
141 /**@{*/
142 #define CH_ANCP_ENABLE_NEW 0 /*!< \brief Enable New Incoming Alert Notification */
143 #define CH_ANCP_ENABLE_UNREAD 1 /*!< \brief Enable Unread Category Status Notification */
144 #define CH_ANCP_DISABLE_NEW 2 /*!< \brief Disable New Incoming Alert Notification */
145 #define CH_ANCP_DISABLE_UNREAD 3 /*!< \brief Disable Unread Category Status Notification */
146 #define CH_ANCP_NOTIFY_NEW 4 /*!< \brief Notify New Incoming Alert immediately */
147 #define CH_ANCP_NOTIFY_UNREAD 5 /*!< \brief Notify Unread Category Status immediately */
148 /**@}*/
149 
150 /** \name Alert Category ID
151  *
152  */
153 /**@{*/
154 #define CH_ALERT_CAT_ID_SIMPLE 0 /*!< \brief Simple Alert: General text alert or non-text alert */
155 #define CH_ALERT_CAT_ID_EMAIL 1 /*!< \brief Email: Alert when Email messages arrives */
156 #define CH_ALERT_CAT_ID_NEWS 2 /*!< \brief News: News feeds such as RSS, Atom */
157 #define CH_ALERT_CAT_ID_CALL 3 /*!< \brief Call: Incoming call */
158 #define CH_ALERT_CAT_ID_MISSED 4 /*!< \brief Missed call: Missed Call */
159 #define CH_ALERT_CAT_ID_SMS 5 /*!< \brief SMS/MMS: SMS/MMS message arrives */
160 #define CH_ALERT_CAT_ID_VMAIL 6 /*!< \brief Voice mail: Voice mail */
161 #define CH_ALERT_CAT_ID_SCHED 7 /*!< \brief Schedule: Alert occurred on calendar, planner */
162 #define CH_ALERT_CAT_ID_ALERT 8 /*!< \brief High Prioritized Alert: Alert that should be handled as high priority */
163 #define CH_ALERT_CAT_ID_IM 9 /*!< \brief Instant Message: Alert for incoming instant messages */
164 #define CH_ALERT_CAT_ID_ALL 0xFF /*!< \brief All Categories */
165 /**@}*/
166 
167 /** \name Alert Category ID Bit Mask
168  *
169  */
170 /**@{*/
171 #define CH_ALERT_CAT_MASK_SIMPLE 0x0001 /*!< \brief Simple Alert: General text alert or non-text alert */
172 #define CH_ALERT_CAT_MASK_EMAIL 0x0002 /*!< \brief Email: Alert when Email messages arrives */
173 #define CH_ALERT_CAT_MASK_NEWS 0x0004 /*!< \brief News: News feeds such as RSS, Atom */
174 #define CH_ALERT_CAT_MASK_CALL 0x0008 /*!< \brief Call: Incoming call */
175 #define CH_ALERT_CAT_MASK_MISSED 0x0010 /*!< \brief Missed call: Missed Call */
176 #define CH_ALERT_CAT_MASK_SMS 0x0020 /*!< \brief SMS/MMS: SMS/MMS message arrives */
177 #define CH_ALERT_CAT_MASK_VMAIL 0x0040 /*!< \brief Voice mail: Voice mail */
178 #define CH_ALERT_CAT_MASK_SCHED 0x0080 /*!< \brief Schedule: Alert occurred on calendar, planner */
179 #define CH_ALERT_CAT_MASK_ALERT 0x0100 /*!< \brief High Prioritized Alert: Alert that should be handled as high priority */
180 #define CH_ALERT_CAT_MASK_IM 0x0200 /*!< \brief Instant Message: Alert for incoming instant messages */
181 /**@}*/
182 
183 /** \name Ringer Control Point
184  *
185  */
186 /**@{*/
187 #define CH_RCP_SILENT 1 /*!< \brief Silent Mode */
188 #define CH_RCP_MUTE_ONCE 2 /*!< \brief Mute Once */
189 #define CH_RCP_CANCEL_SILENT 3 /*!< \brief Cancel Silent Mode */
190 /**@}*/
191 
192 /** \name Ringer Setting
193  *
194  */
195 /**@{*/
196 #define CH_RINGER_SET_SILENT 0 /*!< \brief Ringer Silent */
197 #define CH_RINGER_SET_NORMAL 1 /*!< \brief Ringer Normal */
198 /**@}*/
199 
200 /** \name Alert Status
201  *
202  */
203 /**@{*/
204 #define CH_ALERT_STATUS_RINGER 0x01 /*!< \brief Ringer State active */
205 #define CH_ALERT_STATUS_VIBRATE 0x02 /*!< \brief Vibrate State active */
206 #define CH_ALERT_STATUS_DISPLAY 0x04 /*!< \brief Display Alert Status State active */
207 /**@}*/
208 
209 /*! \brief System ID */
210 #define CH_SYSTEM_ID_LEN 8 /*!< \brief System ID value length. */
211 
212 /*! \brief Battery Level */
213 #define CH_BATT_LEVEL_LEN 1 /*!< \brief Battery level value length. */
214 
215 /** \name Blood Pressure Measurement Flags
216  *
217  */
218 /**@{*/
219 #define CH_BPM_FLAG_UNITS_MMHG 0x00 /*!< \brief Blood pressure in units of mmHg */
220 #define CH_BPM_FLAG_UNITS_KPA 0x01 /*!< \brief Blood pressure in units of kPa */
221 #define CH_BPM_FLAG_TIMESTAMP 0x02 /*!< \brief Time Stamp Flag */
222 #define CH_BPM_FLAG_PULSE_RATE 0x04 /*!< \brief Pulse Rate Flag */
223 #define CH_BPM_FLAG_USER_ID 0x08 /*!< \brief User ID Flag */
224 #define CH_BPM_FLAG_MEAS_STATUS 0x10 /*!< \brief Measurement Status Flag */
225 /**@}*/
226 
227 /** \name Blood Pressure Measurement: Measurement Status Bitmasks
228  *
229  */
230 /**@{*/
231 /*! \brief Blood Pressure Measurement measurement status bitmasks */
232 #define CH_BPM_MS_BIT_MOVEMENT 0x0001 /*!< \brief Body Movement Detection */
233 #define CH_BPM_MS_BIT_CUFF_FIT 0x0002 /*!< \brief Cuff Fit Detection */
234 #define CH_BPM_MS_BIT_IRR_PULSE 0x0004 /*!< \brief Irregular Pulse Detection */
235 #define CH_BPM_MS_BIT_PULSE_RANGE 0x0018 /*!< \brief Pulse Rate Range Detection */
236 #define CH_BPM_MS_BIT_MEAS_POS 0x0020 /*!< \brief Measurement Position Detection */
237 /**@}*/
238 
239 /** \name Blood Pressure Measurement: measurement status flags
240  *
241  */
242 /**@{*/
243 #define CH_BPM_MS_FLAG_MOVEMENT_NONE 0x0000 /*!< \brief No body movement */
244 #define CH_BPM_MS_FLAG_MOVEMENT 0x0001 /*!< \brief Body movement */
245 #define CH_BPM_MS_FLAG_CUFF_FIT_OK 0x0000 /*!< \brief Cuff fit ok */
246 #define CH_BPM_MS_FLAG_CUFF_FIT_LOOSE 0x0002 /*!< \brief Cuff fit loose */
247 #define CH_BPM_MS_FLAG_IRR_PULSE_NONE 0x0000 /*!< \brief No irregular pulse detected */
248 #define CH_BPM_MS_FLAG_IRR_PULSE 0x0004 /*!< \brief Irregular pulse detected */
249 #define CH_BPM_MS_FLAG_PULSE_RANGE_OK 0x0000 /*!< \brief Pulse rate is within the range */
250 #define CH_BPM_MS_FLAG_PULSE_RANGE_HIGH 0x0008 /*!< \brief Pulse rate exceeds upper limit */
251 #define CH_BPM_MS_FLAG_PULSE_RANGE_LOW 0x0010 /*!< \brief Pulse rate is less than lower limit */
252 #define CH_BPM_MS_FLAG_MEAS_POS 0x0000 /*!< \brief Proper measurement position */
253 #define CH_BPM_MS_FLAG_MEAS_POS_ERR 0x0020 /*!< \brief Improper measurement position */
254 /**@}*/
255 
256 /** \name Blood Pressure Measurement Field Lengths
257  *
258  */
259 /**@{*/
260 #define CH_BPM_FLAGS_LEN 1 /*!< \brief Blood pressure measurement flags length. */
261 #define CH_BPM_MEAS_LEN 6 /*!< \brief Blood pressure measurement measurement length. */
262 #define CH_BPM_TIMESTAMP_LEN 7 /*!< \brief Blood pressure measurement timestamp length. */
263 #define CH_BPM_PULSE_RATE_LEN 2 /*!< \brief Blood pressure measurement pulse rate length. */
264 #define CH_BPM_USER_ID_LEN 1 /*!< \brief Blood pressure measurement user ID length. */
265 #define CH_BPM_MEAS_STATUS_LEN 2 /*!< \brief Blood pressure measurement status length. */
266 /**@}*/
267 
268 /** \name Blood Pressure Feature Flags
269  *
270  */
271 /**@{*/
272 #define CH_BPF_FLAG_MOVEMENT 0x0001 /*!< \brief Body Movement Detection Support bit */
273 #define CH_BPF_FLAG_CUFF_FIT 0x0002 /*!< \brief Cuff Fit Detection Support bit */
274 #define CH_BPF_FLAG_IRR_PULSE 0x0004 /*!< \brief Irregular Pulse Detection Support bit */
275 #define CH_BPF_FLAG_PULSE_RANGE 0x0008 /*!< \brief Pulse Rate Range Detection Support bit */
276 #define CH_BPF_FLAG_MEAS_POS 0x0010 /*!< \brief Measurement Position Detection Support bit */
277 #define CH_BPF_FLAG_MULTI_BOND 0x0020 /*!< \brief Multiple bond support bit */
278 /**@}*/
279 
280 /** \name SFLOAT Special Values
281  *
282  */
283 /**@{*/
284 #define CH_SFLOAT_NAN 0x07FF /*!< \brief Not a number */
285 #define CH_SFLOAT_NRES 0x07FF /*!< \brief Not at this resolution */
286 #define CH_SFLOAT_POS_INF 0x07FE /*!< \brief Positive infinity */
287 #define CH_SFLOAT_NEG_INF 0x0802 /*!< \brief Negative infinity */
288 #define CH_SFLOAT_RSVD 0x0801 /*!< \brief Not at this resolution */
289 /**@}*/
290 
291 /** \name Glucose Feature
292  *
293  */
294 /**@{*/
295 #define CH_GLF_LOW_BATT 0x0001 /*!< \brief Low Battery Detection During Measurement Supported */
296 #define CH_GLF_MALFUNC 0x0002 /*!< \brief Sensor Malfunction Detection Supported */
297 #define CH_GLF_SAMPLE_SIZE 0x0004 /*!< \brief Sensor Sample Size Supported */
298 #define CH_GLF_INSERT_ERR 0x0008 /*!< \brief Sensor Strip Insertion Error Detection Supported */
299 #define CH_GLF_TYPE_ERR 0x0010 /*!< \brief Sensor Strip Type Error Detection Supported */
300 #define CH_GLF_RES_HIGH_LOW 0x0020 /*!< \brief Sensor Result High-Low Detection Supported */
301 #define CH_GLF_TEMP_HIGH_LOW 0x0040 /*!< \brief Sensor Temperature High-Low Detection Supported */
302 #define CH_GLF_READ_INT 0x0080 /*!< \brief Sensor Read Interrupt Detection Supported */
303 #define CH_GLF_GENERAL_FAULT 0x0100 /*!< \brief General Device Fault Supported */
304 #define CH_GLF_TIME_FAULT 0x0200 /*!< \brief Time Fault Supported */
305 #define CH_GLF_MULTI_BOND 0x0400 /*!< \brief Multiple Bond Supported */
306 /**@}*/
307 
308 /** \name Glucose Measurement Flags
309  *
310  */
311 /**@{*/
312 #define CH_GLM_FLAG_TIME_OFFSET 0x01 /*!< \brief Time Offset Present */
313 #define CH_GLM_FLAG_CONC_TYPE_LOC 0x02 /*!< \brief Glucose Concentration, Type, and Sample Location Present */
314 #define CH_GLM_FLAG_UNITS_KG_L 0x00 /*!< \brief Glucose Concentration Units kg/L */
315 #define CH_GLM_FLAG_UNITS_MOL_L 0x04 /*!< \brief Glucose Concentration Units mol/L */
316 #define CH_GLM_FLAG_SENSOR_STATUS 0x08 /*!< \brief Sensor Status Annunciation Present */
317 #define CH_GLM_FLAG_CONTEXT_INFO 0x10 /*!< \brief Context Information Follows */
318 /**@}*/
319 
320 /** \name Glucose Measurement Type
321  *
322  */
323 /**@{*/
324 #define CH_GLM_TYPE_CAP_BLOOD 1 /*!< \brief Capillary whole blood */
325 #define CH_GLM_TYPE_CAP_PLASMA 2 /*!< \brief Capillary plasma */
326 #define CH_GLM_TYPE_VEN_BLOOD 3 /*!< \brief Venous whole blood */
327 #define CH_GLM_TYPE_VEN_PLASMA 4 /*!< \brief Venous plasma */
328 #define CH_GLM_TYPE_ART_BLOOD 5 /*!< \brief Arterial whole blood */
329 #define CH_GLM_TYPE_ART_PLASMA 6 /*!< \brief Arterial plasma */
330 #define CH_GLM_TYPE_UNDET_BLOOD 7 /*!< \brief Undetermined whole blood */
331 #define CH_GLM_TYPE_UNDET_PLASMA 8 /*!< \brief Undetermined plasma */
332 #define CH_GLM_TYPE_FLUID 9 /*!< \brief Interstitial fluid (ISF) */
333 #define CH_GLM_TYPE_CONTROL 10 /*!< \brief Control solution */
334 /**@}*/
335 
336 /** \name Glucose Measurement Location
337  *
338  */
339 /**@{*/
340 #define CH_GLM_LOC_FINGER 1 /*!< \brief Finger */
341 #define CH_GLM_LOC_AST 2 /*!< \brief Alternate Site Test (AST) */
342 #define CH_GLM_LOC_EAR 3 /*!< \brief Earlobe */
343 #define CH_GLM_LOC_CONTROL 4 /*!< \brief Control solution */
344 #define CH_GLM_LOC_NOT_AVAIL 15 /*!< \brief Sample Location value not available */
345 /**@}*/
346 
347 /** \name Glucose Sensor Status Annunciation
348  *
349  */
350 /**@{*/
351 #define CH_GLM_STATUS_BATT_LOW 0x0001 /*!< \brief Device battery low at time of measurement */
352 #define CH_GLM_STATUS_SENSOR_FAULT 0x0002 /*!< \brief Sensor malfunction or faulting at time of measurement */
353 #define CH_GLM_STATUS_SAMPLE_SIZE 0x0004 /*!< \brief Sample size for blood or control solution insufficient at time of measurement */
354 #define CH_GLM_STATUS_STRIP_INSERT 0x0008 /*!< \brief Strip insertion error */
355 #define CH_GLM_STATUS_STRIP_TYPE 0x0010 /*!< \brief Strip type incorrect for device */
356 #define CH_GLM_STATUS_RESULT_HIGH 0x0020 /*!< \brief Sensor result higher than the device can process */
357 #define CH_GLM_STATUS_RESULT_LOW 0x0040 /*!< \brief Sensor result lower than the device can process */
358 #define CH_GLM_STATUS_TEMP_HIGH 0x0080 /*!< \brief Sensor temperature too high for valid test/result at time of measurement */
359 #define CH_GLM_STATUS_TEMP_LOW 0x0100 /*!< \brief Sensor temperature too low for valid test/result at time of measurement */
360 #define CH_GLM_STATUS_STRIP_PULL 0x0200 /*!< \brief Sensor read interrupted because strip was pulled too soon at time of measurement */
361 #define CH_GLM_STATUS_GENERAL_FAULT 0x0400 /*!< \brief General device fault has occurred in the sensor */
362 #define CH_GLM_STATUS_TIME_FAULT 0x0800 /*!< \brief Time fault has occurred in the sensor and time may be inaccurate */
363 /**@}*/
364 
365 /** \name Glucose Measurement Field Lengths
366  *
367  */
368 /**@{*/
369 #define CH_GLM_FLAGS_LEN 1 /*!< \brief Glucose measurement flags length. */
370 #define CH_GLM_SEQNUM_LEN 2 /*!< \brief Glucose measurement sequence number length. */
371 #define CH_GLM_TIMESTAMP_LEN 7 /*!< \brief Glucose measurement timestamp length. */
372 #define CH_GLM_TIME_OFFSET_LEN 2 /*!< \brief Glucose measurement time offset length. */
373 #define CH_GLM_CONC_TYPE_LOC_LEN 3 /*!< \brief Glucose measurement concentration type location length. */
374 #define CH_GLM_SENSOR_STATUS_LEN 2 /*!< \brief Glucose measurement sensor status length. */
375 /**@}*/
376 
377 /** \name Glucose Measurement Context Flags
378  *
379  */
380 /**@{*/
381 #define CH_GLMC_FLAG_CARB 0x01 /*!< \brief Carbohydrate id and carbohydrate present */
382 #define CH_GLMC_FLAG_MEAL 0x02 /*!< \brief Meal present */
383 #define CH_GLMC_FLAG_TESTER 0x04 /*!< \brief Tester-health present */
384 #define CH_GLMC_FLAG_EXERCISE 0x08 /*!< \brief Exercise duration and exercise intensity present */
385 #define CH_GLMC_FLAG_MED 0x10 /*!< \brief Medication ID and medication present */
386 #define CH_GLMC_FLAG_MED_KG 0x00 /*!< \brief Medication value units, kilograms */
387 #define CH_GLMC_FLAG_MED_L 0x20 /*!< \brief Medication value units, liters */
388 #define CH_GLMC_FLAG_HBA1C 0x40 /*!< \brief Hba1c present */
389 #define CH_GLMC_FLAG_EXT 0x80 /*!< \brief Extended flags present */
390 /**@}*/
391 
392 /** \name Glucose Measurement Context Field Lenths
393  *
394  */
395 /**@{*/
396 #define CH_GLMC_FLAGS_LEN 1 /*!< \brief Glucose measurement context flags length. */
397 #define CH_GLMC_SEQNUM_LEN 2 /*!< \brief Glucose measurement context sequence number length. */
398 #define CH_GLMC_CARB_LEN 3 /*!< \brief Glucose measurement context carbohydrate ID a d carbohydrate length. */
399 #define CH_GLMC_MEAL_LEN 1 /*!< \brief Glucose measurement context meal present length. */
400 #define CH_GLMC_TESTER_LEN 1 /*!< \brief Glucose measurement context tester-health length. */
401 #define CH_GLMC_EXERCISE_LEN 3 /*!< \brief Glucose measurement context exercise duration and exercise intensity length. */
402 #define CH_GLMC_MED_LEN 3 /*!< \brief Glucose measurement context medication ID length. */
403 #define CH_GLMC_HBA1C_LEN 2 /*!< \brief Glucose measurement context Hba1c length. */
404 #define CH_GLMC_EXT_LEN 1 /*!< \brief Glucose measurement context extended length. */
405 /**@}*/
406 
407 /** \name Glucose measurement context carbohydrate ID
408  *
409  */
410 /**@{*/
411 #define CH_GLMC_CARB_BREAKFAST 1 /*!< \brief Breakfast */
412 #define CH_GLMC_CARB_LUNCH 2 /*!< \brief Lunch */
413 #define CH_GLMC_CARB_DINNER 3 /*!< \brief Dinner */
414 #define CH_GLMC_CARB_SNACK 4 /*!< \brief Snack */
415 #define CH_GLMC_CARB_DRINK 5 /*!< \brief Drink */
416 #define CH_GLMC_CARB_SUPPER 6 /*!< \brief Supper */
417 #define CH_GLMC_CARB_BRUNCH 7 /*!< \brief Brunch */
418 /**@}*/
419 
420 /** \name Glucose Measurement Context Meal
421  *
422  */
423 /**@{*/
424 #define CH_GLMC_MEAL_PREPRANDIAL 1 /*!< \brief Preprandial (before meal) */
425 #define CH_GLMC_MEAL_POSTPRANDIAL 2 /*!< \brief Postprandial (after meal) */
426 #define CH_GLMC_MEAL_FASTING 3 /*!< \brief Fasting */
427 #define CH_GLMC_MEAL_CASUAL 4 /*!< \brief Casual (snacks, drinks, etc.) */
428 #define CH_GLMC_MEAL_BEDTIME 5 /*!< \brief Bedtime */
429 /**@}*/
430 
431 /** \name Glucose Measurement Context Tester
432  *
433  */
434 /**@{*/
435 #define CH_GLMC_TESTER_SELF 1 /*!< \brief Self */
436 #define CH_GLMC_TESTER_PRO 2 /*!< \brief Health care professional */
437 #define CH_GLMC_TESTER_LAB 3 /*!< \brief Lab test */
438 #define CH_GLMC_TESTER_NOT_AVAIL 15 /*!< \brief Tester value not available */
439 /**@}*/
440 
441 /** \name Glucose measurement Context Health
442  *
443  */
444 /**@{*/
445 #define CH_GLMC_HEALTH_MINOR 1 /*!< \brief Minor health issues */
446 #define CH_GLMC_HEALTH_MAJOR 2 /*!< \brief Major health issues */
447 #define CH_GLMC_HEALTH_MENSES 3 /*!< \brief During menses */
448 #define CH_GLMC_HEALTH_STRESS 4 /*!< \brief Under stress */
449 #define CH_GLMC_HEALTH_NONE 5 /*!< \brief No health issues */
450 #define CH_GLMC_HEALTH_NOT_AVAIL 15 /*!< \brief Health value not available */
451 /**@}*/
452 
453 /** \name Glucose Measurement Context Medication ID
454  *
455  */
456 /**@{*/
457 #define CH_GLMC_MED_RAPID 1 /*!< \brief Rapid acting insulin */
458 #define CH_GLMC_MED_SHORT 2 /*!< \brief Short acting insulin */
459 #define CH_GLMC_MED_INTERMED 3 /*!< \brief Intermediate acting insulin */
460 #define CH_GLMC_MED_LONG 4 /*!< \brief Long acting insulin */
461 #define CH_GLMC_MED_PREMIX 5 /*!< \brief Pre-mixed insulin */
462 /**@}*/
463 
464 /** \name Record Access Control Point Opcode
465  *
466  */
467 /**@{*/
468 #define CH_RACP_OPCODE_REPORT 1 /*!< \brief Report stored records */
469 #define CH_RACP_OPCODE_DELETE 2 /*!< \brief Delete stored records */
470 #define CH_RACP_OPCODE_ABORT 3 /*!< \brief Abort operation */
471 #define CH_RACP_OPCODE_REPORT_NUM 4 /*!< \brief Report number of stored records */
472 #define CH_RACP_OPCODE_NUM_RSP 5 /*!< \brief Number of stored records response */
473 #define CH_RACP_OPCODE_RSP 6 /*!< \brief Response code */
474 
475 /** \name Record Access Control Point Operator
476  *
477  */
478 /**@{*/
479 #define CH_RACP_OPERATOR_NULL 0 /*!< \brief Null operator */
480 #define CH_RACP_OPERATOR_ALL 1 /*!< \brief All records */
481 #define CH_RACP_OPERATOR_LTEQ 2 /*!< \brief Less than or equal to */
482 #define CH_RACP_OPERATOR_GTEQ 3 /*!< \brief Greater than or equal to */
483 #define CH_RACP_OPERATOR_RANGE 4 /*!< \brief Within range of (inclusive) */
484 #define CH_RACP_OPERATOR_FIRST 5 /*!< \brief First record(i.e. oldest record) */
485 #define CH_RACP_OPERATOR_LAST 6 /*!< \brief Last record (i.e. most recent record) */
486 /**@}*/
487 
488 /** \name Record Access Control Point Response Code Values
489  *
490  */
491 /**@{*/
492 #define CH_RACP_RSP_SUCCESS 1 /*!< \brief Success */
493 #define CH_RACP_RSP_OPCODE_NOT_SUP 2 /*!< \brief Op code not supported */
494 #define CH_RACP_RSP_INV_OPERATOR 3 /*!< \brief Invalid operator */
495 #define CH_RACP_RSP_OPERATOR_NOT_SUP 4 /*!< \brief Operator not supported */
496 #define CH_RACP_RSP_INV_OPERAND 5 /*!< \brief Invalid operand */
497 #define CH_RACP_RSP_NO_RECORDS 6 /*!< \brief No records found */
498 #define CH_RACP_RSP_ABORT_FAILED 7 /*!< \brief Abort unsuccessful */
499 #define CH_RACP_RSP_PROC_NOT_COMP 8 /*!< \brief Procedure not completed */
500 #define CH_RACP_RSP_OPERAND_NOT_SUP 9 /*!< \brief Operand not supported */
501 /**@}*/
502 
503 /** \name Glucose Service Operand Filter Types And Field Lengths
504  *
505  */
506 /**@{*/
507 #define CH_RACP_GLS_FILTER_SEQ 1 /*!< \brief Sequence number */
508 #define CH_RACP_GLS_FILTER_TIME 2 /*!< \brief User facing time */
509 #define CH_RACP_GLS_FILTER_SEQ_LEN 2 /*!< \brief Sequence number filter length */
510 #define CH_RACP_GLS_FILTER_TIME_LEN 7 /*!< \brief User facing time filter length */
511 /**@}*/
512 
513 /** \name Service Changed Length
514  *
515  */
516 /**@{*/
517 #define CH_SC_LEN 4 /*!< \brief Length of service changed */
518 /**@}*/
519 
520 /** \name Temperature Measurement flags
521  *
522  */
523 /**@{*/
524 #define CH_TM_FLAG_UNITS_C 0x00 /*!< \brief Temperature in units of C */
525 #define CH_TM_FLAG_UNITS_F 0x01 /*!< \brief Temperature in units of F */
526 #define CH_TM_FLAG_TIMESTAMP 0x02 /*!< \brief Time Stamp Flag */
527 #define CH_TM_FLAG_TEMP_TYPE 0x04 /*!< \brief Temperature Type Flag */
528 /**@}*/
529 
530 /** \name Temperature Measurement Field Lengths
531  *
532  */
533 /**@{*/
534 #define CH_TM_FLAGS_LEN 1 /*!< \brief Temperature measurement flags length. */
535 #define CH_TM_MEAS_LEN 4 /*!< \brief Temperature measurement measurement length. */
536 #define CH_TM_TIMESTAMP_LEN 7 /*!< \brief Temperature measurement timestamp length. */
537 #define CH_TM_TEMP_TYPE_LEN 1 /*!< \brief Temperature measurement type length. */
538 /**@}*/
539 
540 /** \name Temperature Type
541  *
542  */
543 /**@{*/
544 #define CH_TT_ARMPIT 1 /*!< \brief Armpit */
545 #define CH_TT_BODY 2 /*!< \brief Body (general) */
546 #define CH_TT_EAR 3 /*!< \brief Ear (usually ear lobe) */
547 #define CH_TT_FINGER 4 /*!< \brief Finger */
548 #define CH_TT_GI 5 /*!< \brief Gastro-intestinal Tract */
549 #define CH_TT_MOUTH 6 /*!< \brief Mouth */
550 #define CH_TT_RECTUM 7 /*!< \brief Rectum */
551 #define CH_TT_TOE 8 /*!< \brief Toe */
552 #define CH_TT_TYMPANUM 9 /*!< \brief Tympanum (ear drum) */
553 /**@}*/
554 
555 /** \name Weight Scale Feature Flags
556  *
557  */
558 /**@{*/
559 #define CH_WSF_FLAG_TIMESTAMP 0x0001 /*!< \brief Time Stamp Supported bit */
560 #define CH_WSF_FLAG_MULTIUSER 0x0002 /*!< \brief Multiple Users Supported bit */
561 #define CH_WSF_FLAG_BMI 0x0004 /*!< \brief BMI Supported bit */
562 /**@}*/
563 
564 /** \name Weight Scale Measurement Flags
565  *
566  */
567 /**@{*/
568 #define CH_WSM_FLAG_UNITS_KG 0x00 /*!< \brief Weight in units of kilograms */
569 #define CH_WSM_FLAG_UNITS_LBS 0x01 /*!< \brief Weight in units of pounds */
570 #define CH_WSM_FLAG_TIMESTAMP 0x02 /*!< \brief Time stamp present */
571 #define CH_WSM_FLAG_USER_ID 0x04 /*!< \brief User ID present */
572 #define CH_WSM_FLAG_BMI_HEIGHT 0x08 /*!< \brief BMI and height present */
573 /**@}*/
574 
575 /** \name Weight Scale Measurement Field Lengths
576  *
577  */
578 /**@{*/
579 #define CH_WSM_FLAGS_LEN 1 /*!< \brief Weight scale measurement flags length. */
580 #define CH_WSM_MEAS_LEN 2 /*!< \brief Weight scale measurement measurement length. */
581 #define CH_WSM_TIMESTAMP_LEN 7 /*!< \brief Weight scale measurement timestamp length. */
582 #define CH_WSM_USER_ID_LEN 1 /*!< \brief Weight scale measurement user ID length. */
583 #define CH_WSM_BMI_HEIGHT_LEN 4 /*!< \brief Weight scale measurement BMI-height length. */
584 /**@}*/
585 
586 /** \name Scan Parameter Profile Field Lengths
587  *
588  */
589 /**@{*/
590 #define CH_SCPP_INTERVAL_WINDOW_LEN 4 /*!< \brief Scan parameter profile interval window length. */
591 #define CH_SCPP_REFRESH_LEN 0 /*!< \brief Scan parameter profile refresh length. */
592 /**@}*/
593 
594 /** \name Cycle Power Profile field Lengths
595  *
596  */
597 /**@{*/
598 #define CH_CPS_MEASUREMENT_LEN 34 /*!< \brief Cycling power profile measurement length. */
599 /**@}*/
600 
601 /** \name Cycle Speed Profile Field Lengths
602  *
603  */
604 /**@{*/
605 #define CH_CSCS_MEASUREMENT_LEN 11 /*!< \brief Cycling speed profile measurement length. */
606 /**@}*/
607 
608 /** \name Running Speed Profile Field Lengths
609  *
610  */
611 /**@{*/
612 #define CH_RSCS_MEASUREMENT_LEN 10 /*!< \brief Running speed profile measurement length. */
613 /**@}*/
614 
615 /** \name Pulse Oximiter Profile Field Lengths
616  *
617  */
618 /**@{*/
619 #define CH_PLXS_SPOT_CHECK_LEN 19 /*!< \brief Pulse oximiter profile spot check length. */
620 #define CH_PLXS_CONTINUOUS_LEN 16 /*!< \brief Pulse oximiter profile continuous length. */
621 /**@}*/
622 
623 /** \name Pulse Oximeter Common Field Lenths
624  *
625  */
626 /**@{*/
627 #define CH_PLX_FLAGS_LEN 1 /*!< \brief Pulse oximiter flags length. */
628 #define CH_PLX_SPO2_LEN 2 /*!< \brief Pulse oximiter SPO2 length, */
629 #define CH_PLX_PULSE_LEN 2 /*!< \brief Pulse oximiter pulse length. */
630 #define CH_PLX_MEASUREMENT_STATUS_LEN 2 /*!< \brief Pulse oximiter measurement status length. */
631 #define CH_PLX_SENSOR_STATUS_LEN 3 /*!< \brief Pulse oximiter sensor status length. */
632 #define CH_PLX_PULSE_AMP_INDX_LEN 2 /*!< \brief Pulse AMP index length. */
633 /**@}*/
634 
635 /** \name Pulse Oximeter Spot Check Measurement Field Lenths
636  *
637  */
638 /**@{*/
639 #define CH_PLXSC_TIMESTAMP_LEN 7 /*!< \brief Pulse oximiter spot check measurement timestamp length. */
640 /**@}*/
641 
642 /** \name Pulse Oximeter Continuous Measurement Field Lenths
643  *
644  */
645 /**@{*/
646 #define CH_PLXC_SPO2PR_FAST_LEN 2 /*!< \brief Pulse oximiter continuous measurement SPO2PR fast length. */
647 #define CH_PLXC_SPO2PR_SLOW_LEN 2 /*!< \brief Pulse oximiter continuous measurement SPO2PR slow length. */
648 /**@}*/
649 
650 /** \name Pulse Oximeter Features Field Lenths
651  *
652  */
653 /**@{*/
654 #define CH_PLXF_MIN_FEATURES_LEN 2 /*!< \brief Pulse oximiter minimum features length. */
655 #define CH_PLXF_MAX_FEATURES_LEN 7 /*!< \brief Pulse oximiter maximum features length. */
656 #define CH_PLXF_SENSOR_SUPPORT_LEN 2 /*!< \brief Pulse oximiter sensor support length. */
657 #define CH_PLXF_MEASUREMENT_SUPPORT_LEN 2 /*!< \brief Pulse oximeter measurement suppported length. */
658 /**@}*/
659 
660 /** \name Pulse Oximeter Spot Check Measurement Flags
661  *
662  */
663 /**@{*/
664 #define CH_PLXSC_FLAG_TIMESTAMP 0x01 /*!< \brief Timestamp field is present */
665 #define CH_PLXSC_FLAG_MEASUREMENT_STATUS 0x02 /*!< \brief Measurement Status Field Present */
666 #define CH_PLXSC_FLAG_SENSOR_STATUS 0x04 /*!< \brief Device and Sensor Status Field Present */
667 #define CH_PLXSC_FLAG_PULSE_AMP_INDX 0x08 /*!< \brief Pulse Amplitude Index field is present */
668 #define CH_PLXSC_FLAG_CLOCK_NOT_SET 0x10 /*!< \brief Device Clock is Not Set */
669 /**@}*/
670 
671 /** \name Pulse Oximeter Continuous Measurement Flags
672  *
673  */
674 /**@{*/
675 #define CH_PLXC_FLAG_SPO2PR_FAST 0x01 /*!< \brief SpO2PR-Fast field is present */
676 #define CH_PLXC_FLAG_SPO2PR_SLOW 0x02 /*!< \brief SpO2PR-Slow field is present */
677 #define CH_PLXC_FLAG_MEASUREMENT_STATUS 0x04 /*!< \brief Measurement Status Field Present */
678 #define CH_PLXC_FLAG_SENSOR_STATUS 0x08 /*!< \brief Device and Sensor Status Field Present */
679 #define CH_PLXC_FLAG_PULSE_AMP_INDX 0x10 /*!< \brief Pulse Amplitude Index field is present */
680 /**@}*/
681 
682 /** \name Pulse Oximeter Features
683  *
684  */
685 /**@{*/
686 #define CH_PLF_FLAG_MEAS_STATUS_SUP 0x01 /*!< \brief Measurement Status support is present */
687 #define CH_PLF_FLAG_SENSOR_STATUS_SUP 0x02 /*!< \brief Device and Sensor Status support is present */
688 #define CH_PLF_FLAG_SPOT_CHECK_STORAGE_SUP 0x04 /*!< \brief Measurement Storage for Spot-check measurements is supported */
689 #define CH_PLF_FLAG_SPOT_CHECK_SUP 0x08 /*!< \brief Timestamp for Spot-check measurements is supported */
690 #define CH_PLF_FLAG_SPO2PR_FAST_SUP 0x10 /*!< \brief SpO2PR-Fast metric is supported */
691 #define CH_PLF_FLAG_SPO2PR_SLOW_SUP 0x20 /*!< \brief SpO2PR-Slow metric is supported */
692 #define CH_PLF_FLAG_PULSE_AMP_SUP 0x40 /*!< \brief Pulse Amplitude Index field is supported */
693 #define CH_PLF_FLAG_MULTI_BOND_SUP 0x80 /*!< \brief Multiple Bonds Supported */
694 /**@}*/
695 
696 /*! \} */ /* SERVICE_CONSTANTS */
697 
698 #ifdef __cplusplus
699 };
700 #endif
701 
702 #endif /* SVC_CH_H */
703