nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ SSF_CLIENT_SERVICE_DEFINE

#define SSF_CLIENT_SERVICE_DEFINE ( _name,
_srvc_name,
_req_encode,
_rsp_decode )
Value:
static const struct ssf_client_srvc _name = { \
.id = (CONFIG_SSF_##_srvc_name##_SERVICE_ID), \
.version = (CONFIG_SSF_##_srvc_name##_SERVICE_VERSION), \
.req_encode = (request_encoder)_req_encode, \
.rsp_decode = (response_decoder)_rsp_decode, \
.req_buf_size = (CONFIG_SSF_##_srvc_name##_SERVICE_BUFFER_SIZE) \
}
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
uint16_t version
Definition ssf_client.h:44
response_decoder rsp_decode
Definition ssf_client.h:48
SSF service definition (client).
Definition ssf_client.h:40

Define a read-only service definition object.

Parameters
_nameName of service definition object.
[in]_srvc_nameShort uppercase service name. Must match the service_name variable used when specifying the service with the Kconfig.template.service template.
[in]_req_encodeFunction of type request_encoder. Used when encoding requests.
[in]_rsp_decodeFunction of type response_decoder. Used when decoding responses.