Cordio Stack and Cordio Profiles  r2p3-02rel0
plxpc_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Pulse Oximeter profile collector.
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 #ifndef PLXPC_API_H
20 #define PLXPC_API_H
21 
22 #include "att_api.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /*! \addtogroup PULSE_OXIMETER_PROFILE
29  * \{ */
30 
31 /**************************************************************************************************
32  Macros
33 **************************************************************************************************/
34 
35 /*! \brief Pulse Oximeter service enumeration of handle indexes of characteristics to be discovered */
36 enum
37 {
38  PLXPC_PLXS_PLXSC_HDL_IDX, /*!< \brief Pulse Oximeter Spot Check measurement */
39  PLXPC_PLXS_PLXSC_CCC_HDL_IDX, /*!< \brief Pulse Oximeter Spot Check measurement CCC descriptor */
40  PLXPC_PLXS_PLXC_HDL_IDX, /*!< \brief Pulse Oximeter Continuous measurement */
41  PLXPC_PLXS_PLXC_CCC_HDL_IDX, /*!< \brief Pulse Oximeter Continuous measurement CCC descriptor */
42  PLXPC_PLXS_PLXF_HDL_IDX, /*!< \brief Pulse Oximeter features */
43  PLXPC_PLXS_RACP_HDL_IDX, /*!< \brief Record access control point */
44  PLXPC_PLXS_RACP_CCC_HDL_IDX, /*!< \brief Record access control point CCC descriptor */
45  PLXPC_PLXS_HDL_LIST_LEN /*!< \brief Handle list length */
46 };
47 
48 /**************************************************************************************************
49  Function Declarations
50 **************************************************************************************************/
51 
52 /*************************************************************************************************/
53 /*!
54  * \brief Perform service and characteristic discovery for Pulse Oximeter service.
55  * Parameter pHdlList must point to an array of length \ref PLXPC_PLXS_HDL_LIST_LEN.
56  * If discovery is successful the handles of discovered characteristics and
57  * descriptors will be set in pHdlList.
58  *
59  * \param connId Connection identifier.
60  * \param pHdlList Characteristic handle list.
61  *
62  * \return None.
63  */
64 /*************************************************************************************************/
65 void PlxpcPlxsDiscover(dmConnId_t connId, uint16_t *pHdlList);
66 
67 /*************************************************************************************************/
68 /*!
69  * \brief Process a value received in an ATT read response, notification, or indication
70  * message. Parameter pHdlList must point to an array of length \ref PLXPC_PLXS_HDL_LIST_LEN.
71  * If the ATT handle of the message matches a handle in the handle list the value
72  * is processed, otherwise it is ignored.
73  *
74  * \param pHdlList Characteristic handle list.
75  * \param pMsg ATT callback message.
76  *
77  * \return \ref ATT_SUCCESS if handle is found, \ref ATT_ERR_NOT_FOUND otherwise.
78  */
79 /*************************************************************************************************/
81 
82 /*************************************************************************************************/
83 /*!
84  * \brief Send a command to the pulse oximeter service record access control point.
85  *
86  * \param connId Connection identifier.
87  * \param handle Attribute handle.
88  * \param opcode Command opcode.
89  * \param oper Command operator or 0 if no operator required.
90  *
91  * \return None.
92  */
93 /*************************************************************************************************/
94 void PlxpcPlxsRacpSend(dmConnId_t connId, uint16_t handle, uint8_t opcode, uint8_t oper);
95 
96 
97 /*! \} */ /* PULSE_OXIMETER_PROFILE */
98 
99 #ifdef __cplusplus
100 };
101 #endif
102 
103 #endif /* PLXPC_API_H */
uint8_t dmConnId_t
Connection identifier.
Definition: dm_api.h:501
ATT callback event.
Definition: att_api.h:154
uint8_t PlxpcPlxsValueUpdate(uint16_t *pHdlList, attEvt_t *pMsg)
Process a value received in an ATT read response, notification, or indication message. Parameter pHdlList must point to an array of length PLXPC_PLXS_HDL_LIST_LEN. If the ATT handle of the message matches a handle in the handle list the value is processed, otherwise it is ignored.
Pulse Oximeter Continuous measurement.
Definition: plxpc_api.h:40
Record access control point.
Definition: plxpc_api.h:43
Record access control point CCC descriptor.
Definition: plxpc_api.h:44
Handle list length.
Definition: plxpc_api.h:45
Pulse Oximeter Spot Check measurement.
Definition: plxpc_api.h:38
void PlxpcPlxsRacpSend(dmConnId_t connId, uint16_t handle, uint8_t opcode, uint8_t oper)
Send a command to the pulse oximeter service record access control point.
Pulse Oximeter Spot Check measurement CCC descriptor.
Definition: plxpc_api.h:39
unsigned short uint16_t
Unsigned 16-bit value.
Definition: wsf_types.h:67
Pulse Oximeter Continuous measurement CCC descriptor.
Definition: plxpc_api.h:41
Attribute protocol client and server API.
void PlxpcPlxsDiscover(dmConnId_t connId, uint16_t *pHdlList)
Perform service and characteristic discovery for Pulse Oximeter service. Parameter pHdlList must poin...
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63
Pulse Oximeter features.
Definition: plxpc_api.h:42