38 #ifndef MESH_OPT_CORE_H__ 39 #define MESH_OPT_CORE_H__ 42 #include "radio_config.h" 57 #if MESH_FEATURE_RELAY_ENABLED 58 #define MESH_OPT_CORE_ADV_COUNT 2 60 #define MESH_OPT_CORE_ADV_COUNT 1 67 MESH_OPT_CORE_ADV_RECORD_START = MESH_OPT_CORE_ID_START,
68 MESH_OPT_CORE_ADV_RECORD_END = MESH_OPT_CORE_ADV_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1,
69 MESH_OPT_CORE_TX_POWER_RECORD_START,
70 MESH_OPT_CORE_TX_POWER_RECORD_END = MESH_OPT_CORE_TX_POWER_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1,
71 MESH_OPT_CORE_ADV_ADDR_RECORD_START,
72 MESH_OPT_CORE_ADV_ADDR_RECORD_END = MESH_OPT_CORE_ADV_ADDR_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1,
73 MESH_OPT_CORE_SEC_NWK_BCN_RECORD,
74 MESH_OPT_CORE_HB_PUBLICATION_RECORD,
75 MESH_OPT_CORE_RECORDS_COUNT
83 #define MESH_OPT_CORE_ADV_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_RECORD_START) 85 #define MESH_OPT_CORE_TX_POWER_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_TX_POWER_RECORD_START) 87 #define MESH_OPT_CORE_ADV_ADDR_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_ADDR_RECORD_START) 89 #define MESH_OPT_CORE_SEC_NWK_BCN_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_SEC_NWK_BCN_RECORD) 91 #define MESH_OPT_CORE_HB_PUBLICATION_EID MESH_OPT_CORE_ID(MESH_OPT_CORE_HB_PUBLICATION_RECORD) 93 #define MESH_OPT_CORE_ADV_ENTRY_ID_TO_ROLE(ID) ((core_tx_role_t) ((ID).record - MESH_OPT_CORE_ADV_RECORD_START)) 94 #define MESH_OPT_CORE_ADV_ROLE_TO_ENTRY_ID(ROLE) (MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_RECORD_START + (ROLE))) uint32_t mesh_opt_core_adv_set(core_tx_role_t role, const mesh_opt_core_adv_t *p_entry)
Sets the advertisement options for the given role.
bool enabled
Advertiser enabled.
uint32_t mesh_opt_core_adv_addr_set(core_tx_role_t role, const ble_gap_addr_t *p_adv_addr)
Sets the advertisement address for the given role.
uint16_t tx_interval_ms
Advertisement interval in milliseconds.
uint8_t tx_count
Number of transmissions for each packet.
uint32_t mesh_opt_core_tx_power_get(core_tx_role_t role, radio_tx_power_t *p_tx_power)
Gets the TX power level for the given role.
uint32_t mesh_opt_core_adv_addr_get(core_tx_role_t role, ble_gap_addr_t *p_adv_addr)
Gets the advertisement address for the given role.
uint32_t mesh_opt_core_tx_power_set(core_tx_role_t role, radio_tx_power_t tx_power)
Sets the TX power level for the given role.
uint32_t mesh_opt_core_adv_get(core_tx_role_t role, mesh_opt_core_adv_t *p_entry)
Gets the advertisement options for the given role.
#define NRF_MESH_STATIC_ASSERT(...)
Compile-time assertion.