SOC Connectivity command request decoders and command response encoders

nRF5 SDK v9.0.0

nRF51 SDK v9.0.0

SOC Connectivity command request decoders and command response encoderss. More...

Functions

uint32_t power_system_off_req_dec (uint8_t const *const p_buf, uint16_t packet_len)
Decodes sd_power_system_off command request. More...
uint32_t temp_get_req_dec (uint8_t const *const p_buf, uint32_t buf_len, int32_t **const pp_temp)
Decodes sd_temp_get command request. More...
uint32_t temp_get_rsp_enc (uint32_t return_code, uint8_t *const p_buf, uint32_t *const p_buf_len, int32_t *const p_temp)
Encodes sd_temp_get command response. More...

Detailed Description

SOC Connectivity command request decoders and command response encoderss.

Function Documentation

uint32_t power_system_off_req_dec ( uint8_t const *const p_buf ,
uint16_t packet_len
)

Decodes sd_power_system_off command request.

See Also
0x34 - sd_power_system_off for packet format.
Parameters
[in] p_buf Pointer to buffer where encoded data command will be returned.
[in] packet_len Length (in bytes) of request packet.
Return values
NRF_SUCCESS Encoding success.
NRF_ERROR_NULL Encoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_PARAM Encoding failure. Incorrect parameter.
uint32_t temp_get_req_dec ( uint8_t const *const p_buf ,
uint32_t buf_len ,
int32_t **const pp_temp
)

Decodes sd_temp_get command request.

See Also
0x52 - sd_temp_get for packet format. temp_get_rsp_enc for response encoding.
Parameters
[in] p_buf Pointer to buffer where encoded data command will be returned.
[in] buf_len Length (in bytes) of request packet.
[out] pp_temp Pointer to pointer to result of temperature measurement.
Return values
NRF_SUCCESS Encoding success.
NRF_ERROR_NULL Encoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_PARAM Encoding failure. Incorrect parameter.
uint32_t temp_get_rsp_enc ( uint32_t return_code ,
uint8_t *const p_buf ,
uint32_t *const p_buf_len ,
int32_t *const p_temp
)

Encodes sd_temp_get command response.

See Also
0x52 - sd_temp_get for packet format. temp_get_req_dec for request decoding.
Parameters
[in] return_code Return code indicating if command was successful or not.
[out] p_buf Pointer to buffer where encoded data command response will be returned.
[in,out] p_buf_len in: size of p_buf buffer. out: Length of encoded command response packet.
[in] p_temp Pointer to result of temperature measurement.
Return values
NRF_SUCCESS Encoding success.
NRF_ERROR_NULL Encoding failure. NULL pointer supplied.
NRF_ERROR_INVALID_LENGTH Encoding failure. Incorrect buffer length.

Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone .