nRF5 SDK for Mesh v5.0.0
Data Structures | Functions
Core runtime configuration options

Runtime configuration for Mesh core functionality. More...

Data Structures

struct  mesh_opt_core_adv_t
 

Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
enum  {
  MESH_OPT_CORE_ADV_RECORD_START = MESH_OPT_CORE_ID_START, MESH_OPT_CORE_ADV_RECORD_END = MESH_OPT_CORE_ADV_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1, MESH_OPT_CORE_TX_POWER_RECORD_START, MESH_OPT_CORE_TX_POWER_RECORD_END = MESH_OPT_CORE_TX_POWER_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1,
  MESH_OPT_CORE_ADV_ADDR_RECORD_START, MESH_OPT_CORE_ADV_ADDR_RECORD_END = MESH_OPT_CORE_ADV_ADDR_RECORD_START + MESH_OPT_CORE_ADV_COUNT - 1, MESH_OPT_CORE_SEC_NWK_BCN_RECORD, MESH_OPT_CORE_HB_PUBLICATION_RECORD,
  MESH_OPT_CORE_RECORDS_COUNT
}
 
#define MESH_OPT_CORE_ADV_COUNT   1
 
#define MESH_OPT_CORE_ADV_EID   MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_RECORD_START)
 Advertiser entry id.
 
#define MESH_OPT_CORE_TX_POWER_EID   MESH_OPT_CORE_ID(MESH_OPT_CORE_TX_POWER_RECORD_START)
 TX power entry id.
 
#define MESH_OPT_CORE_ADV_ADDR_EID   MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_ADDR_RECORD_START)
 Advertiser address entry id.
 
#define MESH_OPT_CORE_SEC_NWK_BCN_EID   MESH_OPT_CORE_ID(MESH_OPT_CORE_SEC_NWK_BCN_RECORD)
 Current secure network beacon state.
 
#define MESH_OPT_CORE_HB_PUBLICATION_EID   MESH_OPT_CORE_ID(MESH_OPT_CORE_HB_PUBLICATION_RECORD)
 Heartbeat publication state.
 
#define MESH_OPT_CORE_ADV_ENTRY_ID_TO_ROLE(ID)   ((core_tx_role_t) ((ID).record - MESH_OPT_CORE_ADV_RECORD_START))
 
#define MESH_OPT_CORE_ADV_ROLE_TO_ENTRY_ID(ROLE)   (MESH_OPT_CORE_ID(MESH_OPT_CORE_ADV_RECORD_START + (ROLE)))
 

Detailed Description

Runtime configuration for Mesh core functionality.

Function Documentation

◆ mesh_opt_core_adv_set()

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.

Parameters
[in]roleAdvertiser role
[in]p_entryOptions
Return values
NRF_SUCCESSThe options were successfully set.
NRF_ERROR_NULLThe p_entry pointer was NULL.
NRF_ERROR_INVALID_PARAMSInvalid options parameters
NRF_ERROR_NOT_FOUNDUnknown role.

◆ mesh_opt_core_adv_get()

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.

Parameters
[in]roleAdvertiser role.
[in,out]p_entryReturns the options for the given role.
Return values
NRF_SUCCESSThe options were successfully returned.
NRF_ERROR_NULLThe p_entry pointer was NULL.
NRF_ERROR_NOT_FOUNDUnknown role.

◆ mesh_opt_core_tx_power_set()

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.

Parameters
[in]roleAdvertiser role
[in]tx_powerTX power to set.
Return values
NRF_SUCCESSThe TX power was successfully set.
NRF_ERROR_INVALID_PARAMSInvalid options parameters
NRF_ERROR_NOT_FOUNDUnknown role.

◆ mesh_opt_core_tx_power_get()

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.

Parameters
[in]roleAdvertiser role
[in,out]p_tx_powerReturns the current TX power setting
Return values
NRF_SUCCESSThe TX power was successfully returned.
NRF_ERROR_NULLThe p_tx_power pointer was NULL.
NRF_ERROR_NOT_FOUNDUnknown role.

◆ mesh_opt_core_adv_addr_set()

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.

Parameters
[in]roleAdvertiser role
[in]p_adv_addrThe new advertisement address
Return values
NRF_SUCCESSThe advertisement address was successfully set.
NRF_ERROR_NULLThe p_adv_addr pointer was NULL.
NRF_ERROR_INVALID_PARAMSInvalid options parameters
NRF_ERROR_NOT_FOUNDUnknown role.

◆ mesh_opt_core_adv_addr_get()

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.

Parameters
[in]roleAdvertiser role
[in,out]p_adv_addrReturns the current advertisement address
Return values
NRF_SUCCESSThe advertisement address was successfully returned.
NRF_ERROR_NULLThe p_adv_addr pointer was NULL.
NRF_ERROR_NOT_FOUNDUnknown role.

Documentation feedback | Developer Zone | Subscribe | Updated