Application event decoders

nRF5 SDK v12.2.0

Application event decoders. More...

Functions

uint32_t ble_evt_tx_complete_dec (uint8_t const *const p_buf, uint32_t packet_len, ble_evt_t *const p_event, uint32_t *const p_event_len)
Decodes the ble_evt_tx_complete event. More...
uint32_t ble_evt_user_mem_request_dec (uint8_t const *const p_buf, uint32_t packet_len, ble_evt_t *const p_event, uint32_t *const p_event_len)
Decodes the ble_evt_user_mem_request event. More...
uint32_t ble_evt_user_mem_release_dec (uint8_t const *const p_buf, uint32_t packet_len, ble_evt_t *const p_event, uint32_t *const p_event_len)
Decodes the ble_evt_user_mem_release event. More...
uint32_t ble_evt_data_length_changed_dec (uint8_t const *const p_buf, uint32_t packet_len, ble_evt_t *const p_event, uint32_t *const p_event_len)
Decodes the ble_evt_data_length_changed event. More...

Detailed Description

Application event decoders.

Function Documentation

uint32_t ble_evt_data_length_changed_dec ( uint8_t const *const p_buf ,
uint32_t packet_len ,
ble_evt_t *const p_event ,
uint32_t *const p_event_len
)

Decodes the ble_evt_data_length_changed event.

If p_event is null, the required length of p_event is returned in p_event_len .

Parameters
[in] p_buf Pointer to the beginning of the event packet.
[in] packet_len Length (in bytes) of the event packet.
[in,out] p_event Pointer to the ble_evt_t buffer where the decoded event will be stored. If NULL, the required length will be returned in p_event_len .
[in,out] p_event_len in: Size (in bytes) of the p_event buffer. out: Length of the decoded contents of p_event .
Return values
NRF_SUCCESS Decoding success.
NRF_ERROR_NULL Decoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length.
NRF_ERROR_DATA_SIZE Decoding failure. Length of p_event is too small to hold the decoded event.
uint32_t ble_evt_tx_complete_dec ( uint8_t const *const p_buf ,
uint32_t packet_len ,
ble_evt_t *const p_event ,
uint32_t *const p_event_len
)

Decodes the ble_evt_tx_complete event.

If p_event is null, the required length of p_event is returned in p_event_len .

Parameters
[in] p_buf Pointer to the beginning of the event packet.
[in] packet_len Length (in bytes) of the event packet.
[in,out] p_event Pointer to the ble_evt_t buffer where the decoded event will be stored. If NULL, the required length will be returned in p_event_len .
[in,out] p_event_len in: Size (in bytes) of the p_event buffer. out: Length of the decoded contents of p_event .
Return values
NRF_SUCCESS Decoding success.
NRF_ERROR_NULL Decoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length.
NRF_ERROR_DATA_SIZE Decoding failure. Length of p_event is too small to hold the decoded event.
uint32_t ble_evt_user_mem_release_dec ( uint8_t const *const p_buf ,
uint32_t packet_len ,
ble_evt_t *const p_event ,
uint32_t *const p_event_len
)

Decodes the ble_evt_user_mem_release event.

If p_event is null, the required length of p_event is returned in p_event_len .

Parameters
[in] p_buf Pointer to the beginning of the event packet.
[in] packet_len Length (in bytes) of the event packet.
[in,out] p_event Pointer to the ble_evt_t buffer where the decoded event will be stored. If NULL, the required length will be returned in p_event_len .
[in,out] p_event_len in: Size (in bytes) of the p_event buffer. out: Length of the decoded contents of p_event .
Return values
NRF_SUCCESS Decoding success.
NRF_ERROR_NULL Decoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length.
NRF_ERROR_DATA_SIZE Decoding failure. Length of p_event is too small to hold the decoded event.
uint32_t ble_evt_user_mem_request_dec ( uint8_t const *const p_buf ,
uint32_t packet_len ,
ble_evt_t *const p_event ,
uint32_t *const p_event_len
)

Decodes the ble_evt_user_mem_request event.

If p_event is null, the required length of p_event is returned in p_event_len .

Parameters
[in] p_buf Pointer to the beginning of the event packet.
[in] packet_len Length (in bytes) of the event packet.
[in,out] p_event Pointer to the ble_evt_t buffer where the decoded event will be stored. If NULL, the required length will be returned in p_event_len .
[in,out] p_event_len in: Size (in bytes) of the p_event buffer. out: Length of the decoded contents of p_event .
Return values
NRF_SUCCESS Decoding success.
NRF_ERROR_NULL Decoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTH Decoding failure. Incorrect buffer length.
NRF_ERROR_DATA_SIZE Decoding failure. Length of p_event is too small to hold the decoded event.