Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_uricfg.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief UriCfg configuration service implementation.
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_URICFG_H
21 #define SVC_URICFG_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup URICFG_CONFIGURATION_SERVICE
28  * \{ */
29 
30 /**************************************************************************************************
31  Handle Ranges
32 **************************************************************************************************/
33 
34 /** \name URI Config Service Handles
35  *
36  */
37 /**@{*/
38 #define URICFG_HANDLE_START 0x80 /*!< \brief Start handle. */
39 #define URICFG_HANDLE_END (URICFG_HANDLE_END_PLUS_ONE - 1) /*!< \brief End handle. */
40 
41 /**************************************************************************************************
42  Handles
43 **************************************************************************************************/
44 
45 /*! \brief UriBeacon configuration service handles */
46 enum
47 {
48  URICFG_HANDLE_SVC = URICFG_HANDLE_START, /*!< \brief Service declaration. */
49 
50  URICFG_HANDLE_LOCKSTATE_CHR, /*!< \brief Lock state characteristic declaration. */
51  URICFG_HANDLE_LOCKSTATE, /*!< \brief Lock state characteristic value. */
52  URICFG_HANDLE_LOCKSTATE_CHR_USR_DESCR, /*!< \brief Lock state characteristic user description. */
53 
54  URICFG_HANDLE_LOCK_CHR, /*!< \brief Lock characteristic declaration. */
55  URICFG_HANDLE_LOCK, /*!< \brief Lock characteristic value. */
56  URICFG_HANDLE_LOCK_CHR_USR_DESCR, /*!< \brief Lock characteristic user declaration. */
57 
58  URICFG_HANDLE_UNLOCK_CHR, /*!< \brief Unlock characteristic declaration. */
59  URICFG_HANDLE_UNLOCK, /*!< \brief Unlock characteristic value. */
60  URICFG_HANDLE_UNLOCK_CHR_USR_DESCR, /*!< \brief Unlock characteristic user description. */
61 
62  URICFG_HANDLE_URIDATA_CHR, /*!< \brief URI data characteristic declaration. */
63  URICFG_HANDLE_URIDATA, /*!< \brief URI data characteristic value. */
64  URICFG_HANDLE_URIDATA_CHR_USR_DESCR, /*!< \brief URI data characteristic user description. */
65 
66  URICFG_HANDLE_URIFLAGS_CHR, /*!< \brief URI flags characteristic declaration. */
67  URICFG_HANDLE_URIFLAGS, /*!< \brief URI flags characteristic value. */
68  URICFG_HANDLE_URIFLAGS_CHR_USR_DESCR, /*!< \brief URI flags characteristic user description. */
69 
70  URICFG_HANDLE_TXPWRLEVELS_CHR, /*!< \brief Tx power levels characteristic declaration. */
71  URICFG_HANDLE_TXPWRLEVELS, /*!< \brief Tx power levels characteristic value. */
72  URICFG_HANDLE_TXPWRLEVELS_CHR_USR_DESCR, /*!< \brief Tx power levels characteristic user description. */
73 
74  URICFG_HANDLE_TXPWRMODE_CHR, /*!< \brief Tx power mode characteristic declaration. */
75  URICFG_HANDLE_TXPWRMODE, /*!< \brief Tx power mode characteristic value. */
76  URICFG_HANDLE_TXPWRMODE_CHR_USR_DESCR, /*!< \brief Tx power mode characteristic user description. */
77 
78  URICFG_HANDLE_BEACONPERIOD_CHR, /*!< \brief Beacon period characteristic declaration. */
79  URICFG_HANDLE_BEACONPERIOD, /*!< \brief Beacon period characteristic value. */
80  URICFG_HANDLE_BEACONPERIOD_CHR_USR_DESCR, /*!< \brief Beacon period characteristic user description. */
81 
82  URICFG_HANDLE_RESET_CHR, /*!< \brief Reset characteristic declaration. */
83  URICFG_HANDLE_RESET, /*!< \brief Reset characteristic value. */
84  URICFG_HANDLE_RESET_CHR_USR_DESCR, /*!< \brief Reset characteristic user description. */
85 
86  URICFG_HANDLE_END_PLUS_ONE /*!< \brief Maximum handle. */
87 };
88 /**@}*/
89 
90 /**************************************************************************************************
91  Function Declarations
92 **************************************************************************************************/
93 
94 /*************************************************************************************************/
95 /*!
96  * \brief Add the services to the attribute server.
97  *
98  * \return None.
99  */
100 /*************************************************************************************************/
101 void SvcUriCfgAddGroup(void);
102 
103 /*************************************************************************************************/
104 /*!
105  * \brief Remove the services from the attribute server.
106  *
107  * \return None.
108  */
109 /*************************************************************************************************/
110 void SvcUriCfgRemoveGroup(void);
111 
112 /*************************************************************************************************/
113 /*!
114  * \brief Register callbacks for the service.
115  *
116  * \param writeCback Write callback function.
117  *
118  * \return None.
119  */
120 /*************************************************************************************************/
122 
123 /*! \} */ /* URICFG_CONFIGURATION_SERVICE */
124 
125 #ifdef __cplusplus
126 }
127 #endif
128 
129 #endif /* SVC_URICFG_H */
Lock characteristic value.
Definition: svc_uricfg.h:55
Lock state characteristic declaration.
Definition: svc_uricfg.h:50
Unlock characteristic value.
Definition: svc_uricfg.h:59
URI flags characteristic value.
Definition: svc_uricfg.h:67
URI flags characteristic declaration.
Definition: svc_uricfg.h:66
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
Tx power mode characteristic user description.
Definition: svc_uricfg.h:76
Tx power levels characteristic user description.
Definition: svc_uricfg.h:72
URI flags characteristic user description.
Definition: svc_uricfg.h:68
Unlock characteristic declaration.
Definition: svc_uricfg.h:58
Lock state characteristic user description.
Definition: svc_uricfg.h:52
Tx power levels characteristic declaration.
Definition: svc_uricfg.h:70
URI data characteristic user description.
Definition: svc_uricfg.h:64
URI data characteristic declaration.
Definition: svc_uricfg.h:62
Unlock characteristic user description.
Definition: svc_uricfg.h:60
Reset characteristic declaration.
Definition: svc_uricfg.h:82
void SvcUriCfgRemoveGroup(void)
Remove the services from the attribute server.
void SvcUriCfgCbackRegister(attsWriteCback_t writeCback)
Register callbacks for the service.
Reset characteristic value.
Definition: svc_uricfg.h:83
Tx power levels characteristic value.
Definition: svc_uricfg.h:71
Beacon period characteristic user description.
Definition: svc_uricfg.h:80
Beacon period characteristic declaration.
Definition: svc_uricfg.h:78
Tx power mode characteristic value.
Definition: svc_uricfg.h:75
Reset characteristic user description.
Definition: svc_uricfg.h:84
Lock characteristic declaration.
Definition: svc_uricfg.h:54
URI data characteristic value.
Definition: svc_uricfg.h:63
Beacon period characteristic value.
Definition: svc_uricfg.h:79
Tx power mode characteristic declaration.
Definition: svc_uricfg.h:74
Service declaration.
Definition: svc_uricfg.h:48
Lock characteristic user declaration.
Definition: svc_uricfg.h:56
Lock state characteristic value.
Definition: svc_uricfg.h:51
void SvcUriCfgAddGroup(void)
Add the services to the attribute server.
#define URICFG_HANDLE_START
Start handle.
Definition: svc_uricfg.h:38
Maximum handle.
Definition: svc_uricfg.h:86