Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_hts.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Example Health Thermometer service implementation.
6  *
7  * Copyright (c) 2012-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_HTS_H
21 #define SVC_HTS_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup HEALTH_THERMOMETER_SERVICE
28  * \{ */
29 
30 /**************************************************************************************************
31  Handle Ranges
32 **************************************************************************************************/
33 
34 /** \name Health Thermometer Service Handles
35  *
36  */
37 /**@{*/
38 #define HTS_START_HDL 0x0120 /*!< \brief Start handle. */
39 #define HTS_END_HDL (HTS_MAX_HDL - 1) /*!< \brief End handle. */
40 
41 /**************************************************************************************************
42  Handles
43 **************************************************************************************************/
44 
45 /*! \brief Health Thermometer Service Handles */
46 enum
47 {
48  HTS_SVC_HDL = HTS_START_HDL, /*!< \brief Health thermometer service declaration */
49  HTS_TM_CH_HDL, /*!< \brief Temperature measurement characteristic */
50  HTS_TM_HDL, /*!< \brief Temperature measurement */
51  HTS_TM_CH_CCC_HDL, /*!< \brief Temperature measurement client characteristic configuration */
52  HTS_IT_CH_HDL, /*!< \brief Intermediate temperature characteristic */
53  HTS_IT_HDL, /*!< \brief Intermediate temperature */
54  HTS_IT_CH_CCC_HDL, /*!< \brief Intermediate temperature client characteristic configuration */
55  HTS_TT_CH_HDL, /*!< \brief Temperature type characteristic */
56  HTS_TT_HDL, /*!< \brief Temperature type */
57  HTS_MAX_HDL /*!< \brief Maximum handle. */
58 };
59 /**@}*/
60 
61 /**************************************************************************************************
62  Function Declarations
63 **************************************************************************************************/
64 
65 /*************************************************************************************************/
66 /*!
67  * \brief Add the services to the attribute server.
68  *
69  * \return None.
70  */
71 /*************************************************************************************************/
72 void SvcHtsAddGroup(void);
73 
74 /*************************************************************************************************/
75 /*!
76  * \brief Remove the services from the attribute server.
77  *
78  * \return None.
79  */
80 /*************************************************************************************************/
81 void SvcHtsRemoveGroup(void);
82 
83 /*************************************************************************************************/
84 /*!
85  * \brief Register callbacks for the service.
86  *
87  * \param readCback Read callback function.
88  * \param writeCback Write callback function.
89  *
90  * \return None.
91  */
92 /*************************************************************************************************/
93 void SvcHtsCbackRegister(attsReadCback_t readCback, attsWriteCback_t writeCback);
94 
95 /*! \} */ /* HEALTH_THERMOMETER_SERVICE */
96 
97 #ifdef __cplusplus
98 };
99 #endif
100 
101 #endif /* SVC_HTS_H */
Temperature measurement client characteristic configuration.
Definition: svc_hts.h:51
uint8_t(* attsWriteCback_t)(dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, uint16_t len, uint8_t *pValue, attsAttr_t *pAttr)
Attribute group write callback.
Definition: att_api.h:237
void SvcHtsRemoveGroup(void)
Remove the services from the attribute server.
Temperature measurement characteristic.
Definition: svc_hts.h:49
#define HTS_START_HDL
Start handle.
Definition: svc_hts.h:38
Temperature type.
Definition: svc_hts.h:56
Intermediate temperature client characteristic configuration.
Definition: svc_hts.h:54
void SvcHtsCbackRegister(attsReadCback_t readCback, attsWriteCback_t writeCback)
Register callbacks for the service.
Maximum handle.
Definition: svc_hts.h:57
Temperature type characteristic.
Definition: svc_hts.h:55
Intermediate temperature characteristic.
Definition: svc_hts.h:52
Health thermometer service declaration.
Definition: svc_hts.h:48
uint8_t(* attsReadCback_t)(dmConnId_t connId, uint16_t handle, uint8_t operation, uint16_t offset, attsAttr_t *pAttr)
Attribute group read callback.
Definition: att_api.h:218
void SvcHtsAddGroup(void)
Add the services to the attribute server.
Temperature measurement.
Definition: svc_hts.h:50
Intermediate temperature.
Definition: svc_hts.h:53