Cordio Stack and Cordio Profiles  r2p3-02rel0
uricfg_api.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief UriBeacon configuration profile.
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 URICFG_API_H
21 #define URICFG_API_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup URIBEACON_CONFIGURATION_PROFILE
28  * \{ */
29 
30 #include "wsf_types.h"
31 #include "att_api.h"
32 #include "svc_uricfg.h"
33 #include "uricfg_defs.h"
34 
35 /**************************************************************************************************
36  Data Types
37 **************************************************************************************************/
38 
39 /*************************************************************************************************/
40 /*!
41  * \brief Attribute write callback.
42  *
43  * \param handle Attribute handle.
44  * \param valueLen Length of value data.
45  * \param pValue Pointer to value data.
46  *
47  * \return None.
48  */
49 /*************************************************************************************************/
50 typedef void (*uriCfgAttWriteCback_t)(uint16_t handle, uint16_t valueLen, const uint8_t *pValue);
51 
52 /*************************************************************************************************/
53 /*!
54  * \brief Lock change callback.
55  *
56  * \param lockState New lock state.
57  * \param lock Lock value.
58  *
59  * \return None.
60  */
61 /*************************************************************************************************/
62 typedef void (*uriCfgLockChangeCback_t)(uint8_t lockState, const uint8_t *pLock);
63 
64 /**************************************************************************************************
65  Function Declarations
66 **************************************************************************************************/
67 
68 /*************************************************************************************************/
69 /*!
70  * \brief Start UriBeacon configuration service.
71  *
72  * \param pUriData Initial URI data value
73  * \param uriDataLen Length of URI data value
74  * \param uriFlags Initial URI flags value
75  * \param pAdvTxPwrLevels Initial advertised tx power levels value
76  * \param txPwrMode Initial tx power mode value
77  * \param beaconPeriod Initial beacon period value
78  *
79  * \return None.
80  */
81 /*************************************************************************************************/
82 void UriCfgStart(const uint8_t *pUriData, uint8_t uriDataLen, uint8_t uriFlags,
83  int8_t *pAdvTxPwrLevels, uint8_t txPwrMode, uint16_t beaconPeriod);
84 
85 /*************************************************************************************************/
86 /*!
87  * \brief Stop UriBeacon configuration service.
88  *
89  * \return None.
90  */
91 /*************************************************************************************************/
92 void UriCfgStop(void);
93 
94 /*************************************************************************************************/
95 /*!
96  * \brief Register callback for written UriBeacon attributes.
97  *
98  * \param cback Callback to invoke when an attribute changes.
99  *
100  * \return None.
101  */
102 /*************************************************************************************************/
104 
105 /*************************************************************************************************/
106 /*!
107  * \brief Make UriBeacon lockable.
108  *
109  * \param lockState Initial lock state value.
110  * \param pLock Initial lock value.
111  * \param cback Callback to invoke when lock changes.
112  *
113  * \return None.
114  */
115 /*************************************************************************************************/
116 void UriCfgMakeLockable(uint8_t lockState, uint8_t *pLock, uriCfgLockChangeCback_t cback);
117 
118 /*************************************************************************************************/
119 /*!
120  * \brief Set reset value of URI data.
121  *
122  * \param pUriData Reset value of URI data.
123  *
124  * \return None.
125  */
126 /*************************************************************************************************/
127 void UriCfgSetUriDataResetValue(const uint8_t *pUriData);
128 
129 /*! \} */ /* URIBEACON_CONFIGURATION_PROFILE */
130 
131 #ifdef __cplusplus
132 };
133 #endif
134 
135 #endif /* URICFG_API_H */
void UriCfgStop(void)
Stop UriBeacon configuration service.
void UriCfgAttWriteCbackRegister(uriCfgAttWriteCback_t cback)
Register callback for written UriBeacon attributes.
void(* uriCfgAttWriteCback_t)(uint16_t handle, uint16_t valueLen, const uint8_t *pValue)
Attribute write callback.
Definition: uricfg_api.h:50
void(* uriCfgLockChangeCback_t)(uint8_t lockState, const uint8_t *pLock)
Lock change callback.
Definition: uricfg_api.h:62
Platform-independent data types.
void UriCfgMakeLockable(uint8_t lockState, uint8_t *pLock, uriCfgLockChangeCback_t cback)
Make UriBeacon lockable.
UriCfg configuration service implementation.
void UriCfgStart(const uint8_t *pUriData, uint8_t uriDataLen, uint8_t uriFlags, int8_t *pAdvTxPwrLevels, uint8_t txPwrMode, uint16_t beaconPeriod)
Start UriBeacon configuration service.
UriBeacon configuration service defines.
unsigned short uint16_t
Unsigned 16-bit value.
Definition: wsf_types.h:67
Attribute protocol client and server API.
void UriCfgSetUriDataResetValue(const uint8_t *pUriData)
Set reset value of URI data.
unsigned char uint8_t
Unsigned 8-bit value.
Definition: wsf_types.h:63
signed char int8_t
Signed 8-bit value.
Definition: wsf_types.h:61