esls_c.h
Go to the documentation of this file.
1 /**
2  *****************************************************************************************
3  *
4  * @file esls_c.h
5  *
6  * @brief Electronic Shelf Label AP Client API
7  *
8  *****************************************************************************************
9  * @attention
10  #####Copyright (c) 2019 GOODIX
11  All rights reserved.
12 
13  Redistribution and use in source and binary forms, with or without
14  modification, are permitted provided that the following conditions are met:
15  * Redistributions of source code must retain the above copyright
16  notice, this list of conditions and the following disclaimer.
17  * Redistributions in binary form must reproduce the above copyright
18  notice, this list of conditions and the following disclaimer in the
19  documentation and/or other materials provided with the distribution.
20  * Neither the name of GOODIX nor the names of its contributors may be used
21  to endorse or promote products derived from this software without
22  specific prior written permission.
23 
24  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
28  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  POSSIBILITY OF SUCH DAMAGE.
35  *****************************************************************************************
36  */
37 
38 /**
39  * @addtogroup BLE_SRV BLE Services
40  * @{
41  */
42 
43 /**
44  * @defgroup Electronic Shelf Label AP Client (ESLS_C)
45  * @{
46  * @brief Electronic Shelf Label Client module.
47  *
48  * @details The Electronic Shelf Label Client contains the APIs and types, which can be used by the
49  * application to discovery of Heart Rate Service of peer and interact with it.
50  *
51  * The application must provide an event handler to register, then call \ref esls_client_init().
52  * After Heart Rate Service Client discoveries peer Electronic Shelf Label Service, application can call
53  * \ref esls_c_ctrl_point_notify_set(), then will config peer service resource,
54  * also can call \ref esls_c_esl_key_set() and \ref esls_c_disp_info_read() to set device key, or get device infor.
55  */
56 
57 #ifndef __ESLS_C_H__
58 #define __ESLS_C_H__
59 
60 #include "gr_includes.h"
61 #include "ble_prf_types.h"
62 #include "custom_config.h"
63 #include <stdint.h>
64 #include <stdbool.h>
65 #include "pawr_adv.h"
66 
67 /**
68  * @defgroup ESLS_C_MACRO Defines
69  * @{
70  */
71 #define ESL_CTL_PT_TLV_MAX_LEN 17 /**< Value for MAX esl TlV data len. */
72 
73 #define ESL_TLV_CMD_TAG(OPCODE) (OPCODE & 0xF)
74 #define ESL_TLV_CMD_LEN(OPCODE) ((OPCODE>>4) & 0xF)
75 
76 #define ESL_TLV_CMD_CHECK(OPCODE, length) ((ESL_TLV_CMD_LEN(OPCODE)==(length -2))?true:false)
77 
78 /** Offset for basic state bits. */
79 #define ESL_BASIC_STATE_SERV_NEED_POS 0
80 #define ESL_BASIC_STATE_SYNC_POS 1
81 #define ESL_BASIC_STATE_ACTIVE_LED_POS 2
82 #define ESL_BASIC_STATE_LED_UPDATE_POS 3
83 #define ESL_BASIC_STATE_DISP_UPDATE_POS 4
84 
85 #define ESL_ADDR_ESL_ID_BROAD_ADDR 0xFF /**<The value 0xFF is reserved for the Broadcast Address. */
86 #define ESL_ADDR_INVALID_GRP_ID 0xFF /**<The value 0xFF is reserved for the Invalid Group Address. */
87 
88 /** @} */
89 
90 /**
91  * @defgroup ESLS_C_ENUM Enumerations
92  * @{
93  */
94 /**@brief Values for The ESL Control Point characteristic command procedure. */
95 typedef enum
96 {
97  ESL_CMD_OPCODE_PING = 0x00, /**< The ESL Control Point characteristic command procedure is ping. */
98  ESL_CMD_OPCODE_UNASSOCIATE_AP, /**< The ESL Control Point characteristic command procedure is Unassociate from AP. */
99  ESL_CMD_OPCODE_SRV_RST, /**< The ESL Control Point characteristic command procedure is Service Reset. */
100  ESL_CMD_OPCODE_FACTORY_RST, /**< The ESL Control Point characteristic command procedure is Factory Reset. */
101  ESL_CMD_OPCODE_UPDATE_COMP, /**< The ESL Control Point characteristic command procedure is Update Complete. */
102  ESL_CMD_OPCODE_RD_SENSOR_DATA = 0x10, /**< The ESL Control Point characteristic command procedure is Read Sensor Data. */
103  ESL_CMD_OPCODE_REFRESH_DISP, /**< The ESL Control Point characteristic command procedure is Refresh Display. */
104  ESL_CMD_OPCODE_DISP_IMAGE = 0x20, /**< The ESL Control Point characteristic command procedure is Display Image. */
105  ESL_CMD_OPCODE_DISP_TIM_IMAGE = 0x60, /**< The ESL Control Point characteristic command procedure is Display Timed Image. */
106  ESL_CMD_OPCODE_LED_CTL = 0xB0, /**< The ESL Control Point characteristic command procedure is LED Control. */
107  ESL_CMD_OPCODE_LED_TIM_CTL = 0xF0, /**< The ESL Control Point characteristic command procedure is LED Timed Control. */
110 
111 /** @brief The Error response has a single parameter that contains an error code .**/
112 typedef enum
113 {
114  ESL_RSP_ERR_CODE_RFU = 0x00, /**< Reserved for Future Use. */
115  ESL_RSP_ERR_CODE_UNSPEC, /**< Any error condition that is not covered by a specific error code below. */
116  ESL_RSP_ERR_CODE_INVALID_OPCODE, /**< The opcode was not recognized. */
117  ESL_RSP_ERR_CODE_INVALID_STATE, /**< The request was not valid for the present ESL state. */
118  ESL_RSP_ERR_CODE_INVALID_IMAGE_IDX, /**< The Image_Index value was out of range. */
119  ESL_RSP_ERR_CODE_IMAGE_NOT_AVAILABLE, /**< The requested image contained no image data. */
120  ESL_RSP_ERR_CODE_INVALID_PARAM, /**< The parameter value(s) or length did not match the opcode. */
121  ESL_RSP_ERR_CODE_CAPACITY_LIMIT, /**< The required response could not be sent as it would exceed the payload size limit. */
122  ESL_RSP_ERR_CODE_INSUFF_BATTERY, /**< The request could not be processed because of a lack of battery charge. */
123  ESL_RSP_ERR_CODE_INSUFF_RESOURCE, /**< The request could not be processed because of a lack of resources. This may be a temporary condition.. */
124  ESL_RSP_ERR_CODE_RETRY, /**< The ESL is temporarily unable to give a full response (e.g., because the required sensor hardware was asleep) and the AP is asked to try the same command again. */
125  ESL_RSP_ERR_CODE_QUEUE_FULL, /**< The ESL is temporarily unable to add a further timed command to the queue of pending commands¡ªthe queue has reached its limit. */
126  ESL_RSP_ERR_CODE_IMPLAUSIBLE_ABS_TIM, /**< The Absolute Time parameter value in the command is implausible. */
127  ESL_RSP_ERR_CODE_VEND_BEGIN = 0xF0, /**< Error codes defined by a vendor. */
128  ESL_RSP_ERR_CODE_VEND_NO_ERR = 0xFF, /**< Error codes defined by a vendor to represent no error. */
129  //ESL_RSP_ERR_CODE_VEND_END = 0xFF, /**< Error codes defined by a vendor. */
130  ESL_RSP_ERR_CODE_MAX = 0x100, /**< Error codes defined MAX. */
132 
133 /** @brief The ESL Control Point characteristic response behavior**/
134 typedef enum
135 {
136  ESL_RSP_OPCODE_ERR = 0x00, /**< The command could not be processed successfully. */
137  ESL_RSP_OPCODE_LED_STATE, /**< Acknowledgment of a request to control an LED. */
138  ESL_RSP_OPCODE_BASIC_STATE = 0x10, /**< General acknowledgment containing ESL status data. */
139  ESL_RSP_OPCODE_DISP_STATE = 0x11, /**< Acknowledgment of a request to display an image. */
140  ESL_RSP_OPCODE_SENSOR_TAG = 0x0E, /**< Sensor report. */
141  ESL_RSP_OPCODE_VEND_TAG = 0x0F, /**< Response data as specified by the vendor of the ESL. */
143 
144 /**@brief Electronic Shelf Label Key Material type. */
145 typedef enum
146 {
147  ESLS_C_AP_SYNC_KEY_FLAG, /**< The AP Sync Key Material. */
148  ESLS_C_ESL_RSP_KEY_FLAG, /**< The ESL Response Key Material. */
151 
152 /**@brief Electronic Shelf Label User event to APP. */
153 typedef enum
154 {
155  ESLS_C_EVT_INVALID, /**< ESLS Client invalid event. */
156  ESLS_C_EVT_DISCOVERY_COMPLETE, /**< ESLS Client has found ESLS service and its characteristics. */
157  ESLS_C_EVT_DISCOVERY_FAIL, /**< ESLS Client found ESLS service failed because of invalid operation or no found at the peer. */
158  ESLS_C_EVT_ESL_ADDR_SET_SUCCESS, /**< ESLS Client has set ESL Server Addr. */
159  ESLS_C_EVT_AP_SYNC_KEY_SET_SUCCESS, /**< ESLS Client has set AP Sync Key . */
160  ESLS_C_EVT_ESL_RSP_KEY_SET_SUCCESS, /**< ESLS Client has set ESL Response Key . */
161  ESLS_C_EVT_ESL_ABS_TIM_SET_SUCCESS, /**< ESLS Client has set ESL Current Absolute Time. */
162  ESLS_C_EVT_ESL_DISP_READ_INFO, /**< ESLS Client read ESL Display Information . */
163  ESLS_C_EVT_ESL_IMAGE_READ_INFO, /**< ESLS Client read ESL Image Information. */
164  ESLS_C_EVT_ESL_SENSOR_READ_INFO, /**< ESLS Client read ESL Sensor Information. */
165  ESLS_C_EVT_ESL_LED_READ_INFO, /**< ESLS Client read ESL LED Information. */
166  ESLS_C_EVT_CTRL_POINT_SET_RSP, /**< ESLS Client has sent command from control point. */
167  ESLS_C_EVT_CTRL_POINT_CCCD_SET, /**< ESLS Client has set Control Point completely. */
168  ESLS_C_EVT_CTRL_POINT_RSP_RECEIVE, /**< ESLS Client has reviced command response from control point by connection. */
169  ESLS_C_EVT_ESL_SYNC_RSP_RECEIVE, /**< ESLS Client has reviced command response from control point by synchronization. */
170  ESLS_C_EVT_WRITE_OP_ERR, /**< Error occured when ESLS Client writen to peer. */
172 
173 /**@brief Values for contrl point vendor command and response. */
174 typedef enum
175 {
176  ESL_VENDOR_REQ_DEVICE_NAME, /**< The ESL profile vendor command to request peer device name. */
177  ESL_VENDOR_RSP_DEVICE_NAME, /**< The ESL profile has received peer device name. */
178  ESL_VENDOR_REQ_BD_ADDR, /**< The ESL profile vendor command to request peer device bd_addr. */
179  ESL_VENDOR_RSP_BD_ADDR, /**< The ESL profile has received peer device bd_addr. */
180  ESL_VENDOR_IMAGE_START_REQ, /**< The ESL profile vendor command to request start image transport. */
181  ESL_VENDOR_IMAGE_START_RSP, /**< The ESL profile vendor command to response start image transport. */
182  ESL_VENDOR_IMAGE_END_NTF, /**< The ESL profile vendor command to notify image transport end. */
185 
186 /**@brief Values for contrl point vendor command data error code. */
187 typedef enum
188 {
189  ESL_VENDOR_DATA_NO_ERR, /**< The ESL profile vendor command data no error. */
190  ESL_VENDOR_DATA_ERR_CKSUM, /**< The ESL profile vendor command data checksum fail. */
191  ESL_VENDOR_DATA_ERR_LEN, /**< The ESL profile vendor command data length error. */
193 
194 /**@brief Values for LED type enumeration. */
195 typedef enum
196 {
197  led_sRGB, /**< An sRGB LED is a multi-color LED that can change color.*/
198  led_mono, /**< A monochrome LED is a single-color LED.*/
199 }led_type_t;
200 
201 /** @} */
202 
203 /**
204  * @defgroup ESLC_STRUCT Structures
205  * @{
206  */
207 
208 /**@brief Handles on the connected peer device needed to interact with it. */
209 typedef struct
210 {
211  uint16_t esls_srvc_start_handle; /**< ESL Service start handle. */
212  uint16_t esls_srvc_end_handle; /**< ESL Service end handle. */
213  uint16_t esls_addr_handle; /**< ESL address characteristic Value handle which has been got from peer. */
214  uint16_t esls_ap_sync_key_handle; /**< ESL AP Sync Key characteristic Value handle which has been got from peer. */
215  uint16_t esls_rsp_key_handle; /**< ESL esl response key characteristic Value handle which has been got from peer. */
216  uint16_t esls_current_abs_time_handle; /**< ESL current absolute time characteristic Value handle which has been got from peer. */
217  uint16_t esls_display_handle; /**< ESL display information characteristic Value handle which has been got from peer. */
218  uint16_t esls_image_handle; /**< ESL image information characteristic Value handle which has been got from peer. */
219  uint16_t esls_sensor_handle; /**< ESL Sensor information characteristic Value handle which has been got from peer. */
220  uint16_t esls_led_handle; /**< ESL LED information characteristic Value handle which has been got from peer. */
221  uint16_t esls_ctrl_point_handle; /**< ESL Control Point characteristic Value handle which has been got from peer. */
222  uint16_t esls_ctrl_point_cccd_handle; /**< ESL CCCD handle has been got from peer. */
224 
225 /**@brief Electronic Shelf Label LED infor type. */
226 typedef struct
227 {
228  uint8_t red:2;
229  uint8_t green:2;
230  uint8_t blue:2;
231  /*0b00: sRGB; 0b01:Monochrome*/
232  uint8_t type:2;
234 
235 /**@brief Electronic Shelf Label Client event. */
236 typedef struct
237 {
238  uint8_t conn_idx; /**< The connection index. */
239  uint8_t grp_id; /**< The group id . */
240  uint8_t esl_id; /**< The esl id. */
241  esls_c_evt_type_t evt_type; /**< ESL Client event type. */
242  uint16_t length; /**< length of event type data. */
243  const uint8_t *p_value; /**< data of event type. */
244 } esls_c_evt_t;
245 
246 /** @} */
247 
248 /**
249  * @defgroup ESLS_C_TYPE DEF Typedefs
250  * @{
251  */
252 /**@brief Electronic Shelf Label Client event handler type. */
253 typedef void (*esls_c_evt_handler_t)(esls_c_evt_t *p_evt);
254 /** @} */
255 
256 /**
257  * @defgroup ESLS_C_FUNCTION Functions
258  * @{
259  */
260 
261 /**
262  *****************************************************************************************
263  * @brief Register ESLS Client event handler.
264  *
265  * @param[in] evt_handler: Electronic Shelf Label Client event handler.
266  *
267  * @return Result of initialization.
268  *****************************************************************************************
269  */
271 
272 /**
273  *****************************************************************************************
274  * @brief Set ESL AP PAwR adv paramters.
275  *
276  * @param[in] adv_idx: ESL PAwR advertising idx.
277  * @param[in] per_adv_params_p: ESL PAwR advertising parameter.
278  *
279  * @return Result of set.
280  *****************************************************************************************
281  */
282 sdk_err_t esl_ap_adv_param_fast_set(uint8_t adv_idx, struct ble_per_adv_param_t *per_adv_params_p);
283 
284 /**
285  *****************************************************************************************
286  * @brief Capture PAwR events on BLE.
287  *
288  * @param[in] p_evt: Event pointer on BLE.
289  *****************************************************************************************
290  */
292 
293 /**
294  *****************************************************************************************
295  * @brief Set ESL AP PAwR subevt data buffer, the subevt data will temporarily store here until it's sent.
296  *
297  * @param[in] esl_sent_data_buff: subevt data buffer.
298  * @param[in] grp_number: subevt data buffer arr number.This number should be equal to PAwR num_subevts.
299  *
300  * @return Result of set.
301  *****************************************************************************************
302  */
303 sdk_err_t esls_c_esl_sent_buffer_register(pawr_sent_data_arr_t *esl_sent_data_buff, uint8_t grp_number);
304 
305 /**
306  *****************************************************************************************
307  * @brief Discovery Electronic Shelf Label service on peer.
308  *
309  * @param[in] conn_idx: Index of connection.
310  *
311  * @return Operation result.
312  *****************************************************************************************
313  */
315 
316 /**
317  *****************************************************************************************
318  * @brief Enable or disable peer Electronic Shelf Label characteristic notify.
319  *
320  * @param[in] conn_idx: Index of connection.
321  * @param[in] is_enable: True or false.
322  *
323  * @return Operation result.
324  *****************************************************************************************
325  */
326 sdk_err_t esls_c_ctrl_point_notify_set(uint8_t conn_idx, bool is_enable);
327 
328 /**
329  *****************************************************************************************
330  * @brief Set Electronic Shelf Label service esl address characteristic.
331  *
332  * @param[in] conn_idx: Index of connection.
333  * @param[in] esl_id: esl index.
334  * @param[in] group_id: esl group index.
335  *
336  * @return Operation result.
337  *****************************************************************************************
338  */
339 sdk_err_t esls_c_esl_addr_set(uint8_t conn_idx, uint8_t esl_id, uint8_t group_id);
340 
341 /**
342  *****************************************************************************************
343  * @brief Set Electronic Shelf Label service key material characteristic.
344  *
345  * @param[in] conn_idx: Index of connection.
346  * @param[in] key_flag: key type.
347  * @param[in] session_key: session key if the key type.
348  * @param[in] iv: iv of the key type.
349  *
350  * @return Operation result.
351  *****************************************************************************************
352  */
353 sdk_err_t esls_c_esl_key_set(uint8_t conn_idx, esls_c_key_type_t key_flag, uint8_t session_key[16], uint8_t iv[8]);
354 
355 /**
356  *****************************************************************************************
357  * @brief Set Electronic Shelf Label service current absolute time characteristic.
358  *
359  * @param[in] conn_idx: Index of connection.
360  * @param[in] abs_time: current absolute time.
361  *
362  * @return Operation result.
363  *****************************************************************************************
364  */
365 sdk_err_t esls_c_esl_current_abs_time_set(uint8_t conn_idx, uint32_t abs_time);
366 
367 /**
368  *****************************************************************************************
369  * @brief Set Electronic Shelf Label service display information characteristic.
370  *
371  * @param[in] conn_idx: Index of connection.
372  *
373  * @return Operation result.
374  *****************************************************************************************
375  */
377 
378 /**
379  *****************************************************************************************
380  * @brief Set Electronic Shelf Label service image information characteristic.
381  *
382  * @param[in] conn_idx: Index of connection.
383  *
384  * @return Operation result.
385  *****************************************************************************************
386  */
388 
389 /**
390  *****************************************************************************************
391  * @brief Set Electronic Shelf Label service sensor information characteristic.
392  *
393  * @param[in] conn_idx: Index of connection.
394  *
395  * @return Operation result.
396  *****************************************************************************************
397  */
399 
400 /**
401  *****************************************************************************************
402  * @brief Set Electronic Shelf Label service led information characteristic.
403  *
404  * @param[in] conn_idx: Index of connection.
405  *
406  * @return Operation result.
407  *****************************************************************************************
408  */
409 sdk_err_t esls_c_led_info_read(uint8_t conn_idx);
410 
411 /**
412  *****************************************************************************************
413  * @brief Sent ESL ping cmd by Electronic Shelf Label service control point characteristic.
414  *
415  * @param[in] conn_idx: Index of connection.
416  * @param[in] esl_id: esl index.
417  *
418  * @return Operation result.
419  *****************************************************************************************
420  */
421 sdk_err_t esls_c_esl_ping(uint8_t conn_idx, uint8_t esl_id);
422 
423 /**
424  *****************************************************************************************
425  * @brief Sent ESL unassociate from AP cmd by Electronic Shelf Label service control point characteristic.
426  *
427  * @param[in] conn_idx: Index of connection.
428  * @param[in] esl_id: esl index.
429  *
430  * @return Operation result.
431  *****************************************************************************************
432  */
433 sdk_err_t esls_c_esl_unassociate_from_ap(uint8_t conn_idx, uint8_t esl_id);
434 
435 /**
436  *****************************************************************************************
437  * @brief Sent ESL service reset cmd by Electronic Shelf Label service control point characteristic.
438  *
439  * @param[in] conn_idx: Index of connection.
440  * @param[in] esl_id: esl index.
441  *
442  * @return Operation result.
443  *****************************************************************************************
444  */
445 sdk_err_t esls_c_esl_service_reset(uint8_t conn_idx, uint8_t esl_id);
446 
447 /**
448  *****************************************************************************************
449  * @brief Sent ESL factory reset cmd by Electronic Shelf Label service control point characteristic.
450  *
451  * @param[in] conn_idx: Index of connection.
452  * @param[in] esl_id: esl index.
453  *
454  * @return Operation result.
455  *****************************************************************************************
456  */
457 sdk_err_t esls_c_esl_factory_reset(uint8_t conn_idx, uint8_t esl_id);
458 
459 /**
460  *****************************************************************************************
461  * @brief Sent ESL update complete cmd by Electronic Shelf Label service control point characteristic.
462  *
463  * @param[in] conn_idx: Index of connection.
464  * @param[in] esl_id: esl index.
465  *
466  * @return Operation result.
467  *****************************************************************************************
468  */
469 sdk_err_t esls_c_esl_update_complete(uint8_t conn_idx, uint8_t esl_id);
470 
471 /**
472  *****************************************************************************************
473  * @brief Sent ESL read sensor data cmd by Electronic Shelf Label service control point characteristic.
474  *
475  * @param[in] conn_idx: Index of connection.
476  * @param[in] esl_id: esl index.
477  * @param[in] sensor_idx: sensor index.
478  *
479  * @return Operation result.
480  *****************************************************************************************
481  */
482 sdk_err_t esls_c_esl_read_sensor_data(uint8_t conn_idx, uint8_t esl_id, uint8_t sensor_idx);
483 
484 /**
485  *****************************************************************************************
486  * @brief Sent ESL refresh display cmd by Electronic Shelf Label service control point characteristic.
487  *
488  * @param[in] conn_idx: Index of connection.
489  * @param[in] esl_id: esl index.
490  * @param[in] disp_idx: display index.
491  *
492  * @return Operation result.
493  *****************************************************************************************
494  */
495 sdk_err_t esls_c_esl_refresh_disp(uint8_t conn_idx, uint8_t esl_id, uint8_t disp_idx);
496 
497 /**
498  *****************************************************************************************
499  * @brief Sent ESL display image cmd by Electronic Shelf Label service control point characteristic.
500  *
501  * @param[in] conn_idx: Index of connection.
502  * @param[in] esl_id: esl index.
503  * @param[in] disp_idx: display index.
504  * @param[in] image_idx: image index.
505  *
506  * @return Operation result.
507  *****************************************************************************************
508  */
509 sdk_err_t esls_c_esl_disp_image(uint8_t conn_idx, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx);
510 
511 /**
512  *****************************************************************************************
513  * @brief Sent ESL display image time cmd by Electronic Shelf Label service control point characteristic.
514  *
515  * @param[in] conn_idx: Index of connection.
516  * @param[in] esl_id: esl index.
517  * @param[in] disp_idx: display index.
518  * @param[in] image_idx: image index.
519  * @param[in] abs_tim: Time when the display changes state.
520  *
521  * @return Operation result.
522  *****************************************************************************************
523  */
524 sdk_err_t esls_c_esl_disp_time_image(uint8_t conn_idx, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx, uint32_t abs_tim);
525 
526 /**
527  *****************************************************************************************
528  * @brief Sent ESL LED control cmd by Electronic Shelf Label service control point characteristic.
529  *
530  * @param[in] conn_idx: Index of connection.
531  * @param[in] esl_id: esl index.
532  * @param[in] led_idx: led index.
533  * @param[in] color_RGB_bright: The values of the Color_Red, Color_Green, Color_Blue, and brightness fields.
534  * @param[in] flashing_pattern: The Flashing_Pattern fields contain values that indicate the flashing pattern setting of the LED.
535  * @param[in] repeat_type: The Repeat_Type enables the time for which the flashing pattern shall be displayed to be specified.
536  * @param[in] repeat_duration: Tepeat duration
537  *
538  * @return Operation result.
539  *****************************************************************************************
540  */
541 sdk_err_t esls_c_esl_led_ctl(uint8_t conn_idx,
542  uint8_t esl_id,
543  uint8_t led_idx,
544  uint8_t color_RGB_bright,
545  uint8_t flashing_pattern[7],
546  uint8_t repeat_type,
547  uint16_t repeat_duration);
548 
549 /**
550  *****************************************************************************************
551  * @brief Sent ESL LED control cmd by Electronic Shelf Label service control point characteristic.
552  *
553  * @param[in] conn_idx: Index of connection.
554  * @param[in] esl_id: esl index.
555  * @param[in] led_idx: led index.
556  * @param[in] color_RGB_bright: The values of the Color_Red, Color_Green, Color_Blue, and brightness fields.
557  * @param[in] flashing_pattern: The Flashing_Pattern fields contain values that indicate the flashing pattern setting of the LED.
558  * @param[in] repeat_type: The Repeat_Type enables the time for which the flashing pattern shall be displayed to be specified.
559  * @param[in] repeat_duration: Tepeat duration.
560  * @param[in] abs_tim: Time when the led changes state.
561  *
562  * @return Operation result.
563  *****************************************************************************************
564  */
566  uint8_t esl_id,
567  uint8_t led_idx,
568  uint8_t color_RGB_bright,
569  uint8_t flashing_pattern[7],
570  uint8_t repeat_type,
571  uint16_t repeat_duration,
572  uint32_t abs_tim);
573 
574 /**
575  *****************************************************************************************
576  * @brief Sent ESL vendor cmd by Electronic Shelf Label service control point characteristic.
577  *
578  * @param[in] conn_idx: Index of connection.
579  * @param[in] esl_id: esl index.
580  * @param[in] value_length: vendor cmd data length.
581  * @param[in] ctrl_value_p: vendor cmd data.
582  *
583  * @return Operation result.
584  *****************************************************************************************
585  */
586 sdk_err_t esls_c_esl_vendor_cmd(uint8_t conn_idx, uint8_t esl_id, uint16_t value_length, uint8_t *ctrl_value_p);
587 
588 /**
589  *****************************************************************************************
590  * @brief Sent ESL ping cmd by Electronic Shelf Label PAwR Advertising subevt.
591  *
592  * @param[in] grp_id: group index.
593  * @param[in] sent_num: message will be sent times.
594  * @param[in] esl_id: esl index.
595  *
596  * @return Operation result.
597  *****************************************************************************************
598  */
599 sdk_err_t esls_c_esl_sync_ping(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id);
600 
601 /**
602  *****************************************************************************************
603  * @brief Sent ESL ESL unassociate from AP cmd by Electronic Shelf Label PAwR Advertising subevt.
604  *
605  * @param[in] grp_id: group index.
606  * @param[in] sent_num: message will be sent times.
607  * @param[in] esl_id: esl index.
608  *
609  * @return Operation result.
610  *****************************************************************************************
611  */
612 sdk_err_t esls_c_esl_sync_unassociate_from_ap(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id);
613 
614 /**
615  *****************************************************************************************
616  * @brief Sent ESL service reset cmd by Electronic Shelf Label PAwR Advertising subevt.
617  *
618  * @param[in] grp_id: group index.
619  * @param[in] sent_num: message will be sent times.
620  * @param[in] esl_id: esl index.
621  *
622  * @return Operation result.
623  *****************************************************************************************
624  */
625 sdk_err_t esls_c_esl_sync_service_reset(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id);
626 
627 /**
628  *****************************************************************************************
629  * @brief Sent ESL factory reset cmd by Electronic Shelf Label PAwR Advertising subevt.
630  *
631  * @param[in] grp_id: group index.
632  * @param[in] sent_num: message will be sent times.
633  * @param[in] esl_id: esl index.
634  *
635  * @return Operation result.
636  *****************************************************************************************
637  */
638 sdk_err_t esls_c_esl_sync_factory_reset(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id);
639 
640 /**
641  *****************************************************************************************
642  * @brief Sent ESL update complete cmd by Electronic Shelf Label PAwR Advertising subevt.
643  *
644  * @param[in] grp_id: group index.
645  * @param[in] sent_num: message will be sent times.
646  * @param[in] esl_id: esl index.
647  *
648  * @return Operation result.
649  *****************************************************************************************
650  */
651 sdk_err_t esls_c_esl_sync_update_complete(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id);
652 
653 /**
654  *****************************************************************************************
655  * @brief Sent ESL read sensor data cmd by Electronic Shelf Label PAwR Advertising subevt.
656  *
657  * @param[in] grp_id: group index.
658  * @param[in] sent_num: message will be sent times.
659  * @param[in] esl_id: esl index.
660  * @param[in] sensor_idx: sensor index.
661  *
662  * @return Operation result.
663  *****************************************************************************************
664  */
665 sdk_err_t esls_c_esl_sync_read_sensor_data(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t sensor_idx);
666 
667 /**
668  *****************************************************************************************
669  * @brief Sent ESL refresh display cmd by Electronic Shelf Label PAwR Advertising subevt.
670  *
671  * @param[in] grp_id: group index.
672  * @param[in] sent_num: message will be sent times.
673  * @param[in] esl_id: esl index.
674  * @param[in] disp_idx: display index.
675  *
676  * @return Operation result.
677  *****************************************************************************************
678  */
679 sdk_err_t esls_c_esl_sync_refresh_disp(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t disp_idx);
680 
681 /**
682  *****************************************************************************************
683  * @brief Sent ESL display image cmd by Electronic Shelf Label PAwR Advertising subevt.
684  *
685  * @param[in] grp_id: group index.
686  * @param[in] sent_num: message will be sent times.
687  * @param[in] esl_id: esl index.
688  * @param[in] disp_idx: display index.
689  * @param[in] image_idx: image index.
690  *
691  * @return Operation result.
692  *****************************************************************************************
693  */
694 sdk_err_t esls_c_esl_sync_disp_image(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx);
695 
696 /**
697  *****************************************************************************************
698  * @brief Sent ESL display image time cmd by Electronic Shelf Label PAwR Advertising subevt.
699  *
700  * @param[in] grp_id: group index.
701  * @param[in] sent_num: message will be sent times.
702  * @param[in] esl_id: esl index.
703  * @param[in] disp_idx: display index.
704  * @param[in] image_idx: image index.
705  * @param[in] abs_tim: Time when the display changes state.
706  *
707  * @return Operation result.
708  *****************************************************************************************
709  */
710 sdk_err_t esls_c_esl_sync_disp_time_image(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx, uint32_t abs_tim);
711 
712 /**
713  *****************************************************************************************
714  * @brief Sent ESL LED control cmd by Electronic Shelf Label PAwR Advertising subevt.
715  *
716  * @param[in] grp_id: group index.
717  * @param[in] sent_num: message will be sent times.
718  * @param[in] esl_id: esl index.
719  * @param[in] led_idx: led index.
720  * @param[in] color_RGB_bright: The values of the Color_Red, Color_Green, Color_Blue, and brightness fields.
721  * @param[in] flashing_pattern: The Flashing_Pattern fields contain values that indicate the flashing pattern setting of the LED.
722  * @param[in] repeat_type: The Repeat_Type enables the time for which the flashing pattern shall be displayed to be specified.
723  * @param[in] repeat_duration: Tepeat duration.
724  *
725  * @return Operation result.
726  *****************************************************************************************
727  */
728 sdk_err_t esls_c_esl_sync_led_ctl(uint8_t grp_id, uint8_t sent_num,
729  uint8_t esl_id,
730  uint8_t led_idx,
731  uint8_t color_RGB_bright,
732  uint8_t flashing_pattern[7],
733  uint8_t repeat_type,
734  uint16_t repeat_duration);
735 
736 /**
737  *****************************************************************************************
738  * @brief Sent ESL LED control time cmd by Electronic Shelf Label PAwR Advertising subevt.
739  *
740  * @param[in] grp_id: group index.
741  * @param[in] sent_num: message will be sent times.
742  * @param[in] esl_id: esl index.
743  * @param[in] led_idx: led index.
744  * @param[in] color_RGB_bright: The values of the Color_Red, Color_Green, Color_Blue, and brightness fields.
745  * @param[in] flashing_pattern: The Flashing_Pattern fields contain values that indicate the flashing pattern setting of the LED.
746  * @param[in] repeat_type: The Repeat_Type enables the time for which the flashing pattern shall be displayed to be specified.
747  * @param[in] repeat_duration: Tepeat duration.
748  * @param[in] abs_tim: Time when the led changes state.
749  *
750  * @return Operation result.
751  *****************************************************************************************
752  */
753 sdk_err_t esls_c_esl_sync_led_time_ctl(uint8_t grp_id, uint8_t sent_num,
754  uint8_t esl_id,
755  uint8_t led_idx,
756  uint8_t color_RGB_bright,
757  uint8_t flashing_pattern[7],
758  uint8_t repeat_type,
759  uint16_t repeat_duration,
760  uint32_t abs_tim);
761 
762 /**
763  *****************************************************************************************
764  * @brief Sent ESL vendor cmd by Electronic Shelf Label PAwR Advertising subevt.
765  *
766  * @param[in] grp_id: group index.
767  * @param[in] esl_id: esl index.
768  * @param[in] data: vendor cmd data.
769  * @param[in] data_len: vendor cmd data length.
770  * @param[in] sent_num: message will be sent times.
771  *
772  * @return Operation result.
773  *****************************************************************************************
774  */
775 sdk_err_t esls_c_esl_sync_vendor_cmd(uint8_t grp_id, uint8_t esl_id, uint8_t *data, uint16_t data_len, uint8_t sent_num);
776 
777 /** @} */
778 
779 #endif
780 /** @} */
781 /** @} */
782 
ESL_VENDOR_IMAGE_END_NTF
@ ESL_VENDOR_IMAGE_END_NTF
Definition: esls_c.h:182
ESL_RSP_ERR_CODE_IMPLAUSIBLE_ABS_TIM
@ ESL_RSP_ERR_CODE_IMPLAUSIBLE_ABS_TIM
Definition: esls_c.h:126
ESLS_C_EVT_ESL_DISP_READ_INFO
@ ESLS_C_EVT_ESL_DISP_READ_INFO
Definition: esls_c.h:162
ESL_CMD_OPCODE_UPDATE_COMP
@ ESL_CMD_OPCODE_UPDATE_COMP
Definition: esls_c.h:101
ESL_RSP_ERR_CODE_INVALID_IMAGE_IDX
@ ESL_RSP_ERR_CODE_INVALID_IMAGE_IDX
Definition: esls_c.h:118
ESL_RSP_ERR_CODE_QUEUE_FULL
@ ESL_RSP_ERR_CODE_QUEUE_FULL
Definition: esls_c.h:125
esls_c_esl_sync_led_ctl
sdk_err_t esls_c_esl_sync_led_ctl(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t led_idx, uint8_t color_RGB_bright, uint8_t flashing_pattern[7], uint8_t repeat_type, uint16_t repeat_duration)
Sent ESL LED control cmd by Electronic Shelf Label PAwR Advertising subevt.
ESL_VENDOR_IMAGE_START_RSP
@ ESL_VENDOR_IMAGE_START_RSP
Definition: esls_c.h:181
esl_cmd_opcode_t
esl_cmd_opcode_t
Values for The ESL Control Point characteristic command procedure.
Definition: esls_c.h:96
esls_c_esl_sync_unassociate_from_ap
sdk_err_t esls_c_esl_sync_unassociate_from_ap(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id)
Sent ESL ESL unassociate from AP cmd by Electronic Shelf Label PAwR Advertising subevt.
esls_c_esl_vendor_cmd
sdk_err_t esls_c_esl_vendor_cmd(uint8_t conn_idx, uint8_t esl_id, uint16_t value_length, uint8_t *ctrl_value_p)
Sent ESL vendor cmd by Electronic Shelf Label service control point characteristic.
ESL_CMD_OPCODE_LED_CTL
@ ESL_CMD_OPCODE_LED_CTL
Definition: esls_c.h:106
ESLS_C_EVT_CTRL_POINT_SET_RSP
@ ESLS_C_EVT_CTRL_POINT_SET_RSP
Definition: esls_c.h:166
esls_c_handles_t::esls_srvc_start_handle
uint16_t esls_srvc_start_handle
Definition: esls_c.h:211
ESL_CMD_OPCODE_VEND_SPEC_TAG
@ ESL_CMD_OPCODE_VEND_SPEC_TAG
Definition: esls_c.h:108
esls_c_handles_t::esls_addr_handle
uint16_t esls_addr_handle
Definition: esls_c.h:213
esl_ap_adv_param_fast_set
sdk_err_t esl_ap_adv_param_fast_set(uint8_t adv_idx, struct ble_per_adv_param_t *per_adv_params_p)
Set ESL AP PAwR adv paramters.
ESLS_C_EVT_ESL_RSP_KEY_SET_SUCCESS
@ ESLS_C_EVT_ESL_RSP_KEY_SET_SUCCESS
Definition: esls_c.h:160
esls_c_disp_info_read
sdk_err_t esls_c_disp_info_read(uint8_t conn_idx)
Set Electronic Shelf Label service display information characteristic.
esls_c_esl_sync_led_time_ctl
sdk_err_t esls_c_esl_sync_led_time_ctl(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t led_idx, uint8_t color_RGB_bright, uint8_t flashing_pattern[7], uint8_t repeat_type, uint16_t repeat_duration, uint32_t abs_tim)
Sent ESL LED control time cmd by Electronic Shelf Label PAwR Advertising subevt.
led_mono
@ led_mono
Definition: esls_c.h:198
esls_c_evt_t::esl_id
uint8_t esl_id
Definition: esls_c.h:240
esls_c_esl_disp_image
sdk_err_t esls_c_esl_disp_image(uint8_t conn_idx, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx)
Sent ESL display image cmd by Electronic Shelf Label service control point characteristic.
esls_c_esl_sync_read_sensor_data
sdk_err_t esls_c_esl_sync_read_sensor_data(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t sensor_idx)
Sent ESL read sensor data cmd by Electronic Shelf Label PAwR Advertising subevt.
ESL_RSP_ERR_CODE_RETRY
@ ESL_RSP_ERR_CODE_RETRY
Definition: esls_c.h:124
esls_c_esl_led_time_ctl
sdk_err_t esls_c_esl_led_time_ctl(uint8_t conn_idx, uint8_t esl_id, uint8_t led_idx, uint8_t color_RGB_bright, uint8_t flashing_pattern[7], uint8_t repeat_type, uint16_t repeat_duration, uint32_t abs_tim)
Sent ESL LED control cmd by Electronic Shelf Label service control point characteristic.
esls_c_handles_t::esls_current_abs_time_handle
uint16_t esls_current_abs_time_handle
Definition: esls_c.h:216
ESL_CMD_OPCODE_REFRESH_DISP
@ ESL_CMD_OPCODE_REFRESH_DISP
Definition: esls_c.h:103
esls_c_led_infor_t::red
uint8_t red
Definition: esls_c.h:228
ESLS_C_EVT_ESL_ADDR_SET_SUCCESS
@ ESLS_C_EVT_ESL_ADDR_SET_SUCCESS
Definition: esls_c.h:158
ESL_RSP_OPCODE_VEND_TAG
@ ESL_RSP_OPCODE_VEND_TAG
Definition: esls_c.h:141
led_type_t
led_type_t
Values for LED type enumeration.
Definition: esls_c.h:196
esls_c_esl_current_abs_time_set
sdk_err_t esls_c_esl_current_abs_time_set(uint8_t conn_idx, uint32_t abs_time)
Set Electronic Shelf Label service current absolute time characteristic.
gr_includes.h
Include Files API.
esls_c_evt_handler_t
void(* esls_c_evt_handler_t)(esls_c_evt_t *p_evt)
Electronic Shelf Label Client event handler type.
Definition: esls_c.h:253
ESL_VENDOR_IMAGE_START_REQ
@ ESL_VENDOR_IMAGE_START_REQ
Definition: esls_c.h:180
ESL_VENDOR_DATA_ERR_CKSUM
@ ESL_VENDOR_DATA_ERR_CKSUM
Definition: esls_c.h:190
ESLS_C_EVT_ESL_IMAGE_READ_INFO
@ ESLS_C_EVT_ESL_IMAGE_READ_INFO
Definition: esls_c.h:163
esls_c_esl_disp_time_image
sdk_err_t esls_c_esl_disp_time_image(uint8_t conn_idx, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx, uint32_t abs_tim)
Sent ESL display image time cmd by Electronic Shelf Label service control point characteristic.
ESL_RSP_OPCODE_DISP_STATE
@ ESL_RSP_OPCODE_DISP_STATE
Definition: esls_c.h:139
esls_c_ctrl_point_notify_set
sdk_err_t esls_c_ctrl_point_notify_set(uint8_t conn_idx, bool is_enable)
Enable or disable peer Electronic Shelf Label characteristic notify.
ESLS_C_ESL_KEY_FLAG_MAX
@ ESLS_C_ESL_KEY_FLAG_MAX
Definition: esls_c.h:149
esls_c_esl_read_sensor_data
sdk_err_t esls_c_esl_read_sensor_data(uint8_t conn_idx, uint8_t esl_id, uint8_t sensor_idx)
Sent ESL read sensor data cmd by Electronic Shelf Label service control point characteristic.
ESL_RSP_ERR_CODE_RFU
@ ESL_RSP_ERR_CODE_RFU
Definition: esls_c.h:114
esl_rsp_opcode_t
esl_rsp_opcode_t
The ESL Control Point characteristic response behavior.
Definition: esls_c.h:135
esls_c_esl_ping
sdk_err_t esls_c_esl_ping(uint8_t conn_idx, uint8_t esl_id)
Sent ESL ping cmd by Electronic Shelf Label service control point characteristic.
esls_c_evt_t::p_value
const uint8_t * p_value
Definition: esls_c.h:243
ESL_RSP_OPCODE_SENSOR_TAG
@ ESL_RSP_OPCODE_SENSOR_TAG
Definition: esls_c.h:140
esls_c_handles_t::esls_srvc_end_handle
uint16_t esls_srvc_end_handle
Definition: esls_c.h:212
esls_c_handles_t::esls_ctrl_point_handle
uint16_t esls_ctrl_point_handle
Definition: esls_c.h:221
ESLS_C_EVT_ESL_ABS_TIM_SET_SUCCESS
@ ESLS_C_EVT_ESL_ABS_TIM_SET_SUCCESS
Definition: esls_c.h:161
ESL_RSP_ERR_CODE_INSUFF_BATTERY
@ ESL_RSP_ERR_CODE_INSUFF_BATTERY
Definition: esls_c.h:122
ESL_RSP_ERR_CODE_INVALID_STATE
@ ESL_RSP_ERR_CODE_INVALID_STATE
Definition: esls_c.h:117
esls_c_esl_led_ctl
sdk_err_t esls_c_esl_led_ctl(uint8_t conn_idx, uint8_t esl_id, uint8_t led_idx, uint8_t color_RGB_bright, uint8_t flashing_pattern[7], uint8_t repeat_type, uint16_t repeat_duration)
Sent ESL LED control cmd by Electronic Shelf Label service control point characteristic.
esls_c_esl_addr_set
sdk_err_t esls_c_esl_addr_set(uint8_t conn_idx, uint8_t esl_id, uint8_t group_id)
Set Electronic Shelf Label service esl address characteristic.
esls_c_handles_t::esls_led_handle
uint16_t esls_led_handle
Definition: esls_c.h:220
esls_c_esl_sent_buffer_register
sdk_err_t esls_c_esl_sent_buffer_register(pawr_sent_data_arr_t *esl_sent_data_buff, uint8_t grp_number)
Set ESL AP PAwR subevt data buffer, the subevt data will temporarily store here until it's sent.
ESL_RSP_ERR_CODE_INVALID_OPCODE
@ ESL_RSP_ERR_CODE_INVALID_OPCODE
Definition: esls_c.h:116
ESL_VENDOR_DATA_ERR_LEN
@ ESL_VENDOR_DATA_ERR_LEN
Definition: esls_c.h:191
esl_vendor_opcode_t
esl_vendor_opcode_t
Values for contrl point vendor command and response.
Definition: esls_c.h:175
ESL_RSP_OPCODE_LED_STATE
@ ESL_RSP_OPCODE_LED_STATE
Definition: esls_c.h:137
ESL_CMD_OPCODE_PING
@ ESL_CMD_OPCODE_PING
Definition: esls_c.h:97
esls_c_handles_t::esls_display_handle
uint16_t esls_display_handle
Definition: esls_c.h:217
ESL_RSP_ERR_CODE_CAPACITY_LIMIT
@ ESL_RSP_ERR_CODE_CAPACITY_LIMIT
Definition: esls_c.h:121
esls_c_esl_factory_reset
sdk_err_t esls_c_esl_factory_reset(uint8_t conn_idx, uint8_t esl_id)
Sent ESL factory reset cmd by Electronic Shelf Label service control point characteristic.
ESL_CMD_OPCODE_DISP_TIM_IMAGE
@ ESL_CMD_OPCODE_DISP_TIM_IMAGE
Definition: esls_c.h:105
ESL_RSP_ERR_CODE_VEND_BEGIN
@ ESL_RSP_ERR_CODE_VEND_BEGIN
Definition: esls_c.h:127
esls_c_image_info_read
sdk_err_t esls_c_image_info_read(uint8_t conn_idx)
Set Electronic Shelf Label service image information characteristic.
ESL_CMD_OPCODE_LED_TIM_CTL
@ ESL_CMD_OPCODE_LED_TIM_CTL
Definition: esls_c.h:107
esls_c_esl_sync_factory_reset
sdk_err_t esls_c_esl_sync_factory_reset(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id)
Sent ESL factory reset cmd by Electronic Shelf Label PAwR Advertising subevt.
ESL_CMD_OPCODE_UNASSOCIATE_AP
@ ESL_CMD_OPCODE_UNASSOCIATE_AP
Definition: esls_c.h:98
esls_c_handles_t::esls_ctrl_point_cccd_handle
uint16_t esls_ctrl_point_cccd_handle
Definition: esls_c.h:222
ESLS_C_EVT_CTRL_POINT_CCCD_SET
@ ESLS_C_EVT_CTRL_POINT_CCCD_SET
Definition: esls_c.h:167
esls_c_esl_key_set
sdk_err_t esls_c_esl_key_set(uint8_t conn_idx, esls_c_key_type_t key_flag, uint8_t session_key[16], uint8_t iv[8])
Set Electronic Shelf Label service key material characteristic.
ESL_VENDOR_REQ_BD_ADDR
@ ESL_VENDOR_REQ_BD_ADDR
Definition: esls_c.h:178
ESLS_C_EVT_DISCOVERY_COMPLETE
@ ESLS_C_EVT_DISCOVERY_COMPLETE
Definition: esls_c.h:156
esls_c_sensor_info_read
sdk_err_t esls_c_sensor_info_read(uint8_t conn_idx)
Set Electronic Shelf Label service sensor information characteristic.
ESL_RSP_OPCODE_BASIC_STATE
@ ESL_RSP_OPCODE_BASIC_STATE
Definition: esls_c.h:138
esls_c_esl_update_complete
sdk_err_t esls_c_esl_update_complete(uint8_t conn_idx, uint8_t esl_id)
Sent ESL update complete cmd by Electronic Shelf Label service control point characteristic.
ESLS_C_AP_SYNC_KEY_FLAG
@ ESLS_C_AP_SYNC_KEY_FLAG
Definition: esls_c.h:147
ESL_CMD_OPCODE_RD_SENSOR_DATA
@ ESL_CMD_OPCODE_RD_SENSOR_DATA
Definition: esls_c.h:102
ESL_RSP_ERR_CODE_INVALID_PARAM
@ ESL_RSP_ERR_CODE_INVALID_PARAM
Definition: esls_c.h:120
ble_prf_types.h
Profile/Service Common Types.
ESL_CMD_OPCODE_SRV_RST
@ ESL_CMD_OPCODE_SRV_RST
Definition: esls_c.h:99
ESLS_C_EVT_WRITE_OP_ERR
@ ESLS_C_EVT_WRITE_OP_ERR
Definition: esls_c.h:170
ESL_RSP_ERR_CODE_UNSPEC
@ ESL_RSP_ERR_CODE_UNSPEC
Definition: esls_c.h:115
sdk_err_t
uint16_t sdk_err_t
SDK API result type.
Definition: ble_error.h:290
esls_c_esl_sync_disp_image
sdk_err_t esls_c_esl_sync_disp_image(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx)
Sent ESL display image cmd by Electronic Shelf Label PAwR Advertising subevt.
ESLS_C_ESL_RSP_KEY_FLAG
@ ESLS_C_ESL_RSP_KEY_FLAG
Definition: esls_c.h:148
ESL_VENDOR_RSP_DEVICE_NAME
@ ESL_VENDOR_RSP_DEVICE_NAME
Definition: esls_c.h:177
esls_c_led_infor_t::green
uint8_t green
Definition: esls_c.h:229
ESL_VENDOR_RSP_BD_ADDR
@ ESL_VENDOR_RSP_BD_ADDR
Definition: esls_c.h:179
ESL_CMD_OPCODE_DISP_IMAGE
@ ESL_CMD_OPCODE_DISP_IMAGE
Definition: esls_c.h:104
esls_c_handles_t::esls_image_handle
uint16_t esls_image_handle
Definition: esls_c.h:218
ESL_RSP_ERR_CODE_INSUFF_RESOURCE
@ ESL_RSP_ERR_CODE_INSUFF_RESOURCE
Definition: esls_c.h:123
ESLS_C_EVT_AP_SYNC_KEY_SET_SUCCESS
@ ESLS_C_EVT_AP_SYNC_KEY_SET_SUCCESS
Definition: esls_c.h:159
esls_c_led_infor_t::type
uint8_t type
Definition: esls_c.h:232
esls_c_handles_t
Handles on the connected peer device needed to interact with it.
Definition: esls_c.h:210
esls_c_esl_unassociate_from_ap
sdk_err_t esls_c_esl_unassociate_from_ap(uint8_t conn_idx, uint8_t esl_id)
Sent ESL unassociate from AP cmd by Electronic Shelf Label service control point characteristic.
led_sRGB
@ led_sRGB
Definition: esls_c.h:197
esls_c_disc_srvc_start
sdk_err_t esls_c_disc_srvc_start(uint8_t conn_idx)
Discovery Electronic Shelf Label service on peer.
esls_c_evt_type_t
esls_c_evt_type_t
Electronic Shelf Label User event to APP.
Definition: esls_c.h:154
esls_c_handles_t::esls_rsp_key_handle
uint16_t esls_rsp_key_handle
Definition: esls_c.h:215
esls_c_esl_sync_refresh_disp
sdk_err_t esls_c_esl_sync_refresh_disp(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t disp_idx)
Sent ESL refresh display cmd by Electronic Shelf Label PAwR Advertising subevt.
ESL_RSP_ERR_CODE_VEND_NO_ERR
@ ESL_RSP_ERR_CODE_VEND_NO_ERR
Definition: esls_c.h:128
ESL_RSP_OPCODE_ERR
@ ESL_RSP_OPCODE_ERR
Definition: esls_c.h:136
ble_esl_pawr_evt_on_ble_capture
void ble_esl_pawr_evt_on_ble_capture(const ble_evt_t *p_evt)
Capture PAwR events on BLE.
esls_client_init
sdk_err_t esls_client_init(esls_c_evt_handler_t evt_handler)
Register ESLS Client event handler.
esls_c_led_infor_t::blue
uint8_t blue
Definition: esls_c.h:230
esls_c_esl_sync_vendor_cmd
sdk_err_t esls_c_esl_sync_vendor_cmd(uint8_t grp_id, uint8_t esl_id, uint8_t *data, uint16_t data_len, uint8_t sent_num)
Sent ESL vendor cmd by Electronic Shelf Label PAwR Advertising subevt.
esls_c_handles_t::esls_sensor_handle
uint16_t esls_sensor_handle
Definition: esls_c.h:219
esls_c_esl_sync_service_reset
sdk_err_t esls_c_esl_sync_service_reset(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id)
Sent ESL service reset cmd by Electronic Shelf Label PAwR Advertising subevt.
ble_evt_t
BLE Event Information.
Definition: ble_event.h:207
esls_c_esl_sync_ping
sdk_err_t esls_c_esl_sync_ping(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id)
Sent ESL ping cmd by Electronic Shelf Label PAwR Advertising subevt.
esls_c_led_infor_t
Electronic Shelf Label LED infor type.
Definition: esls_c.h:227
esls_c_evt_t::grp_id
uint8_t grp_id
Definition: esls_c.h:239
esls_c_esl_sync_update_complete
sdk_err_t esls_c_esl_sync_update_complete(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id)
Sent ESL update complete cmd by Electronic Shelf Label PAwR Advertising subevt.
ESL_VENDOR_OPCODE_MAX
@ ESL_VENDOR_OPCODE_MAX
Definition: esls_c.h:183
esls_c_esl_sync_disp_time_image
sdk_err_t esls_c_esl_sync_disp_time_image(uint8_t grp_id, uint8_t sent_num, uint8_t esl_id, uint8_t disp_idx, uint8_t image_idx, uint32_t abs_tim)
Sent ESL display image time cmd by Electronic Shelf Label PAwR Advertising subevt.
esls_c_handles_t::esls_ap_sync_key_handle
uint16_t esls_ap_sync_key_handle
Definition: esls_c.h:214
esls_c_evt_t::conn_idx
uint8_t conn_idx
Definition: esls_c.h:238
ESL_VENDOR_DATA_NO_ERR
@ ESL_VENDOR_DATA_NO_ERR
Definition: esls_c.h:189
ESLS_C_EVT_ESL_LED_READ_INFO
@ ESLS_C_EVT_ESL_LED_READ_INFO
Definition: esls_c.h:165
ESLS_C_EVT_INVALID
@ ESLS_C_EVT_INVALID
Definition: esls_c.h:155
esls_c_key_type_t
esls_c_key_type_t
Electronic Shelf Label Key Material type.
Definition: esls_c.h:146
esls_c_evt_t::length
uint16_t length
Definition: esls_c.h:242
ESL_VENDOR_REQ_DEVICE_NAME
@ ESL_VENDOR_REQ_DEVICE_NAME
Definition: esls_c.h:176
ESL_CMD_OPCODE_FACTORY_RST
@ ESL_CMD_OPCODE_FACTORY_RST
Definition: esls_c.h:100
ESL_RSP_ERR_CODE_IMAGE_NOT_AVAILABLE
@ ESL_RSP_ERR_CODE_IMAGE_NOT_AVAILABLE
Definition: esls_c.h:119
esls_c_esl_service_reset
sdk_err_t esls_c_esl_service_reset(uint8_t conn_idx, uint8_t esl_id)
Sent ESL service reset cmd by Electronic Shelf Label service control point characteristic.
ESL_RSP_ERR_CODE_MAX
@ ESL_RSP_ERR_CODE_MAX
Definition: esls_c.h:130
esls_c_led_info_read
sdk_err_t esls_c_led_info_read(uint8_t conn_idx)
Set Electronic Shelf Label service led information characteristic.
ESLS_C_EVT_CTRL_POINT_RSP_RECEIVE
@ ESLS_C_EVT_CTRL_POINT_RSP_RECEIVE
Definition: esls_c.h:168
ESLS_C_EVT_ESL_SYNC_RSP_RECEIVE
@ ESLS_C_EVT_ESL_SYNC_RSP_RECEIVE
Definition: esls_c.h:169
esl_rsp_err_code_t
esl_rsp_err_code_t
The Error response has a single parameter that contains an error code .
Definition: esls_c.h:113
esls_c_evt_t::evt_type
esls_c_evt_type_t evt_type
Definition: esls_c.h:241
ESLS_C_EVT_ESL_SENSOR_READ_INFO
@ ESLS_C_EVT_ESL_SENSOR_READ_INFO
Definition: esls_c.h:164
esls_c_evt_t
Electronic Shelf Label Client event.
Definition: esls_c.h:237
esls_c_esl_refresh_disp
sdk_err_t esls_c_esl_refresh_disp(uint8_t conn_idx, uint8_t esl_id, uint8_t disp_idx)
Sent ESL refresh display cmd by Electronic Shelf Label service control point characteristic.
esl_vendor_data_err_t
esl_vendor_data_err_t
Values for contrl point vendor command data error code.
Definition: esls_c.h:188
ESLS_C_EVT_DISCOVERY_FAIL
@ ESLS_C_EVT_DISCOVERY_FAIL
Definition: esls_c.h:157