InPlay API
in_ble_prf_dis.h
1 
13 #ifndef IN_BLE_PRF_DIS_H
14 #define IN_BLE_PRF_DIS_H
15 
24 #include "ble/in_ble_evt.h"
25 #include "ble/in_ble_prf.h"
26 /*
27  * Defines
28  ****************************************************************************************
29  */
30 
31 /*
32  * Enumerations
33  ****************************************************************************************
34  */
35 
36 /*
37  * Events
38  ****************************************************************************************
39  */
43  DISS_EVT_VALUE_REQ_IND = DIS_EVT_CODE +1,
44 };
45 
48 {
67 
68  BLE_DISC_CHAR_MAX,
69 };
70 
73 {
92 
95 };
96 
97 /*
98  * Structures
99  ****************************************************************************************
100  */
101 typedef struct
102 {
104  uint8_t conidx;
105 
107  uint8_t value;
108 } evt_value_req_ind_t;
109 
110 typedef struct
111 {
113  ble_svc_t svc;
115  ble_char_inf_t chars[BLE_DISC_CHAR_MAX];
116 } ble_disc_content_t;
117 
119 typedef struct
120 {
123 
124  /*The following params are for ANPS only*/
125 
128 
130  enum ble_att_perm sec_lvl;
131 
133  uint16_t features;
134 } ble_dis_prf_t;
135 
136 typedef struct
137 {
139  uint8_t value;
141  uint8_t length;
143  uint8_t data[];
144 } ble_diss_set_value_req_t;
145 
147 typedef struct
148 {
150  uint8_t value;
152  uint8_t length;
154  uint8_t data[];
156 
157 /*
158  * APIs
159  ****************************************************************************************
160  */
161 
162 /*
163  * DIS Client Functions
164  ****************************************************************************************
165  */
166 
179 int in_ble_disc_add(void *hdl, ble_dis_prf_t *p_prf, comp_cb callback) ;
180 
196 int in_ble_disc_enable(void *hdl, int conidx, int con_type, ble_disc_content_t *p_dis, comp_cb callback) ;
197 
211 int in_ble_disc_read_char(void *hdl, int conidx, int char_code, ble_att_info_t *p_att, comp_cb callback) ;
212 
213 /*
214  * DIS Server Functions
215  ****************************************************************************************
216  */
217 
230 int in_ble_diss_add(void *hdl, ble_dis_prf_t *p_prf, comp_cb callback);
231 
244 int in_ble_diss_set_value_req(void *hdl, int conidx, ble_diss_set_value_req_t *p_req, comp_cb callback) ;
245 
257 int in_ble_diss_set_value_cfm(void *hdl, int conidx, ble_diss_value_cfm_t *p_cfm) ;
258 
259 
261 
262 #endif /* IN_BLE_PRF_DIS_H */
263 
Serial Number.
Definition: in_ble_prf_dis.h:54
ble_dis_evt
Dis event.
Definition: in_ble_prf_dis.h:41
Indicate if Hardware Revision String Char. supports indications.
Definition: in_ble_prf_dis.h:81
SW Revision Number.
Definition: in_ble_prf_dis.h:60
ble_att_perm
Definition: in_ble_att.h:63
System Identifier Name.
Definition: in_ble_prf_dis.h:62
Peer device request to get profile attribute value,.
Definition: in_ble_prf_dis.h:43
bool multi_instance
If the service is multi-instance.
Definition: in_ble_prf_dis.h:122
Parameters for the database creation.
Definition: in_ble_prf_dis.h:119
All features are supported.
Definition: in_ble_prf_dis.h:94
int in_ble_diss_set_value_req(void *hdl, int conidx, ble_diss_set_value_req_t *p_req, comp_cb callback)
Set the value of an attribute - Request.
Indicate if System ID Char. is writable.
Definition: in_ble_prf_dis.h:87
Indicate if IEEE Char. is writable.
Definition: in_ble_prf_dis.h:89
IEEE Certificate.
Definition: in_ble_prf_dis.h:64
characteristic info
Definition: in_ble_prf.h:195
Manufacturer Name.
Definition: in_ble_prf_dis.h:50
service handles
Definition: in_ble_prf.h:171
FW Revision Number.
Definition: in_ble_prf_dis.h:58
Attribute information.
Definition: in_ble_prf.h:158
Indicate if Serial Number String Char. is supported.
Definition: in_ble_prf_dis.h:79
int in_ble_diss_add(void *hdl, ble_dis_prf_t *p_prf, comp_cb callback)
Add DIS server service.
Indicate if Model Number String Char. is supported.
Definition: in_ble_prf_dis.h:77
Indicate if Software Revision String Char. is writable.
Definition: in_ble_prf_dis.h:85
uint8_t value
Requested value.
Definition: in_ble_prf_dis.h:150
Model Number.
Definition: in_ble_prf_dis.h:52
Plug and Play Identifier.
Definition: in_ble_prf_dis.h:66
int in_ble_disc_enable(void *hdl, int conidx, int con_type, ble_disc_content_t *p_dis, comp_cb callback)
Enable DIS client servie.
ble_diss_features
Database Configuration Flags.
Definition: in_ble_prf_dis.h:72
Indicate if PnP ID Char. is writable.
Definition: in_ble_prf_dis.h:91
bool check_enc_key_size
If let the service check whether encryption key size is 16bytes (more security).
Definition: in_ble_prf_dis.h:127
Peer device value of requested attribute.
Definition: in_ble_prf_dis.h:147
uint16_t features
Database configuration.
Definition: in_ble_prf_dis.h:133
HW Revision Number.
Definition: in_ble_prf_dis.h:56
int in_ble_disc_add(void *hdl, ble_dis_prf_t *p_prf, comp_cb callback)
Add DIS client service.
Indicate if Manufacturer Name String Char. is supported.
Definition: in_ble_prf_dis.h:75
ble_dis_char
DIS char code.
Definition: in_ble_prf_dis.h:47
int in_ble_disc_read_char(void *hdl, int conidx, int char_code, ble_att_info_t *p_att, comp_cb callback)
Enable DIS client servie.
Indicate if Firmware Revision String Char. is writable.
Definition: in_ble_prf_dis.h:83
uint8_t length
Value length.
Definition: in_ble_prf_dis.h:152
int in_ble_diss_set_value_cfm(void *hdl, int conidx, ble_diss_value_cfm_t *p_cfm)
Peer device value of requested attribute confirmed.