28 size_t *payload_len_out);
34typedef int (*
response_decoder)(
const uint8_t *payload,
size_t payload_len,
void *result,
35 size_t *payload_len_out);
62#define SSF_CLIENT_SERVICE_DEFINE(_name, _srvc_name, _req_encode, _rsp_decode) \
63 static const struct ssf_client_srvc _name = { \
64 .id = (CONFIG_SSF_##_srvc_name##_SERVICE_ID), \
65 .version = (CONFIG_SSF_##_srvc_name##_SERVICE_VERSION), \
66 .req_encode = (request_encoder)_req_encode, \
67 .rsp_decode = (response_decoder)_rsp_decode, \
68 .req_buf_size = (CONFIG_SSF_##_srvc_name##_SERVICE_BUFFER_SIZE) \
109 const uint8_t **rsp_pkt);
int ssf_client_init(void)
Initialize SDFW Service Framework. This will initialize underlying transport and wait for remote doma...
int ssf_client_send_raw_request(const struct ssf_client_srvc *srvc, struct ssf_client_raw_data raw_req, struct ssf_client_raw_data *raw_rsp)
Send a raw byte string request and wait for a response.
int(* request_encoder)(uint8_t *payload, size_t payload_len, void *input, size_t *payload_len_out)
SSF request encode function prototype. Function of this type are typically generated from cddl with z...
Definition: ssf_client.h:27
int(* response_decoder)(const uint8_t *payload, size_t payload_len, void *result, size_t *payload_len_out)
SSF response decode function prototype. Function of this type are typically generated from cddl with ...
Definition: ssf_client.h:34
int ssf_client_send_request(const struct ssf_client_srvc *srvc, void *req, void *decoded_rsp, const uint8_t **rsp_pkt)
Send a request and wait for a response.
void ssf_client_decode_done(const uint8_t *rsp_pkt)
Free transport layer response buffer when decoding of response is finished.
uint8_t * data
Definition: ssf_client.h:19
size_t len
Definition: ssf_client.h:20
Structure to hold a raw request or response.
Definition: ssf_client.h:18
uint16_t version
Definition: ssf_client.h:44
request_encoder req_encode
Definition: ssf_client.h:46
uint16_t id
Definition: ssf_client.h:42
response_decoder rsp_decode
Definition: ssf_client.h:48
size_t req_buf_size
Definition: ssf_client.h:50
SSF service definition (client).
Definition: ssf_client.h:40