7#ifndef H_MCUMGR_CALLBACKS_
8#define H_MCUMGR_CALLBACKS_
15#if defined(CONFIG_MCUMGR_GRP_FS) || defined(__DOXYGEN__)
19#if defined(CONFIG_MCUMGR_GRP_IMG) || defined(__DOXYGEN__)
23#if defined(CONFIG_MCUMGR_GRP_OS) || defined(__DOXYGEN__)
27#if defined(CONFIG_MCUMGR_GRP_SETTINGS) || defined(__DOXYGEN__)
31#if defined(CONFIG_MCUMGR_GRP_ENUM) || defined(__DOXYGEN__)
mgmt_cb_return
MGMT event callback return value.
Definition callback_defines.h:41
void mgmt_callback_unregister(struct mgmt_callback *callback)
Unregister event callback function.
smp_group_events
MGMT event opcodes for base SMP command processing.
Definition callbacks.h:82
void mgmt_callback_register(struct mgmt_callback *callback)
Register event callback function.
uint8_t mgmt_evt_get_index(uint32_t event)
Get event ID index from event.
enum mgmt_cb_return(* mgmt_cb)(uint32_t event, enum mgmt_cb_return prev_status, int32_t *rc, uint16_t *group, bool *abort_more, void *data, size_t data_size)
Function to be called on MGMT notification/event.
Definition callbacks.h:75
enum mgmt_cb_return mgmt_callback_notify(uint32_t event, void *data, size_t data_size, int32_t *err_rc, uint16_t *err_group)
This function is called to notify registered callbacks about mcumgr notifications/events.
@ MGMT_EVT_GRP_SMP
Definition callback_defines.h:60
@ MGMT_EVT_OP_CMD_RECV
Callback when a command is received, data is mgmt_evt_op_cmd_arg.
Definition callbacks.h:84
@ MGMT_EVT_OP_CMD_ALL
Used to enable all smp_group events.
Definition callbacks.h:93
@ MGMT_EVT_OP_CMD_DONE
Callback when a command has been processed, data is mgmt_evt_op_cmd_arg.
Definition callbacks.h:90
@ MGMT_EVT_OP_CMD_STATUS
Callback when a status is updated, data is mgmt_evt_op_cmd_arg.
Definition callbacks.h:87
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__INT32_TYPE__ int32_t
Definition stdint.h:74
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Group structure.
Definition grp.h:18
MGMT callback struct.
Definition callbacks.h:99
uint32_t event_id
MGMT_EVT_[...] Event ID for handler to be called on.
Definition callbacks.h:115
sys_snode_t node
Entry list node.
Definition callbacks.h:101
mgmt_cb callback
Callback that will be called.
Definition callbacks.h:104
Arguments for MGMT_EVT_OP_CMD_RECV, MGMT_EVT_OP_CMD_STATUS and MGMT_EVT_OP_CMD_DONE.
Definition callbacks.h:121
uint16_t group
mcumgr_group_t
Definition callbacks.h:123
int status
img_mgmt_id_upload_t, used in MGMT_EVT_OP_CMD_STATUS
Definition callbacks.h:136
int err
mcumgr_err_t, used in MGMT_EVT_OP_CMD_DONE
Definition callbacks.h:133
uint8_t id
Message ID within group.
Definition callbacks.h:126
uint8_t op
mcumgr_op_t used in MGMT_EVT_OP_CMD_RECV
Definition callbacks.h:130