Types and functions for handling Eddystone slots. More...
Data Structures |
|
| struct | es_adv_frame_t |
|
Advertisable frame types that can be passed in to the advertising data during non-connectable slot advertising.
More...
|
|
| struct | es_slot_t |
|
Slot.
More...
|
|
| struct | es_slot_reg_t |
|
Slot registry.
More...
|
|
Functions |
|
| void | es_slots_init (const es_slot_t *p_default_slot) |
|
Function for initializing the Eddystone slots with default values.
More...
|
|
| void | es_slot_adv_interval_set (uint8_t slot_no, nrf_ble_escs_adv_interval_t *p_adv_interval, bool global) |
|
Function for setting the advertising interval of the specified slot.
More...
|
|
| void | es_slot_radio_tx_pwr_set (uint8_t slot_no, nrf_ble_escs_radio_tx_pwr_t radio_tx_pwr) |
|
Function for setting the TX power of the specified slot.
More...
|
|
| void | es_slot_on_write (uint8_t slot_no, uint8_t length, uint8_t *p_frame_data) |
|
Function for setting the R/W ADV of the specified slot.
More...
|
|
| ret_code_t | es_slot_write_to_flash (uint8_t slot_no) |
|
Function for writing the slot's configuration to flash.
More...
|
|
| void | es_slot_encrypted_eid_id_key_set (uint8_t slot_no, nrf_ble_escs_eid_id_key_t *p_eid_id_key) |
|
Function for setting the slot's encrypted EID Identity Key to be displayed in the EID Identity Key characteristic.
More...
|
|
| void | es_slot_eid_ready (uint8_t slot_no) |
|
Function for marking an EID slot as ready for populating.
More...
|
|
| void | es_slot_tlm_update (void) |
|
Function for updating the TLM slot with updated data.
|
|
| void | es_slot_etlm_update (uint8_t eid_slot_no) |
|
Function for updating the TLM slot with eTLM data.
More...
|
|
| const es_slot_reg_t * | es_slot_get_registry (void) |
|
Function for getting a pointer to the slot registry.
More...
|
|
| void | es_slot_set_adv_custom_tx_power (uint8_t slot_no, nrf_ble_escs_adv_tx_pwr_t tx_pwr) |
|
Function for setting a custom advertisement TX power for a given slot.
More...
|
|
| bool | es_slot_reg_etlm_required (const es_slot_reg_t *p_reg) |
|
Function for checking if an eTLM frame is required.
More...
|
|
| bool | es_slot_reg_clear_slot ( es_slot_reg_t *p_reg, uint8_t slot_no) |
|
Function for clearing a slot.
More...
|
|
| void | es_slot_reg_update_slot_list_info_on_add ( es_slot_reg_t *p_reg, uint8_t slot_no, es_frame_type_t frame_type, bool init) |
|
Function for updating the state of the slot registry after adding a slot.
More...
|
|
| void | es_slot_reg_init ( es_slot_reg_t *p_reg) |
|
Function for initializing the slot registry.
More...
|
|
Detailed Description
Types and functions for handling Eddystone slots.
Function Documentation
| void es_slot_adv_interval_set | ( | uint8_t | slot_no , |
| nrf_ble_escs_adv_interval_t * | p_adv_interval , | ||
| bool | global | ||
| ) |
Function for setting the advertising interval of the specified slot.
For compatibility with the Eddystone specifications,
p_adv_interval
must point to a 16-bit big endian value (coming from the characteristic write request), which is then converted to a little endian value inside the function before it is written into the variable in the slot.
- Note
- If the slot number is bigger than the maximum allowed value (defined in the broadcast capabilites characteristic), the highest slot is used.
- If the provided advertisement interval is not reasonable (thus outside of the BLE specification), the data pointed to is quietly modified to a reasonable value. The updated data is used to write to the slot, and it should also be used to write to the advertising interval characteristic.
- Parameters
-
[in] slot_no The index of the slot. [in,out] p_adv_interval Pointer to the advertisement interval (in ms) to set. [in] global Flag that should be set if the beacon does not support variable advertising intervals.
| void es_slot_eid_ready | ( | uint8_t | slot_no | ) |
Function for marking an EID slot as ready for populating.
Call this function when an EID has been generated and the advertisement frame can be populated with the EID.
- Parameters
-
[in] slot_no The index of the slot.
| void es_slot_encrypted_eid_id_key_set | ( | uint8_t | slot_no , |
| nrf_ble_escs_eid_id_key_t * | p_eid_id_key | ||
| ) |
Function for setting the slot's encrypted EID Identity Key to be displayed in the EID Identity Key characteristic.
- Note
- If the slot number is bigger than the maximum allowed value (defined in the broadcast capabilites characteristic), the highest slot is used.
- Parameters
-
[in] slot_no The index of the slot. [in,out] p_eid_id_key Pointer to a nrf_ble_escs_eid_id_key_t structure from where the key will be written.
| void es_slot_etlm_update | ( | uint8_t | eid_slot_no | ) |
Function for updating the TLM slot with eTLM data.
This function uses the EID identity key from the given EID slot number to update the TLM slot.
- Parameters
-
[in] eid_slot_no EID slot to get EID identity key from.
| const es_slot_reg_t * es_slot_get_registry | ( | void | ) |
Function for getting a pointer to the slot registry.
- Returns
- A pointer to the slot registry.
| void es_slot_on_write | ( | uint8_t | slot_no , |
| uint8_t | length , | ||
| uint8_t * | p_frame_data | ||
| ) |
Function for setting the R/W ADV of the specified slot.
- Note
- If the slot number is bigger than the maximum allowed value (defined in the broadcast capabilites characteristic), the highest slot is used.
- Parameters
-
[in] slot_no The index of the slot. [in,out] length The length of the data written or read. [in,out] p_frame_data Pointer to the data.
| void es_slot_radio_tx_pwr_set | ( | uint8_t | slot_no , |
| nrf_ble_escs_radio_tx_pwr_t | radio_tx_pwr | ||
| ) |
Function for setting the TX power of the specified slot.
- Note
- If the slot number is bigger than the maximum allowed value (defined in the broadcast capabilites characteristic), the highest slot is used.
- If the provided TX power is not reasonable (thus outside of the BLE or hardware specification), the data pointed to is quietly modified to a reasonable value. The updated data is used to write to the slot, and it should also be used to write to the TX power characteristic.
- Parameters
-
[in] slot_no The index of the slot. [in,out] radio_tx_pwr TX power value to set.
| bool es_slot_reg_clear_slot | ( | es_slot_reg_t * | p_reg , |
| uint8_t | slot_no | ||
| ) |
Function for clearing a slot.
- Parameters
-
[in] p_reg Pointer to the slot registry. [in] slot_no The slot number to clear.
- Return values
-
true If an EID slot was cleared.
| bool es_slot_reg_etlm_required | ( | const es_slot_reg_t * | p_reg | ) |
Function for checking if an eTLM frame is required.
- Parameters
-
[in] p_reg Pointer to the slot registry.
- Return values
-
true If an eTLM frame is required. false Otherwise.
| void es_slot_reg_init | ( | es_slot_reg_t * | p_reg | ) |
Function for initializing the slot registry.
- Parameters
-
[in] p_reg Pointer to the slot registry to initialize.
| void es_slot_reg_update_slot_list_info_on_add | ( | es_slot_reg_t * | p_reg , |
| uint8_t | slot_no , | ||
| es_frame_type_t | frame_type , | ||
| bool | init | ||
| ) |
Function for updating the state of the slot registry after adding a slot.
- Parameters
-
[in] p_reg Pointer to the slot registry. [in] slot_no The slot number that was added. [in] frame_type The frame type that was added. [in] init Information if the data is loaded during initialization. Set this parameter to false if the call is a result of a write to the Eddystone Configuration Service.
| void es_slot_set_adv_custom_tx_power | ( | uint8_t | slot_no , |
| nrf_ble_escs_adv_tx_pwr_t | tx_pwr | ||
| ) |
Function for setting a custom advertisement TX power for a given slot.
- Note
- If the slot number is bigger than the maximum allowed value (defined in the broadcast capabilites characteristic), the highest slot is used.
- If the provided TX power is not reasonable (thus outside of the BLE or hardware specification), the data pointed to is quietly modified to a reasonable value. The updated data is used to write to the slot, and it should also be used to write to the TX power characteristic.
- Parameters
-
[in] slot_no The index of the slot. [in] tx_pwr Advertised TX power to be set.
| ret_code_t es_slot_write_to_flash | ( | uint8_t | slot_no | ) |
Function for writing the slot's configuration to flash.
- Parameters
-
[in] slot_no The index of the slot.
| void es_slots_init | ( | const es_slot_t * | p_default_slot | ) |
Function for initializing the Eddystone slots with default values.
This function synchronizes all slots with the initial values.
- Parameters
-
[in] p_default_slot Pointer to the default parameters for a slot.