Electronic Shelf Label Service API. More...
Include dependency graph for esls.h:Go to the source code of this file.
Classes | |
| struct | esls_ap_sync_param_t |
| Electronic Shelf Label Service sync parameter format. More... | |
| struct | esls_display_arr_t |
| Electronic Shelf Label Service display information data. More... | |
| struct | esls_sensor_arr_t |
| Electronic Shelf Label Service sensor information data. More... | |
| struct | esls_led_arr_t |
| Electronic Shelf Label Service led information data. More... | |
| struct | esls_char_infor_t |
| Electronic Shelf Label Service characteristic information. More... | |
| struct | esls_evt_t |
| Electronic Shelf Label Service event. More... | |
| struct | esls_nvds_cb_t |
| Electronic Shelf Label Service NVDS callback func. More... | |
| struct | esls_init_t |
| Electronic Shelf Label Service Init variable. More... | |
Macros | |
| #define | PAWR_MAX_SENT_DATA_LEN 250 |
| Maximum data length per subevt. More... | |
| #define | PAWR_SENT_DATA_LEN_OFFSET 0 |
| Advertising data length field offset. More... | |
| #define | PAWR_SENT_DATA_TYPE_OFFSET 1 |
| Advertising data type field offset. More... | |
| #define | ESLS_CONNECTION_MAX 10 |
| Maximum number of Electronic Shelf Label Service connections. More... | |
| #define | ESL_ADDR_LEN 2 |
| Maximum length of heart rate measurement characteristic. More... | |
| #define | ESL_SESSION_KEY_LEN 16 |
| The length of shared session key. More... | |
| #define | ESL_IV_LEN 8 |
| The length of initialization vector. More... | |
| #define | AP_SYNC_KEY_MATERIAL_LEN (ESL_SESSION_KEY_LEN + ESL_IV_LEN) |
| The encryption keys of AP sent data . More... | |
| #define | ESL_RSP_KEY_MATERIAL_LEN (ESL_SESSION_KEY_LEN + ESL_IV_LEN) |
| The encryption keys of ESL response data . More... | |
| #define | ESL_CTL_PT_TLV_MIN_LEN 2 |
| The shortest TLV length . More... | |
| #define | ESL_CTL_PT_TLV_MAX_LEN 17 |
| The longest TLV length . More... | |
| #define | ESL_MAX_VAL_LEN 512 |
| #define | ESL_ADDR_ESL_ID_BROAD_ADDR 0xFF |
| The value 0xFF is reserved for the Broadcast Address. More... | |
| #define | ESL_CTL_PT_SENSOR_DATA_MAX_LEN 15 |
| The max sensor data length. More... | |
| #define | ESL_VENDOR_DATA_MAX_LEN 15 |
| The max vendor data length. More... | |
| #define | esls_sensor_size00(x) x&0xFF, (x>>8)&0xFF |
| #define | esls_sensor_size01(y) y&0xFF, (y>>8)&0xFF, (y>>16)&0xFF, (y>>24)&0xFF |
| #define | GRP_ID_MSK(esl_addr) (esl_addr & 0x7F) |
| #define | ESL_TLV_CMD_TAG(OPCODE) (OPCODE & 0xF) |
| Get opcode tag field. More... | |
| #define | ESL_TLV_CMD_LEN(OPCODE) ((OPCODE>>4) & 0xF) |
| Get opcode length field. More... | |
| #define | ESL_VEND_TAG 0x0F |
| Vendor tag field. More... | |
| #define | ESL_LED_INFOR_TYPE_RGB(x) (x & 0x3F) |
| sRGB LED Type. More... | |
| #define | ESL_LED_INFOR_TYPE_MON(y) ((y & 0x3F)|(0x40)) |
| Monochrome LED Type. More... | |
| #define | ESLS_CHAR_MANDATORY 0xE01FF |
| Bit mask of the mandatory characteristics. More... | |
| #define | ESLS_CHAR_DISPLAY_INFOR_SUP 0x00600 |
| Bit mask of esl display information Feature Supported. More... | |
| #define | ESLS_CHAR_IMAGE_INFOR_SUP 0x01800 |
| Bit mask of esl image information Feature Supported. More... | |
| #define | ESLS_CHAR_SENSOR_INFOR_SUP 0x06000 |
| Bit mask of esl sensor information Feature Supported. More... | |
| #define | ESLS_CHAR_LED_INFOR_SUP 0x18000 |
| Bit mask of esl LED information Feature Supported. More... | |
| #define | ESLS_CONFIG_ADDR_MASK 0x1 |
| Bit mask of the address characteristics config flag . More... | |
| #define | ESLS_CONFIG_SYNC_KEY_MASK 0x2 |
| Bit mask of the sync key characteristics config flag . More... | |
| #define | ESLS_CONFIG_RSP_KEY_MASK 0x4 |
| Bit mask of the response key characteristics config flag . More... | |
| #define | ESLS_CONFIG_ABS_TIME_MASK 0x8 |
| Bit mask of the current time characteristics config flag . More... | |
| #define | ESLS_CONFIG_COMPLETE_MASK (ESLS_CONFIG_ADDR_MASK|ESLS_CONFIG_SYNC_KEY_MASK|ESLS_CONFIG_RSP_KEY_MASK|ESLS_CONFIG_ABS_TIME_MASK) |
Typedefs | |
| typedef uint8_t(* | ble_app_nvds_get_cb_t) (uint8_t tag, uint8_t *p_len, uint8_t *p_buf) |
| Electronic Shelf Label Service NVDS callback func define. More... | |
| typedef uint8_t(* | ble_app_nvds_put_cb_t) (uint8_t tag, uint8_t len, uint8_t *p_buf) |
| typedef uint8_t(* | ble_app_nvds_del_cb_t) (uint8_t tag) |
| typedef sdk_err_t(* | esls_evt_handler_t) (esls_evt_t *p_evt) |
| Electronic Shelf Label Service event handler func define. More... | |
| typedef bool(* | app_dev_reset_cbk_t) (uint8_t conn_idx, bool factory_rst) |
Functions | |
| struct | __attribute__ ((packed)) |
| Electronic Shelf Label Service display information format. More... | |
| sdk_err_t | esls_service_init (esls_init_t *p_esls_init) |
| Init a Electronic Shelf Label Service instance and add in the DB. More... | |
| bool | esls_service_nvds_load_flag_get (void) |
| Get Electronic Shelf Label Service nvds load flag. More... | |
| void | ble_esls_evt_on_ble_capture (const ble_evt_t *p_evt) |
| Capture esl service events on BLE. More... | |
| uint16_t | esls_service_start_handle_get (void) |
| Provide the interface for other modules to obtain the esls service start handle . More... | |
| sdk_err_t | esls_sync_past_param_set (esls_ap_sync_param_t *sync_past_ptr) |
| Set Electronic Shelf Label default per sync trans parameter. More... | |
| sdk_err_t | esls_set_state_machine (ESL_STATE_T esl_state) |
| Set Electronic Shelf Label state machine. More... | |
| ESL_STATE_T | esls_get_state_machine (void) |
| Get Electronic Shelf Label state machine. More... | |
| void | esls_service_reset (void) |
| Reset Electronic Shelf Label Service state and database. More... | |
| sdk_err_t | esls_tlv_response_send (uint8_t conn_idx, uint8_t *rsp_data_p, uint16_t len) |
| Send response message to AP. More... | |
| sdk_err_t | esls_err_state_send (uint8_t conn_idx, esl_rsp_err_code_t err_code) |
| a Electronic Shelf Label Service reponse AP with a Error code. More... | |
| sdk_err_t | esls_led_state_send (uint8_t conn_idx, uint8_t led_idx) |
| a Electronic Shelf Label Service reponse of LED control command . More... | |
| sdk_err_t | esls_base_state_send (uint8_t conn_idx) |
| Sent a Electronic Shelf Label Service base state. More... | |
| sdk_err_t | esls_sensor_value_send (uint8_t conn_idx, uint8_t sensor_idx, uint8_t *sensor_data_p, uint8_t len) |
| Sent Electronic Shelf Label Service sensor data. More... | |
| sdk_err_t | esls_display_state_send (uint8_t conn_idx, uint8_t display_idx, uint8_t image_idx) |
| Sent Electronic Shelf Label Service diaplay state. More... | |
| sdk_err_t | esls_user_payload_send (uint8_t conn_idx, uint8_t user_opcode, uint8_t *esl_payload, uint16_t esl_len) |
| Sent Electronic Shelf Label Service user data. More... | |
| sdk_err_t | esls_user_payload_prepare (uint8_t *esl_sent_buffer, uint16_t *esl_sent_buffer_offset, uint8_t user_opcode, uint8_t *esl_payload, uint16_t esl_len) |
| Set Electronic Shelf Label Service user data in esl_sent_buffer, will sent later. More... | |
| uint16_t | esls_service_need_state_set (bool flag) |
| Electronic Shelf Label Service service need state set. More... | |
| uint16_t | esls_service_need_state_get (void) |
| Get Electronic Shelf Label Service service need state . More... | |
| uint16_t | esls_sync_to_ap_state_set (bool flag) |
| Electronic Shelf Label Service sync state set. More... | |
| uint16_t | esls_sync_to_ap_state_get (void) |
| Get Electronic Shelf Label Service sync state . More... | |
| uint16_t | esls_active_led_state_set (bool flag) |
| Electronic Shelf Label Service active LED state set. More... | |
| uint16_t | esls_active_led_state_get (void) |
| Get Electronic Shelf Label Service active LED state state . More... | |
| uint16_t | esls_pending_led_update_state_set (bool flag) |
| Electronic Shelf Label Service pengding LED state set. More... | |
| uint16_t | esls_pending_led_update_state_get (void) |
| Get Electronic Shelf Label Service pengding LED state state . More... | |
| uint16_t | esls_pending_display_update_state_set (bool flag) |
| Electronic Shelf Label Service pengding display state set. More... | |
| uint16_t | esls_pending_display_update_state_get (void) |
| Get Electronic Shelf Label Service pengding display state state . More... | |
Variables | |
| esls_display_infor_t | |
| esls_key_material_t | |
| esls_display_cmd_t | |
| esls_led_cmd_t | |
| esls_ecp_cmd_t | |
| esls_tlv_format_t | |
Electronic Shelf Label Service API.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file esls.h.