Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_plxs.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Example Pulse Oximiter Service Server implementation.
6  *
7  * Copyright (c) 2016-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_PLXS_H
21 #define SVC_PLXS_H
22 
23 #include "att_api.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 /*! \addtogroup PULSE_OXIMITER_SERVICE
30  * \{ */
31 
32 /**************************************************************************************************
33  Handle Ranges
34 **************************************************************************************************/
35 
36 /** \name Pulse Oximiter Service Handles
37  *
38  */
39 /**@{*/
40 #define PLXS_START_HDL 0x04A0 /*!< \brief Start handle. */
41 #define PLXS_END_HDL (PLXS_MAX_HDL - 1) /*!< \brief End handle. */
42 
43 /**************************************************************************************************
44  Handles
45 **************************************************************************************************/
46 
47 /*! \brief Pulse Oximiter Service Handles */
48 enum
49 {
50  PLXS_SVC_HDL = PLXS_START_HDL, /*!< \brief Pulse Oximiter Server Service declaration */
51  PLXS_FEATURES_CH_HDL, /*!< \brief Pulse Oximiter Features characteristic */
52  PLXS_FEATURES_HDL, /*!< \brief Pulse Oximiter Features */
53  PLXS_SPOT_CHECK_CH_HDL, /*!< \brief Pulse Oximiter Spot Check Measurement characteristic */
54  PLXS_SPOT_CHECK_HDL, /*!< \brief Pulse Oximiter Spot Check Measurement */
55  PLXS_SPOT_CHECK_CH_CCC_HDL, /*!< \brief Pulse Oximiter Spot Check Measurement Client Characteristic Configuration Descriptor */
56  PLXS_CONTINUOUS_CH_HDL, /*!< \brief Pulse Oximiter Continuous Measurement characteristic */
57  PLXS_CONTINUOUS_HDL, /*!< \brief Pulse Oximiter Continuous Measurement */
58  PLXS_CONTINUOUS_CH_CCC_HDL, /*!< \brief Pulse Oximiter Continuous Measurement Client Characteristic Configuration Descriptor */
59  PLXS_RECORD_ACCESS_CH_HDL, /*!< \brief Pulse Oximiter Record Access Control Point characteristic */
60  PLXS_RECORD_ACCESS_HDL, /*!< \brief Pulse Oximiter Record Access Control Point */
61  PLXS_RECORD_ACCESS_CH_CCC_HDL, /*!< \brief Pulse Oximiter Record Access Control Point Client Characteristic Configuration Descriptor */
62  PLXS_MAX_HDL /*!< \brief Maximum handle. */
63 };
64 /**@}*/
65 
66 /**************************************************************************************************
67  Function Declarations
68 **************************************************************************************************/
69 
70 /*************************************************************************************************/
71 /*!
72  * \brief Add the services to the attribute server.
73  *
74  * \return None.
75  */
76 /*************************************************************************************************/
77 void SvcPlxsAddGroup(void);
78 
79 /*************************************************************************************************/
80 /*!
81  * \brief Remove the services from the attribute server.
82  *
83  * \return None.
84  */
85 /*************************************************************************************************/
86 void SvcPlxsRemoveGroup(void);
87 
88 /*************************************************************************************************/
89 /*!
90  * \brief Register callbacks for the service.
91  *
92  * \param readCback Read callback function.
93  * \param writeCback Write callback function.
94  *
95  * \return None.
96  */
97 /*************************************************************************************************/
98 void SvcPlxsCbackRegister(attsReadCback_t readCback, attsWriteCback_t writeCback);
99 
100 /*! \} */ /* PULSE_OXIMITER_SERVICE */
101 
102 #ifdef __cplusplus
103 };
104 #endif
105 
106 #endif /* SVC_PLXS_H */
Pulse Oximiter Record Access Control Point characteristic.
Definition: svc_plxs.h:59
Pulse Oximiter Record Access Control Point.
Definition: svc_plxs.h:60
Pulse Oximiter Features characteristic.
Definition: svc_plxs.h:51
Pulse Oximiter Server Service declaration.
Definition: svc_plxs.h:50
Pulse Oximiter Spot Check Measurement characteristic.
Definition: svc_plxs.h:53
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 SvcPlxsAddGroup(void)
Add the services to the attribute server.
Maximum handle.
Definition: svc_plxs.h:62
Pulse Oximiter Continuous Measurement.
Definition: svc_plxs.h:57
void SvcPlxsCbackRegister(attsReadCback_t readCback, attsWriteCback_t writeCback)
Register callbacks for the service.
#define PLXS_START_HDL
Start handle.
Definition: svc_plxs.h:40
Pulse Oximiter Features.
Definition: svc_plxs.h:52
void SvcPlxsRemoveGroup(void)
Remove the services from the attribute server.
Pulse Oximiter Spot Check Measurement Client Characteristic Configuration Descriptor.
Definition: svc_plxs.h:55
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
Attribute protocol client and server API.
Pulse Oximiter Continuous Measurement characteristic.
Definition: svc_plxs.h:56
Pulse Oximiter Spot Check Measurement.
Definition: svc_plxs.h:54
Pulse Oximiter Record Access Control Point Client Characteristic Configuration Descriptor.
Definition: svc_plxs.h:61
Pulse Oximiter Continuous Measurement Client Characteristic Configuration Descriptor.
Definition: svc_plxs.h:58