Cordio Stack and Cordio Profiles  r2p3-02rel0
uricfg_defs.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief UriBeacon configuration service defines.
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_DEFS_H
21 #define URICFG_DEFS_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup URIBEACON_CONFIGURATION_PROFILE
28  * \{ */
29 
30 /**************************************************************************************************
31  Macros
32 **************************************************************************************************/
33 
34 /*! \brief UriBeacon configuration service-related UUIDs */
35 #define URICFG_UUID_BYTES(id) 0xd8, 0x81, 0xc9, 0x1a, 0xb9, 0x99, \
36  0x96, 0xab, \
37  0xba, 0x40, \
38  0x86, 0x87, \
39  (id & 0xFF), ((id >> 8) & 0xFF), 0x0c, 0xee
40 
41 /*! \brief UriBeacon configuration service-related UUIDs */
42 enum
43 {
44  URICFG_UUID_SVC = 0x2080,
45  URICFG_UUID_CHR_LOCKSTATE = 0x2081,
46  URICFG_UUID_CHR_LOCK = 0x2082,
47  URICFG_UUID_CHR_UNLOCK = 0x2083,
48  URICFG_UUID_CHR_URIDATA = 0x2084,
49  URICFG_UUID_CHR_URIFLAGS = 0x2085,
50  URICFG_UUID_CHR_TXPWRLEVELS = 0x2086,
51  URICFG_UUID_CHR_TXPWRMODE = 0x2087,
52  URICFG_UUID_CHR_BEACONPERIOD = 0x2088,
53  URICFG_UUID_CHR_RESET = 0x2089
54 };
55 
56 /*! \brief Transmit power modes */
57 enum
58 {
59  URICFG_ATT_TXPWRMODE_LOWEST = 0,
60  URICFG_ATT_TXPWRMODE_LOW = 1,
61  URICFG_ATT_TXPWRMODE_MEDIUM = 2,
62  URICFG_ATT_TXPWRMODE_HIGH = 3
63 };
64 
65 /** \name URI Config Attributes Sizes
66  *
67  */
68 /**@{*/
69 #define URICFG_MAXSIZE_URIDATA_ATT 18 /*!< \brief Size of URI data attribute */
70 #define URICFG_SIZE_TXPWRLEVELS_ATT 4 /*!< \brief Size of transmit power levels attribute */
71 #define URICFG_SIZE_LOCK_ATT 16 /*!< \brief Size of lock attribute */
72 /**@}*/
73 
74 /** \name Beacon period Attribute Values
75  *
76  */
77 /**@{*/
78 #define URICFG_ATT_BEACONPERIOD_MIN 20 /*!< \brief Minimum period */
79 #define URICFG_ATT_BEACONPERIOD_MAX 10240 /*!< \brief Maximum period */
80 #define URICFG_ATT_BEACONPERIOD_DISABLE 0 /*!< \brief Value to disable beacon */
81 /**@}*/
82 
83 /** \name Default (Reset) Values of Attributes
84  *
85  */
86 /**@{*/
87 #define URICFG_ATT_URIFLAGS_DEFAULT 0x00 /*!< \brief Default URI flags */
88 #define URICFG_ATT_TXPWRMODE_DEFAULT URICFG_ATT_TXPWRMODE_LOW /*!< \brief Default TX power mode */
89 #define URICFG_ATT_BEACONPERIOD_DEFAULT 1000 /*!< \brief Default beacon period in milliseconds (1 second) */
90 #define URICFG_ATT_LOCK_DEFAULT_BYTES 0x00, 0x00, 0x00, 0x00, \
91  0x00, 0x00, \
92  0x00, 0x00, \
93  0x00, 0x00, \
94  0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /*!< \brief Default lock bytes */
95 /**@}*/
96 
97 /*! \brief UriBeacon service UUID for advertising data */
98 #define URICFG_SERVICE_UUID 0xFED8
99 
100 /*! \} */ /* URIBEACON_CONFIGURATION_PROFILE */
101 
102 #ifdef __cplusplus
103 };
104 #endif
105 
106 #endif /* URICFG_DEFS_H */