nRF5 SDK v13.0.0
Functions
Connectivity middleware common codecs

Functions

uint32_t conn_mw_handler (uint8_t const *const p_rx_buf, uint32_t rx_buf_len, uint8_t *const p_tx_buf, uint32_t *const p_tx_buf_len)
 Connectivity Middleware dispatcher function. More...
 
uint32_t conn_mw_power_system_off (uint8_t const *const p_rx_buf, uint32_t rx_buf_len, uint8_t *const p_tx_buf, uint32_t *const p_tx_buf_len)
 Handles sd_power_system_off command request. More...
 
uint32_t conn_mw_temp_get (uint8_t const *const p_rx_buf, uint32_t rx_buf_len, uint8_t *const p_tx_buf, uint32_t *const p_tx_buf_len)
 Handles sd_temp_get command request and prepares response. More...
 
uint32_t conn_mw_ecb_block_encrypt (uint8_t const *const p_rx_buf, uint32_t rx_buf_len, uint8_t *const p_tx_buf, uint32_t *const p_tx_buf_len)
 Handles sd_ecb_block_encrypt command request and prepares response. More...
 

Detailed Description

Function Documentation

uint32_t conn_mw_ecb_block_encrypt ( uint8_t const *const  p_rx_buf,
uint32_t  rx_buf_len,
uint8_t *const  p_tx_buf,
uint32_t *const  p_tx_buf_len 
)

Handles sd_ecb_block_encrypt command request and prepares response.

Parameters
[in]p_rx_bufPointer to input buffer.
[in]rx_buf_lenSize of p_rx_buf.
[out]p_tx_bufPointer to output buffer.
[in,out]p_tx_buf_lenin: Size of p_tx_buf buffer. out: Length of valid data in p_tx_buf.
Return values
NRF_SUCCESSHandler success.
NRF_ERROR_NULLHandler failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHHandler failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMHandler failure. Invalid operation type.
NRF_ERROR_NOT_SUPPORTEDHandler failure. Opcode not supported.
uint32_t conn_mw_handler ( uint8_t const *const  p_rx_buf,
uint32_t  rx_buf_len,
uint8_t *const  p_tx_buf,
uint32_t *const  p_tx_buf_len 
)

Connectivity Middleware dispatcher function.

It will handle decode the opcode from the RX buffer and based on the opcode it will search for registered handler. Handler is called once it is found.

Parameters
[in]p_rx_bufPointer to input buffer.
[in]rx_buf_lenSize of p_rx_buf.
[out]p_tx_bufPointer to output buffer.
[in,out]p_tx_buf_lenin: Size of p_tx_buf buffer. out: Length of valid data in p_tx_buf.
Return values
NRF_SUCCESSHandler success.
NRF_ERROR_NULLHandler failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHHandler failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMHandler failure. Invalid operation type.
NRF_ERROR_NOT_SUPPORTEDHandler failure. Opcode not supported.
uint32_t conn_mw_power_system_off ( uint8_t const *const  p_rx_buf,
uint32_t  rx_buf_len,
uint8_t *const  p_tx_buf,
uint32_t *const  p_tx_buf_len 
)

Handles sd_power_system_off command request.

Parameters
[in]p_rx_bufPointer to input buffer.
[in]rx_buf_lenSize of p_rx_buf.
[out]p_tx_bufPointer to output buffer.
[in,out]p_tx_buf_lenin: Size of p_tx_buf buffer. out: Length of valid data in p_tx_buf.
Return values
NRF_SUCCESSHandler success.
NRF_ERROR_NULLHandler failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHHandler failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMHandler failure. Invalid operation type.
NRF_ERROR_NOT_SUPPORTEDHandler failure. Opcode not supported.
uint32_t conn_mw_temp_get ( uint8_t const *const  p_rx_buf,
uint32_t  rx_buf_len,
uint8_t *const  p_tx_buf,
uint32_t *const  p_tx_buf_len 
)

Handles sd_temp_get command request and prepares response.

Parameters
[in]p_rx_bufPointer to input buffer.
[in]rx_buf_lenSize of p_rx_buf.
[out]p_tx_bufPointer to output buffer.
[in,out]p_tx_buf_lenin: Size of p_tx_buf buffer. out: Length of valid data in p_tx_buf.
Return values
NRF_SUCCESSHandler success.
NRF_ERROR_NULLHandler failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTHHandler failure. Incorrect buffer length.
NRF_ERROR_INVALID_PARAMHandler failure. Invalid operation type.
NRF_ERROR_NOT_SUPPORTEDHandler failure. Opcode not supported.

Documentation feedback | Developer Zone | Subscribe | Updated