Cordio Stack and Cordio Profiles  r2p3-02rel0
svc_dis.h
Go to the documentation of this file.
1 /*************************************************************************************************/
2 /*!
3  * \file
4  *
5  * \brief Example Device Information 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_DIS_H
21 #define SVC_DIS_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /*! \addtogroup DEVICE_INFORMATION_SERVICE
28  * \{ */
29 
30 /**************************************************************************************************
31  Handle Ranges
32 **************************************************************************************************/
33 
34 /** \name Device Information Service Handles
35  *
36  */
37 /**@{*/
38 /*! \brief Device Information Service */
39 #define DIS_START_HDL 0x30 /*!< \brief Start handle. */
40 #define DIS_END_HDL (DIS_MAX_HDL - 1) /*!< \brief End handle. */
41 
42 /**************************************************************************************************
43  Handles
44 **************************************************************************************************/
45 
46 /*! \brief Device Information Service Handles */
47 enum
48 {
49  DIS_SVC_HDL = DIS_START_HDL, /*!< \brief Information service declaration */
50  DIS_MFR_CH_HDL, /*!< \brief Manufacturer name string characteristic */
51  DIS_MFR_HDL, /*!< \brief Manufacturer name string */
52  DIS_SID_CH_HDL, /*!< \brief System ID characteristic */
53  DIS_SID_HDL, /*!< \brief System ID */
54  DIS_MN_CH_HDL, /*!< \brief Model number string characteristic */
55  DIS_MN_HDL, /*!< \brief Model number string */
56  DIS_SN_CH_HDL, /*!< \brief Serial number string characteristic */
57  DIS_SN_HDL, /*!< \brief Serial number string */
58  DIS_FWR_CH_HDL, /*!< \brief Firmware revision string characteristic */
59  DIS_FWR_HDL, /*!< \brief Firmware revision string */
60  DIS_HWR_CH_HDL, /*!< \brief Hardware revision string characteristic */
61  DIS_HWR_HDL, /*!< \brief Hardware revision string */
62  DIS_SWR_CH_HDL, /*!< \brief Software revision string characteristic */
63  DIS_SWR_HDL, /*!< \brief Software revision string */
64  DIS_RCD_CH_HDL, /*!< \brief Registration certificate data characteristic */
65  DIS_RCD_HDL, /*!< \brief Registration certificate data */
66  DIS_MAX_HDL /*!< \brief Maximum handle. */
67 };
68 /**@}*/
69 
70 /**************************************************************************************************
71 Macros
72 **************************************************************************************************/
73 
74 /** \name Size of Attributes
75  *
76  */
77 /**@{*/
78 #ifndef DIS_MAXSIZE_MFR_ATT
79 #define DIS_MAXSIZE_MFR_ATT 20 /*!< \brief Size of manufacturer name string attribute */
80 #endif
81 
82 #ifndef DIS_MAXSIZE_MN_ATT
83 #define DIS_MAXSIZE_MN_ATT 20 /*!< \brief Size of model number string attribute */
84 #endif
85 
86 #ifndef DIS_MAXSIZE_SN_ATT
87 #define DIS_MAXSIZE_SN_ATT 20 /*!< \brief Size of serial number string attribute */
88 #endif
89 
90 #ifndef DIS_MAXSIZE_FWR_ATT
91 #define DIS_MAXSIZE_FWR_ATT 16 /*!< \brief Size of firmware revision string attribute */
92 #endif
93 
94 #ifndef DIS_MAXSIZE_HWR_ATT
95 #define DIS_MAXSIZE_HWR_ATT 16 /*!< \brief Size of hardware revision string attribute */
96 #endif
97 
98 #ifndef DIS_MAXSIZE_SWR_ATT
99 #define DIS_MAXSIZE_SWR_ATT 16 /*!< \brief Size of software revision string attribute */
100 #endif
101 
102 #ifndef DIS_SIZE_SID_ATT
103 #define DIS_SIZE_SID_ATT 8 /*!< \brief Size of system id attribute */
104 #endif
105 
106 #ifndef DIS_SIZE_RCD_ATT
107 #define DIS_SIZE_RCD_ATT 6 /*!< \brief Size of registration certificate data attribute */
108 #endif
109 /**@}*/
110 
111 /**************************************************************************************************
112  Function Declarations
113 **************************************************************************************************/
114 
115 /*************************************************************************************************/
116 /*!
117  * \brief Add the services to the attribute server.
118  *
119  * \return None.
120  */
121 /*************************************************************************************************/
122 void SvcDisAddGroup(void);
123 
124 /*************************************************************************************************/
125 /*!
126  * \brief Remove the services from the attribute server.
127  *
128  * \return None.
129  */
130 /*************************************************************************************************/
131 void SvcDisRemoveGroup(void);
132 
133 /*! \} */ /* DEVICE_INFORMATION_SERVICE */
134 
135 #ifdef __cplusplus
136 };
137 #endif
138 
139 #endif /* SVC_DIS_H */
140 
Hardware revision string.
Definition: svc_dis.h:61
Firmware revision string.
Definition: svc_dis.h:59
System ID.
Definition: svc_dis.h:53
Maximum handle.
Definition: svc_dis.h:66
void SvcDisAddGroup(void)
Add the services to the attribute server.
Firmware revision string characteristic.
Definition: svc_dis.h:58
Hardware revision string characteristic.
Definition: svc_dis.h:60
Model number string.
Definition: svc_dis.h:55
Model number string characteristic.
Definition: svc_dis.h:54
Manufacturer name string.
Definition: svc_dis.h:51
#define DIS_START_HDL
Device Information Service.
Definition: svc_dis.h:39
Registration certificate data characteristic.
Definition: svc_dis.h:64
Serial number string characteristic.
Definition: svc_dis.h:56
Information service declaration.
Definition: svc_dis.h:49
void SvcDisRemoveGroup(void)
Remove the services from the attribute server.
Software revision string characteristic.
Definition: svc_dis.h:62
Registration certificate data.
Definition: svc_dis.h:65
Software revision string.
Definition: svc_dis.h:63
Serial number string.
Definition: svc_dis.h:57
Manufacturer name string characteristic.
Definition: svc_dis.h:50
System ID characteristic.
Definition: svc_dis.h:52