nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches
ssf_client_notif.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <sdfw/sdfw_services/ssf_errno.h>

Go to the source code of this file.

Data Structures

struct  ssf_notification
 Structure to hold an incoming notification. Decode with ssf_client_notif_decode. More...
 
struct  ssf_client_notif_listener
 SSF notification listener. More...
 

Macros

#define SSF_CLIENT_NOTIF_LISTENER_DEFINE(_name, _srvc_name, _notif_decode, _handler)
 Define a notification listener, that is used for invoking the correct handler function when receiving notifications from the server. The listener must be registered with ssf_client_notif_register before notifications can be received.
 

Typedefs

typedef int(* ssf_notif_decoder) (const uint8_t *payload, size_t payload_len, void *result, size_t *payload_len_out)
 SSF notification decode function prototype. Functions of this type are typically generated from cddl with zcbor.
 
typedef int(* ssf_notif_handler) (struct ssf_notification *notif, void *context)
 SSF notification handler prototype.
 

Functions

int ssf_client_notif_decode (const struct ssf_notification *notif, void *decoded_notif)
 Decode a received notification.
 
void ssf_client_notif_decode_done (struct ssf_notification *notif)
 Must be invoked from ssf_notif_handler to free transport layer buffer when the request have been decoded and can be freed.
 
int ssf_client_notif_register (struct ssf_client_notif_listener *listener, void *context)
 Register a listener. Enables the listener's handler to be called when receiving notifications from server with associated service id.
 
int ssf_client_notif_deregister (struct ssf_client_notif_listener *listener)
 De-register a listener. Stops the listener's handler from being called when receiving notifications from server with associated service id.