Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_time.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Example Time-related 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_TIME_H
21 #define SVC_TIME_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup TIME-RELATED_SERVICE
28  * \{ */
29 
30 
31 /**************************************************************************************************
32  Handle Ranges
33 **************************************************************************************************/
34 
35 /** \name Time Service Handles
36  *
37  */
38 /**@{*/
39 #define TIME_START_HDL 0xC0 /*!< \brief Start handle. */
40 #define TIME_END_HDL (TIME_MAX_HDL - 1) /*!< \brief End handle. */
41 
42 /**************************************************************************************************
43  Handles
44 **************************************************************************************************/
45 
46 /*! \brief Time-Related Service Handles */
47 enum
48 {
49  TIME_CTS_SVC_HDL = TIME_START_HDL, /*!< \brief Current time service declaration */
50  TIME_CTS_CT_CH_HDL, /*!< \brief CT time characteristic */
51  TIME_CTS_CT_HDL, /*!< \brief CT time */
52  TIME_CTS_CT_CH_CCC_HDL, /*!< \brief CT time client characteristic configuration */
53  TIME_CTS_LOC_CH_HDL, /*!< \brief Local time information characteristic */
54  TIME_CTS_LOC_HDL, /*!< \brief Local time information */
55  TIME_CTS_REF_CH_HDL, /*!< \brief Reference time information characteristic */
56  TIME_CTS_REF_HDL, /*!< \brief Reference time information */
57 
58  TIME_DST_SVC_HDL, /*!< \brief DST change service declaration */
59  TIME_DST_WDST_CH_HDL, /*!< \brief Time with DST characteristic */
60  TIME_DST_WDST_HDL, /*!< \brief Time with DST */
61 
62  TIME_RTU_SVC_HDL, /*!< \brief Reference time update service declaration */
63  TIME_RTU_CP_CH_HDL, /*!< \brief Time update control point characteristic */
64  TIME_RTU_CP_HDL, /*!< \brief Time update control point */
65  TIME_RTU_STATE_CH_HDL, /*!< \brief Time update state characteristic */
66  TIME_RTU_STATE_HDL, /*!< \brief Time update state */
67 
68  TIME_MAX_HDL /*!< \brief Maximum handle. */
69 };
70 /**@}*/
71 
72 /*! \brief Indexes of CCC descriptor handle table entries */
73 enum
74 {
75  TIME_CTS_CT_CH_CCC_IDX /*!< \brief CT time CCCD index. */
76 };
77 
78 /**************************************************************************************************
79  Function Declarations
80 **************************************************************************************************/
81 
82 /*************************************************************************************************/
83 /*!
84  * \brief Add the services to the attribute server.
85  *
86  * \return None.
87  */
88 /*************************************************************************************************/
89 void SvcTimeAddGroup(void);
90 
91 /*************************************************************************************************/
92 /*!
93  * \brief Remove the services from the attribute server.
94  *
95  * \return None.
96  */
97 /*************************************************************************************************/
98 void SvcTimeRemoveGroup(void);
99 
100 /*! \} */ /* TIME-RELATED_SERVICE */
101 
102 #ifdef __cplusplus
103 };
104 #endif
105 
106 #endif /* SVC_TIME_H */
107 
#define TIME_START_HDL
Start handle.
Definition: svc_time.h:39
CT time characteristic.
Definition: svc_time.h:50
Time update state.
Definition: svc_time.h:66
Reference time information.
Definition: svc_time.h:56
Local time information characteristic.
Definition: svc_time.h:53
Maximum handle.
Definition: svc_time.h:68
Time update state characteristic.
Definition: svc_time.h:65
Time with DST.
Definition: svc_time.h:60
Reference time update service declaration.
Definition: svc_time.h:62
Time with DST characteristic.
Definition: svc_time.h:59
void SvcTimeRemoveGroup(void)
Remove the services from the attribute server.
Time update control point.
Definition: svc_time.h:64
CT time client characteristic configuration.
Definition: svc_time.h:52
Current time service declaration.
Definition: svc_time.h:49
Reference time information characteristic.
Definition: svc_time.h:55
CT time CCCD index.
Definition: svc_time.h:75
void SvcTimeAddGroup(void)
Add the services to the attribute server.
DST change service declaration.
Definition: svc_time.h:58
Local time information.
Definition: svc_time.h:54
Time update control point characteristic.
Definition: svc_time.h:63
CT time.
Definition: svc_time.h:51