diff --git a/subsys/sdfw_services/services/suit_service/CMakeLists.txt b/subsys/sdfw_services/services/suit_service/CMakeLists.txt index 09496933abcb..f0eb63fe42e3 100644 --- a/subsys/sdfw_services/services/suit_service/CMakeLists.txt +++ b/subsys/sdfw_services/services/suit_service/CMakeLists.txt @@ -11,8 +11,10 @@ zephyr_library_sources(suit_update.c) zephyr_library_sources(suit_mci.c) zephyr_library_sources(suit_invoke.c) zephyr_library_sources_ifdef(CONFIG_SUIT_PROCESSOR suit_auth.c) +zephyr_library_sources_ifdef(CONFIG_SUIT_MANIFEST_VARIABLES suit_mfst_var.c) zephyr_library_link_libraries(suit_utils) +zephyr_library_link_libraries_ifdef(CONFIG_SUIT_MANIFEST_VARIABLES suit_manifest_variables) if(CONFIG_SUIT_STREAM_SOURCE_IPC) zephyr_library_link_libraries(suit_stream_sources_interface) diff --git a/subsys/sdfw_services/services/suit_service/suit_mfst_var.c b/subsys/sdfw_services/services/suit_service/suit_mfst_var.c new file mode 100644 index 000000000000..396457354c4f --- /dev/null +++ b/subsys/sdfw_services/services/suit_service/suit_mfst_var.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include +#include +#include "suit_service_decode.h" +#include "suit_service_encode.h" +#include "suit_service_types.h" +#include "suit_service_utils.h" + +#include +LOG_MODULE_REGISTER(suit_mfst_var, CONFIG_SSF_SUIT_SERVICE_LOG_LEVEL); + +extern const struct ssf_client_srvc suit_srvc; + +suit_plat_err_t suit_mfst_var_get(uint32_t id, uint32_t *val) +{ + int err; + struct suit_req req = {0}; + struct suit_rsp rsp = {0}; + struct suit_get_manifest_var_req *req_data = NULL; + struct suit_get_manifest_var_rsp *rsp_data = NULL; + const uint8_t *rsp_pkt = NULL; + + if (val == NULL) { + return SUIT_PLAT_ERR_INVAL; + } + + req.suit_req_msg_choice = SSF_SUIT_REQ_CHOICE(get_manifest_var); + req_data = &req.SSF_SUIT_REQ(get_manifest_var); + + req_data->SSF_SUIT_REQ_ARG(get_manifest_var, id) = id; + + err = ssf_client_send_request(&suit_srvc, &req, &rsp, &rsp_pkt); + if (err != 0) { + LOG_ERR("ssf_client_send_request failed"); + return SUIT_PLAT_ERR_IPC; + } + + rsp_data = &rsp.SSF_SUIT_RSP(get_manifest_var); + err = rsp_data->SSF_SUIT_RSP_ARG(get_manifest_var, ret); + if (err != SUIT_PLAT_SUCCESS) { + ssf_client_decode_done(rsp_pkt); + LOG_ERR("ssf_client response return code: %d", err); + return err; + } + + *val = rsp_data->SSF_SUIT_RSP_ARG(get_manifest_var, value); + ssf_client_decode_done(rsp_pkt); + + LOG_INF("suit_mfst_var_get, id: %d, value: %d", id, *val); + + return SUIT_PLAT_SUCCESS; +} + +suit_plat_err_t suit_mfst_var_set(uint32_t id, uint32_t val) +{ + int err; + struct suit_req req = {0}; + struct suit_rsp rsp = {0}; + struct suit_set_manifest_var_req *req_data = NULL; + + LOG_INF("suit_mfst_var_set, id: %d, value: %d", id, val); + + req.suit_req_msg_choice = SSF_SUIT_REQ_CHOICE(set_manifest_var); + req_data = &req.SSF_SUIT_REQ(set_manifest_var); + + req_data->SSF_SUIT_REQ_ARG(set_manifest_var, id) = id; + req_data->SSF_SUIT_REQ_ARG(set_manifest_var, value) = val; + + err = ssf_client_send_request(&suit_srvc, &req, &rsp, NULL); + if (err != 0) { + LOG_ERR("ssf_client_send_request failed"); + return SUIT_PLAT_ERR_IPC; + } + + return rsp.SSF_SUIT_RSP(set_manifest_var).SSF_SUIT_RSP_ARG(set_manifest_var, ret); +} diff --git a/subsys/sdfw_services/services/suit_service/suit_service.cddl b/subsys/sdfw_services/services/suit_service/suit_service.cddl index bc4e633bf241..5ee81f7b0118 100644 --- a/subsys/sdfw_services/services/suit_service/suit_service.cddl +++ b/subsys/sdfw_services/services/suit_service/suit_service.cddl @@ -179,6 +179,32 @@ suit_check_component_compatibility_rsp = ( ret: int, ) +; Get manifest variable request +suit_get_manifest_var_req = ( + 14, + id: uint, +) + +; Get manifest variable response +suit_get_manifest_var_rsp = ( + 14, + ret: int, + value: uint, +) + +; Set manifest variable request +suit_set_manifest_var_req = ( + 15, + id: uint, + value: uint, +) + +; Set manifest variable response +suit_set_manifest_var_rsp = ( + 15, + ret: int, +) + ; Get supported manifest roles request suit_get_supported_manifest_roles_req = ( 18, @@ -371,6 +397,9 @@ suit_req = [ suit_get_supported_manifest_info_req / suit_authorize_process_dependency_req / + suit_get_manifest_var_req / + suit_set_manifest_var_req / + suit_evt_sub_req / suit_chunk_enqueue_req / suit_chunk_status_req / @@ -399,6 +428,9 @@ suit_rsp = [ suit_get_supported_manifest_info_rsp / suit_authorize_process_dependency_rsp / + suit_get_manifest_var_rsp / + suit_set_manifest_var_rsp / + suit_evt_sub_rsp / suit_chunk_enqueue_rsp / suit_chunk_status_rsp / diff --git a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.c b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.c index 1d582ac0712f..8527ef1ebcc2 100644 --- a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.c +++ b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.c @@ -10,1061 +10,1215 @@ * Generated with a --default-max-qty of 3 */ -#include +#include "suit_service_decode.h" +#include "zcbor_decode.h" +#include "zcbor_print.h" #include #include +#include #include -#include "zcbor_decode.h" -#include "suit_service_decode.h" -#include "zcbor_print.h" #if DEFAULT_MAX_QTY != 3 -#error "The type file was generated with a different default_max_qty than this file" +#error \ + "The type file was generated with a different default_max_qty than this file" #endif -#define log_result(state, result, func) \ - do { \ - if (!result) { \ - zcbor_trace_file(state); \ - zcbor_log("%s error: %s\r\n", func, \ - zcbor_error_str(zcbor_peek_error(state))); \ - } else { \ - zcbor_log("%s success\r\n", func); \ - } \ - } while (0) - -static bool decode_suit_missing_image_evt_nfy(zcbor_state_t *state, - struct suit_missing_image_evt_nfy *result); -static bool decode_suit_chunk_status_evt_nfy(zcbor_state_t *state, - struct suit_chunk_status_evt_nfy *result); +#define log_result(state, result, func) \ + do { \ + if (!result) { \ + zcbor_trace_file(state); \ + zcbor_log("%s error: %s\r\n", func, \ + zcbor_error_str(zcbor_peek_error(state))); \ + } else { \ + zcbor_log("%s success\r\n", func); \ + } \ + } while (0) + +static bool +decode_suit_missing_image_evt_nfy(zcbor_state_t *state, + struct suit_missing_image_evt_nfy *result); +static bool +decode_suit_chunk_status_evt_nfy(zcbor_state_t *state, + struct suit_chunk_status_evt_nfy *result); static bool decode_suit_cache_info_entry(zcbor_state_t *state, - struct suit_cache_info_entry *result); -static bool decode_suit_trigger_update_req(zcbor_state_t *state, - struct suit_trigger_update_req *result); -static bool decode_suit_check_installed_component_digest_req( - zcbor_state_t *state, struct suit_check_installed_component_digest_req *result); + struct suit_cache_info_entry *result); static bool -decode_suit_get_installed_manifest_info_req(zcbor_state_t *state, - struct suit_get_installed_manifest_info_req *result); -static bool decode_suit_authenticate_manifest_req(zcbor_state_t *state, - struct suit_authenticate_manifest_req *result); +decode_suit_trigger_update_req(zcbor_state_t *state, + struct suit_trigger_update_req *result); +static bool decode_suit_check_installed_component_digest_req( + zcbor_state_t *state, + struct suit_check_installed_component_digest_req *result); +static bool decode_suit_get_installed_manifest_info_req( + zcbor_state_t *state, struct suit_get_installed_manifest_info_req *result); +static bool decode_suit_authenticate_manifest_req( + zcbor_state_t *state, struct suit_authenticate_manifest_req *result); +static bool decode_suit_authorize_unsigned_manifest_req( + zcbor_state_t *state, struct suit_authorize_unsigned_manifest_req *result); static bool -decode_suit_authorize_unsigned_manifest_req(zcbor_state_t *state, - struct suit_authorize_unsigned_manifest_req *result); -static bool decode_suit_authorize_seq_num_req(zcbor_state_t *state, - struct suit_authorize_seq_num_req *result); +decode_suit_authorize_seq_num_req(zcbor_state_t *state, + struct suit_authorize_seq_num_req *result); static bool decode_suit_check_component_compatibility_req( - zcbor_state_t *state, struct suit_check_component_compatibility_req *result); + zcbor_state_t *state, + struct suit_check_component_compatibility_req *result); +static bool decode_suit_get_supported_manifest_info_req( + zcbor_state_t *state, struct suit_get_supported_manifest_info_req *result); +static bool decode_suit_authorize_process_dependency_req( + zcbor_state_t *state, struct suit_authorize_process_dependency_req *result); +static bool +decode_suit_get_manifest_var_req(zcbor_state_t *state, + struct suit_get_manifest_var_req *result); static bool -decode_suit_get_supported_manifest_info_req(zcbor_state_t *state, - struct suit_get_supported_manifest_info_req *result); +decode_suit_set_manifest_var_req(zcbor_state_t *state, + struct suit_set_manifest_var_req *result); +static bool decode_suit_evt_sub_req(zcbor_state_t *state, + struct suit_evt_sub_req *result); static bool -decode_suit_authorize_process_dependency_req(zcbor_state_t *state, - struct suit_authorize_process_dependency_req *result); -static bool decode_suit_evt_sub_req(zcbor_state_t *state, struct suit_evt_sub_req *result); -static bool decode_suit_chunk_enqueue_req(zcbor_state_t *state, - struct suit_chunk_enqueue_req *result); +decode_suit_chunk_enqueue_req(zcbor_state_t *state, + struct suit_chunk_enqueue_req *result); static bool decode_suit_chunk_status_req(zcbor_state_t *state, - struct suit_chunk_status_req *result); -static bool decode_suit_invoke_confirm_req(zcbor_state_t *state, - struct suit_invoke_confirm_req *result); -static bool decode_suit_trigger_update_rsp(zcbor_state_t *state, - struct suit_trigger_update_rsp *result); -static bool decode_suit_check_installed_component_digest_rsp( - zcbor_state_t *state, struct suit_check_installed_component_digest_rsp *result); + struct suit_chunk_status_req *result); static bool -decode_suit_get_installed_manifest_info_rsp(zcbor_state_t *state, - struct suit_get_installed_manifest_info_rsp *result); +decode_suit_invoke_confirm_req(zcbor_state_t *state, + struct suit_invoke_confirm_req *result); static bool -decode_suit_get_install_candidate_info_rsp(zcbor_state_t *state, - struct suit_get_install_candidate_info_rsp *result); -static bool decode_suit_authenticate_manifest_rsp(zcbor_state_t *state, - struct suit_authenticate_manifest_rsp *result); +decode_suit_trigger_update_rsp(zcbor_state_t *state, + struct suit_trigger_update_rsp *result); +static bool decode_suit_check_installed_component_digest_rsp( + zcbor_state_t *state, + struct suit_check_installed_component_digest_rsp *result); +static bool decode_suit_get_installed_manifest_info_rsp( + zcbor_state_t *state, struct suit_get_installed_manifest_info_rsp *result); +static bool decode_suit_get_install_candidate_info_rsp( + zcbor_state_t *state, struct suit_get_install_candidate_info_rsp *result); +static bool decode_suit_authenticate_manifest_rsp( + zcbor_state_t *state, struct suit_authenticate_manifest_rsp *result); +static bool decode_suit_authorize_unsigned_manifest_rsp( + zcbor_state_t *state, struct suit_authorize_unsigned_manifest_rsp *result); static bool -decode_suit_authorize_unsigned_manifest_rsp(zcbor_state_t *state, - struct suit_authorize_unsigned_manifest_rsp *result); -static bool decode_suit_authorize_seq_num_rsp(zcbor_state_t *state, - struct suit_authorize_seq_num_rsp *result); +decode_suit_authorize_seq_num_rsp(zcbor_state_t *state, + struct suit_authorize_seq_num_rsp *result); static bool decode_suit_check_component_compatibility_rsp( - zcbor_state_t *state, struct suit_check_component_compatibility_rsp *result); + zcbor_state_t *state, + struct suit_check_component_compatibility_rsp *result); +static bool decode_suit_get_supported_manifest_roles_rsp( + zcbor_state_t *state, struct suit_get_supported_manifest_roles_rsp *result); +static bool decode_suit_get_supported_manifest_info_rsp( + zcbor_state_t *state, struct suit_get_supported_manifest_info_rsp *result); +static bool decode_suit_authorize_process_dependency_rsp( + zcbor_state_t *state, struct suit_authorize_process_dependency_rsp *result); static bool -decode_suit_get_supported_manifest_roles_rsp(zcbor_state_t *state, - struct suit_get_supported_manifest_roles_rsp *result); +decode_suit_get_manifest_var_rsp(zcbor_state_t *state, + struct suit_get_manifest_var_rsp *result); static bool -decode_suit_get_supported_manifest_info_rsp(zcbor_state_t *state, - struct suit_get_supported_manifest_info_rsp *result); +decode_suit_set_manifest_var_rsp(zcbor_state_t *state, + struct suit_set_manifest_var_rsp *result); +static bool decode_suit_evt_sub_rsp(zcbor_state_t *state, + struct suit_evt_sub_rsp *result); static bool -decode_suit_authorize_process_dependency_rsp(zcbor_state_t *state, - struct suit_authorize_process_dependency_rsp *result); -static bool decode_suit_evt_sub_rsp(zcbor_state_t *state, struct suit_evt_sub_rsp *result); -static bool decode_suit_chunk_enqueue_rsp(zcbor_state_t *state, - struct suit_chunk_enqueue_rsp *result); +decode_suit_chunk_enqueue_rsp(zcbor_state_t *state, + struct suit_chunk_enqueue_rsp *result); static bool decode_suit_chunk_info_entry(zcbor_state_t *state, - struct suit_chunk_info_entry *result); + struct suit_chunk_info_entry *result); static bool decode_suit_chunk_status_rsp(zcbor_state_t *state, - struct suit_chunk_status_rsp *result); -static bool decode_suit_boot_mode_read_rsp(zcbor_state_t *state, - struct suit_boot_mode_read_rsp *result); -static bool decode_suit_invoke_confirm_rsp(zcbor_state_t *state, - struct suit_invoke_confirm_rsp *result); -static bool decode_suit_boot_flags_reset_rsp(zcbor_state_t *state, - struct suit_boot_flags_reset_rsp *result); + struct suit_chunk_status_rsp *result); static bool -decode_suit_foreground_dfu_required_rsp(zcbor_state_t *state, - struct suit_foreground_dfu_required_rsp *result); +decode_suit_boot_mode_read_rsp(zcbor_state_t *state, + struct suit_boot_mode_read_rsp *result); +static bool +decode_suit_invoke_confirm_rsp(zcbor_state_t *state, + struct suit_invoke_confirm_rsp *result); +static bool +decode_suit_boot_flags_reset_rsp(zcbor_state_t *state, + struct suit_boot_flags_reset_rsp *result); +static bool decode_suit_foreground_dfu_required_rsp( + zcbor_state_t *state, struct suit_foreground_dfu_required_rsp *result); static bool decode_suit_nfy(zcbor_state_t *state, struct suit_nfy *result); static bool decode_suit_rsp(zcbor_state_t *state, struct suit_rsp *result); static bool decode_suit_req(zcbor_state_t *state, struct suit_req *result); -static bool decode_suit_missing_image_evt_nfy(zcbor_state_t *state, - struct suit_missing_image_evt_nfy *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_expect(state, (41)))) && - ((zcbor_bstr_decode(state, (&(*result).suit_missing_image_evt_nfy_resource_id)))) && - ((zcbor_uint32_decode( - state, (&(*result).suit_missing_image_evt_nfy_stream_session_id))))))); - - log_result(state, res, __func__); - return res; +static bool +decode_suit_missing_image_evt_nfy(zcbor_state_t *state, + struct suit_missing_image_evt_nfy *result) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_expect(state, (41)))) && + ((zcbor_bstr_decode( + state, (&(*result).suit_missing_image_evt_nfy_resource_id)))) && + ((zcbor_uint32_decode( + state, + (&(*result).suit_missing_image_evt_nfy_stream_session_id))))))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_chunk_status_evt_nfy(zcbor_state_t *state, - struct suit_chunk_status_evt_nfy *result) -{ - zcbor_log("%s\r\n", __func__); +static bool +decode_suit_chunk_status_evt_nfy(zcbor_state_t *state, + struct suit_chunk_status_evt_nfy *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (42)))) && - ((zcbor_uint32_decode( - state, (&(*result).suit_chunk_status_evt_nfy_stream_session_id))))))); + bool res = ((( + ((zcbor_uint32_expect(state, (42)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_chunk_status_evt_nfy_stream_session_id))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_cache_info_entry(zcbor_state_t *state, struct suit_cache_info_entry *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_cache_info_entry(zcbor_state_t *state, + struct suit_cache_info_entry *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_decode(state, (&(*result).suit_cache_info_entry_addr)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_cache_info_entry_size))))))); + bool res = ((( + ((zcbor_uint32_decode(state, (&(*result).suit_cache_info_entry_addr)))) && + ((zcbor_uint32_decode(state, + (&(*result).suit_cache_info_entry_size))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_trigger_update_req(zcbor_state_t *state, - struct suit_trigger_update_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (1)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_trigger_update_req_addr)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_trigger_update_req_size)))) && - ((zcbor_list_start_decode(state) && - ((zcbor_multi_decode( - 0, 6, - &(*result).suit_trigger_update_req_caches_suit_cache_info_entry_m_count, - (zcbor_decoder_t *)decode_suit_cache_info_entry, state, - (*&(*result).suit_trigger_update_req_caches_suit_cache_info_entry_m), - sizeof(struct suit_cache_info_entry))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state)))))); - - if (false) { - /* For testing that the types of the arguments are correct. - * A compiler error here means a bug in zcbor. - */ - decode_suit_cache_info_entry( - state, - (*&(*result).suit_trigger_update_req_caches_suit_cache_info_entry_m)); - } - - log_result(state, res, __func__); - return res; +static bool +decode_suit_trigger_update_req(zcbor_state_t *state, + struct suit_trigger_update_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (1)))) && + ((zcbor_uint32_decode(state, + (&(*result).suit_trigger_update_req_addr)))) && + ((zcbor_uint32_decode(state, + (&(*result).suit_trigger_update_req_size)))) && + ((zcbor_list_start_decode(state) && + ((zcbor_multi_decode( + 0, 6, + &(*result) + .suit_trigger_update_req_caches_suit_cache_info_entry_m_count, + (zcbor_decoder_t *)decode_suit_cache_info_entry, state, + (*&(*result) + .suit_trigger_update_req_caches_suit_cache_info_entry_m), + sizeof(struct suit_cache_info_entry))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state)))))); + + if (false) { + /* For testing that the types of the arguments are correct. + * A compiler error here means a bug in zcbor. + */ + decode_suit_cache_info_entry( + state, + (*&(*result).suit_trigger_update_req_caches_suit_cache_info_entry_m)); + } + + log_result(state, res, __func__); + return res; } static bool decode_suit_check_installed_component_digest_req( - zcbor_state_t *state, struct suit_check_installed_component_digest_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (2)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_check_installed_component_digest_req_component_id)))) && - ((zcbor_int32_decode( - state, (&(*result).suit_check_installed_component_digest_req_alg_id)))) && - ((zcbor_bstr_decode( - state, (&(*result).suit_check_installed_component_digest_req_digest))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + struct suit_check_installed_component_digest_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_expect(state, (2)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_check_installed_component_digest_req_component_id)))) && + ((zcbor_int32_decode( + state, + (&(*result).suit_check_installed_component_digest_req_alg_id)))) && + ((zcbor_bstr_decode( + state, + (&(*result).suit_check_installed_component_digest_req_digest))))))); + + log_result(state, res, __func__); + return res; } -static bool -decode_suit_get_installed_manifest_info_req(zcbor_state_t *state, - struct suit_get_installed_manifest_info_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (3)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_get_installed_manifest_info_req_manifest_class_id))))))); - - log_result(state, res, __func__); - return res; +static bool decode_suit_get_installed_manifest_info_req( + zcbor_state_t *state, struct suit_get_installed_manifest_info_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_expect(state, (3)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_get_installed_manifest_info_req_manifest_class_id))))))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_authenticate_manifest_req(zcbor_state_t *state, - struct suit_authenticate_manifest_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_expect(state, (10)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_authenticate_manifest_req_manifest_component_id)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_authenticate_manifest_req_alg_id)))) && - ((zcbor_bstr_decode(state, (&(*result).suit_authenticate_manifest_req_key_id)))) && - ((zcbor_bstr_decode(state, - (&(*result).suit_authenticate_manifest_req_signature)))) && - ((zcbor_uint32_decode(state, - (&(*result).suit_authenticate_manifest_req_data_addr)))) && - ((zcbor_uint32_decode(state, - (&(*result).suit_authenticate_manifest_req_data_size))))))); - - log_result(state, res, __func__); - return res; +static bool decode_suit_authenticate_manifest_req( + zcbor_state_t *state, struct suit_authenticate_manifest_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_expect(state, (10)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_authenticate_manifest_req_manifest_component_id)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_authenticate_manifest_req_alg_id)))) && + ((zcbor_bstr_decode( + state, (&(*result).suit_authenticate_manifest_req_key_id)))) && + ((zcbor_bstr_decode( + state, (&(*result).suit_authenticate_manifest_req_signature)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_authenticate_manifest_req_data_addr)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_authenticate_manifest_req_data_size))))))); + + log_result(state, res, __func__); + return res; +} + +static bool decode_suit_authorize_unsigned_manifest_req( + zcbor_state_t *state, struct suit_authorize_unsigned_manifest_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (11)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_authorize_unsigned_manifest_req_manifest_component_id))))))); + + log_result(state, res, __func__); + return res; } static bool -decode_suit_authorize_unsigned_manifest_req(zcbor_state_t *state, - struct suit_authorize_unsigned_manifest_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_expect(state, (11)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_authorize_unsigned_manifest_req_manifest_component_id))))))); - - log_result(state, res, __func__); - return res; +decode_suit_authorize_seq_num_req(zcbor_state_t *state, + struct suit_authorize_seq_num_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_expect(state, (12)))) && + ((zcbor_bstr_decode( + state, + (&(*result).suit_authorize_seq_num_req_manifest_component_id)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_authorize_seq_num_req_command_seq)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_authorize_seq_num_req_seq_num))))))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_authorize_seq_num_req(zcbor_state_t *state, - struct suit_authorize_seq_num_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (12)))) && - ((zcbor_bstr_decode( - state, (&(*result).suit_authorize_seq_num_req_manifest_component_id)))) && - ((zcbor_uint32_decode(state, - (&(*result).suit_authorize_seq_num_req_command_seq)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_authorize_seq_num_req_seq_num))))))); - - log_result(state, res, __func__); - return res; +static bool decode_suit_check_component_compatibility_req( + zcbor_state_t *state, + struct suit_check_component_compatibility_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (13)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_check_component_compatibility_req_manifest_class_id)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_check_component_compatibility_req_component_id))))))); + + log_result(state, res, __func__); + return res; } -static bool -decode_suit_check_component_compatibility_req(zcbor_state_t *state, - struct suit_check_component_compatibility_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (13)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_check_component_compatibility_req_manifest_class_id)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_check_component_compatibility_req_component_id))))))); - - log_result(state, res, __func__); - return res; +static bool decode_suit_get_supported_manifest_info_req( + zcbor_state_t *state, struct suit_get_supported_manifest_info_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_expect(state, (19)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_supported_manifest_info_req_role))))))); + + log_result(state, res, __func__); + return res; +} + +static bool decode_suit_authorize_process_dependency_req( + zcbor_state_t *state, + struct suit_authorize_process_dependency_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (21)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_authorize_process_dependency_req_dependee_class_id)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_authorize_process_dependency_req_dependent_class_id)))) && + ((zcbor_int32_decode( + state, + (&(*result).suit_authorize_process_dependency_req_seq_id))))))); + + log_result(state, res, __func__); + return res; } static bool -decode_suit_get_supported_manifest_info_req(zcbor_state_t *state, - struct suit_get_supported_manifest_info_req *result) -{ - zcbor_log("%s\r\n", __func__); +decode_suit_get_manifest_var_req(zcbor_state_t *state, + struct suit_get_manifest_var_req *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (19)))) && - ((zcbor_int32_decode( - state, (&(*result).suit_get_supported_manifest_info_req_role))))))); + bool res = (((((zcbor_uint32_expect(state, (14)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_get_manifest_var_req_id))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool -decode_suit_authorize_process_dependency_req(zcbor_state_t *state, - struct suit_authorize_process_dependency_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (21)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_authorize_process_dependency_req_dependee_class_id)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_authorize_process_dependency_req_dependent_class_id)))) && - ((zcbor_int32_decode( - state, (&(*result).suit_authorize_process_dependency_req_seq_id))))))); - - log_result(state, res, __func__); - return res; +decode_suit_set_manifest_var_req(zcbor_state_t *state, + struct suit_set_manifest_var_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (((((zcbor_uint32_expect(state, (15)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_set_manifest_var_req_id)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_set_manifest_var_req_value))))))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_evt_sub_req(zcbor_state_t *state, struct suit_evt_sub_req *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_evt_sub_req(zcbor_state_t *state, + struct suit_evt_sub_req *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (40)))) && - ((zcbor_bool_decode(state, (&(*result).suit_evt_sub_req_subscribe))))))); + bool res = (( + (((zcbor_uint32_expect(state, (40)))) && + ((zcbor_bool_decode(state, (&(*result).suit_evt_sub_req_subscribe))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_chunk_enqueue_req(zcbor_state_t *state, - struct suit_chunk_enqueue_req *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = - (((((zcbor_uint32_expect(state, (43)))) && - ((zcbor_uint32_decode(state, - (&(*result).suit_chunk_enqueue_req_stream_session_id)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_chunk_enqueue_req_chunk_id)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_chunk_enqueue_req_offset)))) && - ((zcbor_bool_decode(state, (&(*result).suit_chunk_enqueue_req_last_chunk)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_chunk_enqueue_req_addr)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_chunk_enqueue_req_size))))))); - - log_result(state, res, __func__); - return res; +static bool +decode_suit_chunk_enqueue_req(zcbor_state_t *state, + struct suit_chunk_enqueue_req *result) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_expect(state, (43)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_chunk_enqueue_req_stream_session_id)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_chunk_enqueue_req_chunk_id)))) && + ((zcbor_uint32_decode(state, + (&(*result).suit_chunk_enqueue_req_offset)))) && + ((zcbor_bool_decode( + state, (&(*result).suit_chunk_enqueue_req_last_chunk)))) && + ((zcbor_uint32_decode(state, + (&(*result).suit_chunk_enqueue_req_addr)))) && + ((zcbor_uint32_decode(state, + (&(*result).suit_chunk_enqueue_req_size))))))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_chunk_status_req(zcbor_state_t *state, struct suit_chunk_status_req *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_chunk_status_req(zcbor_state_t *state, + struct suit_chunk_status_req *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (44)))) && - ((zcbor_uint32_decode( - state, (&(*result).suit_chunk_status_req_stream_session_id))))))); + bool res = + (((((zcbor_uint32_expect(state, (44)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_chunk_status_req_stream_session_id))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_invoke_confirm_req(zcbor_state_t *state, - struct suit_invoke_confirm_req *result) -{ - zcbor_log("%s\r\n", __func__); +static bool +decode_suit_invoke_confirm_req(zcbor_state_t *state, + struct suit_invoke_confirm_req *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (51)))) && - ((zcbor_int32_decode(state, (&(*result).suit_invoke_confirm_req_ret))))))); + bool res = (((((zcbor_uint32_expect(state, (51)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_invoke_confirm_req_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_trigger_update_rsp(zcbor_state_t *state, - struct suit_trigger_update_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool +decode_suit_trigger_update_rsp(zcbor_state_t *state, + struct suit_trigger_update_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (1)))) && - ((zcbor_int32_decode(state, (&(*result).suit_trigger_update_rsp_ret))))))); + bool res = (((((zcbor_uint32_expect(state, (1)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_trigger_update_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool decode_suit_check_installed_component_digest_rsp( - zcbor_state_t *state, struct suit_check_installed_component_digest_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = - (((((zcbor_uint32_expect(state, (2)))) && - ((zcbor_int32_decode( - state, (&(*result).suit_check_installed_component_digest_rsp_ret))))))); + zcbor_state_t *state, + struct suit_check_installed_component_digest_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_expect(state, (2)))) && + ((zcbor_int32_decode( + state, + (&(*result).suit_check_installed_component_digest_rsp_ret))))))); + + log_result(state, res, __func__); + return res; +} - log_result(state, res, __func__); - return res; +static bool decode_suit_get_installed_manifest_info_rsp( + zcbor_state_t *state, struct suit_get_installed_manifest_info_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (3)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_installed_manifest_info_rsp_ret)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_get_installed_manifest_info_rsp_seq_num)))) && + ((zcbor_list_start_decode(state) && + ((zcbor_multi_decode( + 0, 5, + &(*result).suit_get_installed_manifest_info_rsp_semver_int_count, + (zcbor_decoder_t *)zcbor_int32_decode, state, + (*&(*result).suit_get_installed_manifest_info_rsp_semver_int), + sizeof(int32_t))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state))) && + ((zcbor_int32_decode( + state, + (&(*result).suit_get_installed_manifest_info_rsp_digest_status)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_installed_manifest_info_rsp_alg_id)))) && + ((zcbor_bstr_decode( + state, (&(*result).suit_get_installed_manifest_info_rsp_digest))))))); + + if (false) { + /* For testing that the types of the arguments are correct. + * A compiler error here means a bug in zcbor. + */ + zcbor_int32_decode( + state, (*&(*result).suit_get_installed_manifest_info_rsp_semver_int)); + } + + log_result(state, res, __func__); + return res; } -static bool -decode_suit_get_installed_manifest_info_rsp(zcbor_state_t *state, - struct suit_get_installed_manifest_info_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_expect(state, (3)))) && - ((zcbor_int32_decode(state, - (&(*result).suit_get_installed_manifest_info_rsp_ret)))) && - ((zcbor_uint32_decode( - state, (&(*result).suit_get_installed_manifest_info_rsp_seq_num)))) && - ((zcbor_list_start_decode(state) && - ((zcbor_multi_decode( - 0, 5, &(*result).suit_get_installed_manifest_info_rsp_semver_int_count, - (zcbor_decoder_t *)zcbor_int32_decode, state, - (*&(*result).suit_get_installed_manifest_info_rsp_semver_int), - sizeof(int32_t))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state))) && - ((zcbor_int32_decode( - state, (&(*result).suit_get_installed_manifest_info_rsp_digest_status)))) && - ((zcbor_int32_decode(state, - (&(*result).suit_get_installed_manifest_info_rsp_alg_id)))) && - ((zcbor_bstr_decode(state, - (&(*result).suit_get_installed_manifest_info_rsp_digest))))))); - - if (false) { - /* For testing that the types of the arguments are correct. - * A compiler error here means a bug in zcbor. - */ - zcbor_int32_decode(state, - (*&(*result).suit_get_installed_manifest_info_rsp_semver_int)); - } - - log_result(state, res, __func__); - return res; +static bool decode_suit_get_install_candidate_info_rsp( + zcbor_state_t *state, struct suit_get_install_candidate_info_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_expect(state, (4)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_install_candidate_info_rsp_ret)))) && + ((zcbor_bstr_decode( + state, + (&(*result) + .suit_get_install_candidate_info_rsp_manifest_class_id)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_get_install_candidate_info_rsp_seq_num)))) && + ((zcbor_list_start_decode(state) && + ((zcbor_multi_decode( + 0, 5, + &(*result).suit_get_install_candidate_info_rsp_semver_int_count, + (zcbor_decoder_t *)zcbor_int32_decode, state, + (*&(*result).suit_get_install_candidate_info_rsp_semver_int), + sizeof(int32_t))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_install_candidate_info_rsp_alg_id)))) && + ((zcbor_bstr_decode( + state, (&(*result).suit_get_install_candidate_info_rsp_digest))))))); + + if (false) { + /* For testing that the types of the arguments are correct. + * A compiler error here means a bug in zcbor. + */ + zcbor_int32_decode( + state, (*&(*result).suit_get_install_candidate_info_rsp_semver_int)); + } + + log_result(state, res, __func__); + return res; } -static bool -decode_suit_get_install_candidate_info_rsp(zcbor_state_t *state, - struct suit_get_install_candidate_info_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_expect(state, (4)))) && - ((zcbor_int32_decode(state, - (&(*result).suit_get_install_candidate_info_rsp_ret)))) && - ((zcbor_bstr_decode( - state, - (&(*result).suit_get_install_candidate_info_rsp_manifest_class_id)))) && - ((zcbor_uint32_decode(state, - (&(*result).suit_get_install_candidate_info_rsp_seq_num)))) && - ((zcbor_list_start_decode(state) && - ((zcbor_multi_decode( - 0, 5, &(*result).suit_get_install_candidate_info_rsp_semver_int_count, - (zcbor_decoder_t *)zcbor_int32_decode, state, - (*&(*result).suit_get_install_candidate_info_rsp_semver_int), - sizeof(int32_t))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state))) && - ((zcbor_int32_decode(state, - (&(*result).suit_get_install_candidate_info_rsp_alg_id)))) && - ((zcbor_bstr_decode(state, - (&(*result).suit_get_install_candidate_info_rsp_digest))))))); - - if (false) { - /* For testing that the types of the arguments are correct. - * A compiler error here means a bug in zcbor. - */ - zcbor_int32_decode(state, - (*&(*result).suit_get_install_candidate_info_rsp_semver_int)); - } - - log_result(state, res, __func__); - return res; +static bool decode_suit_authenticate_manifest_rsp( + zcbor_state_t *state, struct suit_authenticate_manifest_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_expect(state, (10)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_authenticate_manifest_rsp_ret))))))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_authenticate_manifest_rsp(zcbor_state_t *state, - struct suit_authenticate_manifest_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_authorize_unsigned_manifest_rsp( + zcbor_state_t *state, struct suit_authorize_unsigned_manifest_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (( - (((zcbor_uint32_expect(state, (10)))) && - ((zcbor_int32_decode(state, (&(*result).suit_authenticate_manifest_rsp_ret))))))); + bool res = + (((((zcbor_uint32_expect(state, (11)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_authorize_unsigned_manifest_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool -decode_suit_authorize_unsigned_manifest_rsp(zcbor_state_t *state, - struct suit_authorize_unsigned_manifest_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +decode_suit_authorize_seq_num_rsp(zcbor_state_t *state, + struct suit_authorize_seq_num_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (11)))) && - ((zcbor_int32_decode( - state, (&(*result).suit_authorize_unsigned_manifest_rsp_ret))))))); + bool res = (((((zcbor_uint32_expect(state, (12)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_authorize_seq_num_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_authorize_seq_num_rsp(zcbor_state_t *state, - struct suit_authorize_seq_num_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_check_component_compatibility_rsp( + zcbor_state_t *state, + struct suit_check_component_compatibility_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (12)))) && - ((zcbor_int32_decode(state, (&(*result).suit_authorize_seq_num_rsp_ret))))))); + bool res = (( + (((zcbor_uint32_expect(state, (13)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_check_component_compatibility_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool -decode_suit_check_component_compatibility_rsp(zcbor_state_t *state, - struct suit_check_component_compatibility_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (((((zcbor_uint32_expect(state, (13)))) && - ((zcbor_int32_decode( - state, (&(*result).suit_check_component_compatibility_rsp_ret))))))); +static bool decode_suit_get_supported_manifest_roles_rsp( + zcbor_state_t *state, + struct suit_get_supported_manifest_roles_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_expect(state, (18)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_supported_manifest_roles_rsp_ret)))) && + ((zcbor_list_start_decode(state) && + ((zcbor_multi_decode( + 0, 20, + &(*result).suit_get_supported_manifest_roles_rsp_roles_int_count, + (zcbor_decoder_t *)zcbor_int32_decode, state, + (*&(*result).suit_get_supported_manifest_roles_rsp_roles_int), + sizeof(int32_t))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state)))))); + + if (false) { + /* For testing that the types of the arguments are correct. + * A compiler error here means a bug in zcbor. + */ + zcbor_int32_decode( + state, (*&(*result).suit_get_supported_manifest_roles_rsp_roles_int)); + } + + log_result(state, res, __func__); + return res; +} - log_result(state, res, __func__); - return res; +static bool decode_suit_get_supported_manifest_info_rsp( + zcbor_state_t *state, struct suit_get_supported_manifest_info_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (19)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_supported_manifest_info_rsp_ret)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_supported_manifest_info_rsp_role)))) && + ((zcbor_bstr_decode( + state, + (&(*result).suit_get_supported_manifest_info_rsp_vendor_id)))) && + ((zcbor_bstr_decode( + state, + (&(*result).suit_get_supported_manifest_info_rsp_class_id)))) && + ((zcbor_int32_decode( + state, + (&(*result) + .suit_get_supported_manifest_info_rsp_downgrade_prevention_policy)))) && + ((zcbor_int32_decode( + state, + (&(*result) + .suit_get_supported_manifest_info_rsp_independent_updateability_policy)))) && + ((zcbor_int32_decode( + state, + (&(*result) + .suit_get_supported_manifest_info_rsp_signature_verification_policy))))))); + + log_result(state, res, __func__); + return res; } -static bool -decode_suit_get_supported_manifest_roles_rsp(zcbor_state_t *state, - struct suit_get_supported_manifest_roles_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (18)))) && - ((zcbor_int32_decode(state, - (&(*result).suit_get_supported_manifest_roles_rsp_ret)))) && - ((zcbor_list_start_decode(state) && - ((zcbor_multi_decode( - 0, 20, &(*result).suit_get_supported_manifest_roles_rsp_roles_int_count, - (zcbor_decoder_t *)zcbor_int32_decode, state, - (*&(*result).suit_get_supported_manifest_roles_rsp_roles_int), - sizeof(int32_t))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state)))))); - - if (false) { - /* For testing that the types of the arguments are correct. - * A compiler error here means a bug in zcbor. - */ - zcbor_int32_decode(state, - (*&(*result).suit_get_supported_manifest_roles_rsp_roles_int)); - } - - log_result(state, res, __func__); - return res; +static bool decode_suit_authorize_process_dependency_rsp( + zcbor_state_t *state, + struct suit_authorize_process_dependency_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_expect(state, (21)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_authorize_process_dependency_rsp_ret))))))); + + log_result(state, res, __func__); + return res; } static bool -decode_suit_get_supported_manifest_info_rsp(zcbor_state_t *state, - struct suit_get_supported_manifest_info_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_expect(state, (19)))) && - ((zcbor_int32_decode(state, - (&(*result).suit_get_supported_manifest_info_rsp_ret)))) && - ((zcbor_int32_decode(state, - (&(*result).suit_get_supported_manifest_info_rsp_role)))) && - ((zcbor_bstr_decode( - state, (&(*result).suit_get_supported_manifest_info_rsp_vendor_id)))) && - ((zcbor_bstr_decode(state, - (&(*result).suit_get_supported_manifest_info_rsp_class_id)))) && - ((zcbor_int32_decode( - state, - (&(*result) - .suit_get_supported_manifest_info_rsp_downgrade_prevention_policy)))) && - ((zcbor_int32_decode( - state, - (&(*result) - .suit_get_supported_manifest_info_rsp_independent_updateability_policy)))) && - ((zcbor_int32_decode( - state, - (&(*result) - .suit_get_supported_manifest_info_rsp_signature_verification_policy))))))); - - log_result(state, res, __func__); - return res; +decode_suit_get_manifest_var_rsp(zcbor_state_t *state, + struct suit_get_manifest_var_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = (((((zcbor_uint32_expect(state, (14)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_get_manifest_var_rsp_ret)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_get_manifest_var_rsp_value))))))); + + log_result(state, res, __func__); + return res; } static bool -decode_suit_authorize_process_dependency_rsp(zcbor_state_t *state, - struct suit_authorize_process_dependency_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +decode_suit_set_manifest_var_rsp(zcbor_state_t *state, + struct suit_set_manifest_var_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (21)))) && - ((zcbor_int32_decode( - state, (&(*result).suit_authorize_process_dependency_rsp_ret))))))); + bool res = (((((zcbor_uint32_expect(state, (15)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_set_manifest_var_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_evt_sub_rsp(zcbor_state_t *state, struct suit_evt_sub_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_evt_sub_rsp(zcbor_state_t *state, + struct suit_evt_sub_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (40)))) && - ((zcbor_int32_decode(state, (&(*result).suit_evt_sub_rsp_ret))))))); + bool res = + (((((zcbor_uint32_expect(state, (40)))) && + ((zcbor_int32_decode(state, (&(*result).suit_evt_sub_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_chunk_enqueue_rsp(zcbor_state_t *state, - struct suit_chunk_enqueue_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool +decode_suit_chunk_enqueue_rsp(zcbor_state_t *state, + struct suit_chunk_enqueue_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (43)))) && - ((zcbor_int32_decode(state, (&(*result).suit_chunk_enqueue_rsp_ret))))))); + bool res = ((( + ((zcbor_uint32_expect(state, (43)))) && + ((zcbor_int32_decode(state, (&(*result).suit_chunk_enqueue_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_chunk_info_entry(zcbor_state_t *state, struct suit_chunk_info_entry *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_chunk_info_entry(zcbor_state_t *state, + struct suit_chunk_info_entry *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_decode(state, (&(*result).suit_chunk_info_entry_chunk_id)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_chunk_info_entry_status))))))); + bool res = (((((zcbor_uint32_decode( + state, (&(*result).suit_chunk_info_entry_chunk_id)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_chunk_info_entry_status))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_chunk_status_rsp(zcbor_state_t *state, struct suit_chunk_status_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_expect(state, (44)))) && - ((zcbor_int32_decode(state, (&(*result).suit_chunk_status_rsp_ret)))) && - ((zcbor_list_start_decode(state) && - ((zcbor_multi_decode( - 0, 3, - &(*result).suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m_count, - (zcbor_decoder_t *)decode_suit_chunk_info_entry, state, - (*&(*result).suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m), - sizeof(struct suit_chunk_info_entry))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state)))))); - - if (false) { - /* For testing that the types of the arguments are correct. - * A compiler error here means a bug in zcbor. - */ - decode_suit_chunk_info_entry( - state, - (*&(*result).suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m)); - } - - log_result(state, res, __func__); - return res; +static bool decode_suit_chunk_status_rsp(zcbor_state_t *state, + struct suit_chunk_status_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (44)))) && + ((zcbor_int32_decode(state, (&(*result).suit_chunk_status_rsp_ret)))) && + ((zcbor_list_start_decode(state) && + ((zcbor_multi_decode( + 0, 3, + &(*result) + .suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m_count, + (zcbor_decoder_t *)decode_suit_chunk_info_entry, state, + (*&(*result) + .suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m), + sizeof(struct suit_chunk_info_entry))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state)))))); + + if (false) { + /* For testing that the types of the arguments are correct. + * A compiler error here means a bug in zcbor. + */ + decode_suit_chunk_info_entry( + state, + (*&(*result).suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m)); + } + + log_result(state, res, __func__); + return res; } -static bool decode_suit_boot_mode_read_rsp(zcbor_state_t *state, - struct suit_boot_mode_read_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_expect(state, (50)))) && - ((zcbor_int32_decode(state, (&(*result).suit_boot_mode_read_rsp_ret)))) && - ((zcbor_uint32_decode(state, (&(*result).suit_boot_mode_read_rsp_boot_mode))))))); - - log_result(state, res, __func__); - return res; +static bool +decode_suit_boot_mode_read_rsp(zcbor_state_t *state, + struct suit_boot_mode_read_rsp *result) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_expect(state, (50)))) && + ((zcbor_int32_decode(state, (&(*result).suit_boot_mode_read_rsp_ret)))) && + ((zcbor_uint32_decode( + state, (&(*result).suit_boot_mode_read_rsp_boot_mode))))))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_invoke_confirm_rsp(zcbor_state_t *state, - struct suit_invoke_confirm_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool +decode_suit_invoke_confirm_rsp(zcbor_state_t *state, + struct suit_invoke_confirm_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (51)))) && - ((zcbor_int32_decode(state, (&(*result).suit_invoke_confirm_rsp_ret))))))); + bool res = (((((zcbor_uint32_expect(state, (51)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_invoke_confirm_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_boot_flags_reset_rsp(zcbor_state_t *state, - struct suit_boot_flags_reset_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool +decode_suit_boot_flags_reset_rsp(zcbor_state_t *state, + struct suit_boot_flags_reset_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_expect(state, (52)))) && - ((zcbor_int32_decode(state, (&(*result).suit_boot_flags_reset_rsp_ret))))))); + bool res = (((((zcbor_uint32_expect(state, (52)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_boot_flags_reset_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_foreground_dfu_required_rsp(zcbor_state_t *state, - struct suit_foreground_dfu_required_rsp *result) -{ - zcbor_log("%s\r\n", __func__); +static bool decode_suit_foreground_dfu_required_rsp( + zcbor_state_t *state, struct suit_foreground_dfu_required_rsp *result) { + zcbor_log("%s\r\n", __func__); - bool res = ((( - ((zcbor_uint32_expect(state, (53)))) && - ((zcbor_int32_decode(state, (&(*result).suit_foreground_dfu_required_rsp_ret))))))); + bool res = + (((((zcbor_uint32_expect(state, (53)))) && + ((zcbor_int32_decode( + state, (&(*result).suit_foreground_dfu_required_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool decode_suit_nfy(zcbor_state_t *state, struct suit_nfy *result) -{ - zcbor_log("%s\r\n", __func__); - bool int_res; - - bool res = (( - (zcbor_list_start_decode(state) && - ((((zcbor_union_start_code(state) && - (int_res = - ((((decode_suit_missing_image_evt_nfy( - state, - (&(*result).suit_nfy_msg_suit_missing_image_evt_nfy_m)))) && - (((*result).suit_nfy_msg_choice = - suit_nfy_msg_suit_missing_image_evt_nfy_m_c), - true)) || - (zcbor_union_elem_code(state) && - (((decode_suit_chunk_status_evt_nfy( - state, - (&(*result).suit_nfy_msg_suit_chunk_status_evt_nfy_m)))) && - (((*result).suit_nfy_msg_choice = - suit_nfy_msg_suit_chunk_status_evt_nfy_m_c), - true)))), - zcbor_union_end_code(state), int_res)))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state)))); - - log_result(state, res, __func__); - return res; +static bool decode_suit_nfy(zcbor_state_t *state, struct suit_nfy *result) { + zcbor_log("%s\r\n", __func__); + bool int_res; + + bool res = + (((zcbor_list_start_decode(state) && + ((((zcbor_union_start_code(state) && + (int_res = + ((((decode_suit_missing_image_evt_nfy( + state, + (&(*result) + .suit_nfy_msg_suit_missing_image_evt_nfy_m)))) && + (((*result).suit_nfy_msg_choice = + suit_nfy_msg_suit_missing_image_evt_nfy_m_c), + true)) || + (zcbor_union_elem_code(state) && + (((decode_suit_chunk_status_evt_nfy( + state, + (&(*result) + .suit_nfy_msg_suit_chunk_status_evt_nfy_m)))) && + (((*result).suit_nfy_msg_choice = + suit_nfy_msg_suit_chunk_status_evt_nfy_m_c), + true)))), + zcbor_union_end_code(state), int_res)))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state)))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_rsp(zcbor_state_t *state, struct suit_rsp *result) -{ - zcbor_log("%s\r\n", __func__); - bool int_res; - - bool res = ((( - zcbor_list_start_decode(state) && - ((((zcbor_union_start_code(state) && - (int_res = - ((((decode_suit_trigger_update_rsp( - state, - (&(*result).suit_rsp_msg_suit_trigger_update_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_trigger_update_rsp_m_c), - true)) || - (zcbor_union_elem_code(state) && - (((decode_suit_check_installed_component_digest_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_check_installed_component_digest_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_check_installed_component_digest_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_get_installed_manifest_info_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_get_installed_manifest_info_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_get_installed_manifest_info_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_get_install_candidate_info_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_get_install_candidate_info_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_get_install_candidate_info_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_authenticate_manifest_rsp( - state, - (&(*result).suit_rsp_msg_suit_authenticate_manifest_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_authenticate_manifest_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_authorize_unsigned_manifest_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_authorize_seq_num_rsp( - state, - (&(*result).suit_rsp_msg_suit_authorize_seq_num_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_authorize_seq_num_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_check_component_compatibility_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_check_component_compatibility_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_check_component_compatibility_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_get_supported_manifest_roles_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_get_supported_manifest_info_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_get_supported_manifest_info_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_get_supported_manifest_info_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_authorize_process_dependency_rsp( - state, - (&(*result) - .suit_rsp_msg_suit_authorize_process_dependency_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_authorize_process_dependency_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_evt_sub_rsp( - state, (&(*result).suit_rsp_msg_suit_evt_sub_rsp_m)))) && - (((*result).suit_rsp_msg_choice = suit_rsp_msg_suit_evt_sub_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_chunk_enqueue_rsp( - state, (&(*result).suit_rsp_msg_suit_chunk_enqueue_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_chunk_enqueue_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_chunk_status_rsp( - state, (&(*result).suit_rsp_msg_suit_chunk_status_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_chunk_status_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_boot_mode_read_rsp( - state, - (&(*result).suit_rsp_msg_suit_boot_mode_read_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_boot_mode_read_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_invoke_confirm_rsp( - state, - (&(*result).suit_rsp_msg_suit_invoke_confirm_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_invoke_confirm_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_boot_flags_reset_rsp( - state, - (&(*result).suit_rsp_msg_suit_boot_flags_reset_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_boot_flags_reset_rsp_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_foreground_dfu_required_rsp( - state, - (&(*result).suit_rsp_msg_suit_foreground_dfu_required_rsp_m)))) && - (((*result).suit_rsp_msg_choice = - suit_rsp_msg_suit_foreground_dfu_required_rsp_m_c), - true)))), - zcbor_union_end_code(state), int_res)))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state)))); - - log_result(state, res, __func__); - return res; +static bool decode_suit_rsp(zcbor_state_t *state, struct suit_rsp *result) { + zcbor_log("%s\r\n", __func__); + bool int_res; + + bool res = ((( + zcbor_list_start_decode(state) && + ((((zcbor_union_start_code(state) && + (int_res = + ((((decode_suit_trigger_update_rsp( + state, + (&(*result).suit_rsp_msg_suit_trigger_update_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_trigger_update_rsp_m_c), + true)) || + (zcbor_union_elem_code(state) && + (((decode_suit_check_installed_component_digest_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_check_installed_component_digest_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_check_installed_component_digest_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_get_installed_manifest_info_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_get_installed_manifest_info_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_get_installed_manifest_info_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_get_install_candidate_info_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_get_install_candidate_info_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_get_install_candidate_info_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_authenticate_manifest_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_authenticate_manifest_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_authenticate_manifest_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_authorize_unsigned_manifest_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_authorize_seq_num_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_authorize_seq_num_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_authorize_seq_num_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_check_component_compatibility_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_check_component_compatibility_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_check_component_compatibility_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_get_supported_manifest_roles_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_get_supported_manifest_info_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_get_supported_manifest_info_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_get_supported_manifest_info_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_authorize_process_dependency_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_authorize_process_dependency_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_authorize_process_dependency_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_get_manifest_var_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_get_manifest_var_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_get_manifest_var_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_set_manifest_var_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_set_manifest_var_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_set_manifest_var_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_evt_sub_rsp( + state, (&(*result).suit_rsp_msg_suit_evt_sub_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_evt_sub_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_chunk_enqueue_rsp( + state, + (&(*result).suit_rsp_msg_suit_chunk_enqueue_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_chunk_enqueue_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_chunk_status_rsp( + state, + (&(*result).suit_rsp_msg_suit_chunk_status_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_chunk_status_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_boot_mode_read_rsp( + state, + (&(*result).suit_rsp_msg_suit_boot_mode_read_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_boot_mode_read_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_invoke_confirm_rsp( + state, + (&(*result).suit_rsp_msg_suit_invoke_confirm_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_invoke_confirm_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_boot_flags_reset_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_boot_flags_reset_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_boot_flags_reset_rsp_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_foreground_dfu_required_rsp( + state, + (&(*result) + .suit_rsp_msg_suit_foreground_dfu_required_rsp_m)))) && + (((*result).suit_rsp_msg_choice = + suit_rsp_msg_suit_foreground_dfu_required_rsp_m_c), + true)))), + zcbor_union_end_code(state), int_res)))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state)))); + + log_result(state, res, __func__); + return res; } -static bool decode_suit_req(zcbor_state_t *state, struct suit_req *result) -{ - zcbor_log("%s\r\n", __func__); - bool int_res; - - bool res = ((( - zcbor_list_start_decode(state) && - ((((zcbor_union_start_code(state) && - (int_res = - ((((decode_suit_trigger_update_req( - state, - (&(*result).suit_req_msg_suit_trigger_update_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_trigger_update_req_m_c), - true)) || - (zcbor_union_elem_code(state) && - (((decode_suit_check_installed_component_digest_req( - state, - (&(*result) - .suit_req_msg_suit_check_installed_component_digest_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_check_installed_component_digest_req_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_get_installed_manifest_info_req( - state, - (&(*result) - .suit_req_msg_suit_get_installed_manifest_info_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_get_installed_manifest_info_req_m_c), - true))) || - (((zcbor_uint32_expect_union(state, (4)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_get_install_candidate_info_req_m_c), - true)) || - (((decode_suit_authenticate_manifest_req( - state, - (&(*result).suit_req_msg_suit_authenticate_manifest_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_authenticate_manifest_req_m_c), - true)) || - (zcbor_union_elem_code(state) && - (((decode_suit_authorize_unsigned_manifest_req( - state, - (&(*result) - .suit_req_msg_suit_authorize_unsigned_manifest_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_authorize_unsigned_manifest_req_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_authorize_seq_num_req( - state, - (&(*result).suit_req_msg_suit_authorize_seq_num_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_authorize_seq_num_req_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_check_component_compatibility_req( - state, - (&(*result) - .suit_req_msg_suit_check_component_compatibility_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_check_component_compatibility_req_m_c), - true))) || - (((zcbor_uint32_expect_union(state, (18)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_get_supported_manifest_roles_req_m_c), - true)) || - (((decode_suit_get_supported_manifest_info_req( - state, - (&(*result) - .suit_req_msg_suit_get_supported_manifest_info_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_get_supported_manifest_info_req_m_c), - true)) || - (zcbor_union_elem_code(state) && - (((decode_suit_authorize_process_dependency_req( - state, - (&(*result) - .suit_req_msg_suit_authorize_process_dependency_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_authorize_process_dependency_req_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_evt_sub_req( - state, (&(*result).suit_req_msg_suit_evt_sub_req_m)))) && - (((*result).suit_req_msg_choice = suit_req_msg_suit_evt_sub_req_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_chunk_enqueue_req( - state, (&(*result).suit_req_msg_suit_chunk_enqueue_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_chunk_enqueue_req_m_c), - true))) || - (zcbor_union_elem_code(state) && - (((decode_suit_chunk_status_req( - state, (&(*result).suit_req_msg_suit_chunk_status_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_chunk_status_req_m_c), - true))) || - (((zcbor_uint32_expect_union(state, (50)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_boot_mode_read_req_m_c), - true)) || - (((decode_suit_invoke_confirm_req( - state, - (&(*result).suit_req_msg_suit_invoke_confirm_req_m)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_invoke_confirm_req_m_c), - true)) || - (((zcbor_uint32_expect_union(state, (52)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_boot_flags_reset_req_m_c), - true)) || - (((zcbor_uint32_expect_union(state, (53)))) && - (((*result).suit_req_msg_choice = - suit_req_msg_suit_foreground_dfu_required_req_m_c), - true))), - zcbor_union_end_code(state), int_res)))) || - (zcbor_list_map_end_force_decode(state), false)) && - zcbor_list_end_decode(state)))); - - log_result(state, res, __func__); - return res; +static bool decode_suit_req(zcbor_state_t *state, struct suit_req *result) { + zcbor_log("%s\r\n", __func__); + bool int_res; + + bool res = ((( + zcbor_list_start_decode(state) && + ((((zcbor_union_start_code(state) && + (int_res = + ((((decode_suit_trigger_update_req( + state, + (&(*result).suit_req_msg_suit_trigger_update_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_trigger_update_req_m_c), + true)) || + (zcbor_union_elem_code(state) && + (((decode_suit_check_installed_component_digest_req( + state, + (&(*result) + .suit_req_msg_suit_check_installed_component_digest_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_check_installed_component_digest_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_get_installed_manifest_info_req( + state, + (&(*result) + .suit_req_msg_suit_get_installed_manifest_info_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_get_installed_manifest_info_req_m_c), + true))) || + (((zcbor_uint32_expect_union(state, (4)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_get_install_candidate_info_req_m_c), + true)) || + (((decode_suit_authenticate_manifest_req( + state, + (&(*result) + .suit_req_msg_suit_authenticate_manifest_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_authenticate_manifest_req_m_c), + true)) || + (zcbor_union_elem_code(state) && + (((decode_suit_authorize_unsigned_manifest_req( + state, + (&(*result) + .suit_req_msg_suit_authorize_unsigned_manifest_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_authorize_unsigned_manifest_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_authorize_seq_num_req( + state, + (&(*result) + .suit_req_msg_suit_authorize_seq_num_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_authorize_seq_num_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_check_component_compatibility_req( + state, + (&(*result) + .suit_req_msg_suit_check_component_compatibility_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_check_component_compatibility_req_m_c), + true))) || + (((zcbor_uint32_expect_union(state, (18)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_get_supported_manifest_roles_req_m_c), + true)) || + (((decode_suit_get_supported_manifest_info_req( + state, + (&(*result) + .suit_req_msg_suit_get_supported_manifest_info_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_get_supported_manifest_info_req_m_c), + true)) || + (zcbor_union_elem_code(state) && + (((decode_suit_authorize_process_dependency_req( + state, + (&(*result) + .suit_req_msg_suit_authorize_process_dependency_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_authorize_process_dependency_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_get_manifest_var_req( + state, + (&(*result) + .suit_req_msg_suit_get_manifest_var_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_get_manifest_var_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_set_manifest_var_req( + state, + (&(*result) + .suit_req_msg_suit_set_manifest_var_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_set_manifest_var_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_evt_sub_req( + state, (&(*result).suit_req_msg_suit_evt_sub_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_evt_sub_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_chunk_enqueue_req( + state, + (&(*result).suit_req_msg_suit_chunk_enqueue_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_chunk_enqueue_req_m_c), + true))) || + (zcbor_union_elem_code(state) && + (((decode_suit_chunk_status_req( + state, + (&(*result).suit_req_msg_suit_chunk_status_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_chunk_status_req_m_c), + true))) || + (((zcbor_uint32_expect_union(state, (50)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_boot_mode_read_req_m_c), + true)) || + (((decode_suit_invoke_confirm_req( + state, + (&(*result).suit_req_msg_suit_invoke_confirm_req_m)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_invoke_confirm_req_m_c), + true)) || + (((zcbor_uint32_expect_union(state, (52)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_boot_flags_reset_req_m_c), + true)) || + (((zcbor_uint32_expect_union(state, (53)))) && + (((*result).suit_req_msg_choice = + suit_req_msg_suit_foreground_dfu_required_req_m_c), + true))), + zcbor_union_end_code(state), int_res)))) || + (zcbor_list_map_end_force_decode(state), false)) && + zcbor_list_end_decode(state)))); + + log_result(state, res, __func__); + return res; } -int cbor_decode_suit_req(const uint8_t *payload, size_t payload_len, struct suit_req *result, - size_t *payload_len_out) -{ - zcbor_state_t states[5]; +int cbor_decode_suit_req(const uint8_t *payload, size_t payload_len, + struct suit_req *result, size_t *payload_len_out) { + zcbor_state_t states[5]; - return zcbor_entry_function(payload, payload_len, (void *)result, payload_len_out, states, - (zcbor_decoder_t *)decode_suit_req, - sizeof(states) / sizeof(zcbor_state_t), 1); + return zcbor_entry_function(payload, payload_len, (void *)result, + payload_len_out, states, + (zcbor_decoder_t *)decode_suit_req, + sizeof(states) / sizeof(zcbor_state_t), 1); } -int cbor_decode_suit_rsp(const uint8_t *payload, size_t payload_len, struct suit_rsp *result, - size_t *payload_len_out) -{ - zcbor_state_t states[5]; +int cbor_decode_suit_rsp(const uint8_t *payload, size_t payload_len, + struct suit_rsp *result, size_t *payload_len_out) { + zcbor_state_t states[5]; - return zcbor_entry_function(payload, payload_len, (void *)result, payload_len_out, states, - (zcbor_decoder_t *)decode_suit_rsp, - sizeof(states) / sizeof(zcbor_state_t), 1); + return zcbor_entry_function(payload, payload_len, (void *)result, + payload_len_out, states, + (zcbor_decoder_t *)decode_suit_rsp, + sizeof(states) / sizeof(zcbor_state_t), 1); } -int cbor_decode_suit_nfy(const uint8_t *payload, size_t payload_len, struct suit_nfy *result, - size_t *payload_len_out) -{ - zcbor_state_t states[4]; +int cbor_decode_suit_nfy(const uint8_t *payload, size_t payload_len, + struct suit_nfy *result, size_t *payload_len_out) { + zcbor_state_t states[4]; - return zcbor_entry_function(payload, payload_len, (void *)result, payload_len_out, states, - (zcbor_decoder_t *)decode_suit_nfy, - sizeof(states) / sizeof(zcbor_state_t), 1); + return zcbor_entry_function(payload, payload_len, (void *)result, + payload_len_out, states, + (zcbor_decoder_t *)decode_suit_nfy, + sizeof(states) / sizeof(zcbor_state_t), 1); } diff --git a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.h b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.h index 69299a8d0e5e..027e454b4e24 100644 --- a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.h +++ b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_decode.h @@ -13,28 +13,29 @@ #ifndef SUIT_SERVICE_DECODE_H__ #define SUIT_SERVICE_DECODE_H__ -#include +#include "suit_service_types.h" #include #include +#include #include -#include "suit_service_types.h" #ifdef __cplusplus extern "C" { #endif #if DEFAULT_MAX_QTY != 3 -#error "The type file was generated with a different default_max_qty than this file" +#error \ + "The type file was generated with a different default_max_qty than this file" #endif -int cbor_decode_suit_req(const uint8_t *payload, size_t payload_len, struct suit_req *result, - size_t *payload_len_out); +int cbor_decode_suit_req(const uint8_t *payload, size_t payload_len, + struct suit_req *result, size_t *payload_len_out); -int cbor_decode_suit_rsp(const uint8_t *payload, size_t payload_len, struct suit_rsp *result, - size_t *payload_len_out); +int cbor_decode_suit_rsp(const uint8_t *payload, size_t payload_len, + struct suit_rsp *result, size_t *payload_len_out); -int cbor_decode_suit_nfy(const uint8_t *payload, size_t payload_len, struct suit_nfy *result, - size_t *payload_len_out); +int cbor_decode_suit_nfy(const uint8_t *payload, size_t payload_len, + struct suit_nfy *result, size_t *payload_len_out); #ifdef __cplusplus } diff --git a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.c b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.c index 0c4eb4d2965e..9a452ac65cf4 100644 --- a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.c +++ b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.c @@ -10,921 +10,1182 @@ * Generated with a --default-max-qty of 3 */ -#include +#include "suit_service_encode.h" +#include "zcbor_encode.h" +#include "zcbor_print.h" #include #include +#include #include -#include "zcbor_encode.h" -#include "suit_service_encode.h" -#include "zcbor_print.h" #if DEFAULT_MAX_QTY != 3 -#error "The type file was generated with a different default_max_qty than this file" +#error \ + "The type file was generated with a different default_max_qty than this file" #endif -#define log_result(state, result, func) \ - do { \ - if (!result) { \ - zcbor_trace_file(state); \ - zcbor_log("%s error: %s\r\n", func, \ - zcbor_error_str(zcbor_peek_error(state))); \ - } else { \ - zcbor_log("%s success\r\n", func); \ - } \ - } while (0) - -static bool encode_suit_missing_image_evt_nfy(zcbor_state_t *state, - const struct suit_missing_image_evt_nfy *input); -static bool encode_suit_chunk_status_evt_nfy(zcbor_state_t *state, - const struct suit_chunk_status_evt_nfy *input); -static bool encode_suit_cache_info_entry(zcbor_state_t *state, - const struct suit_cache_info_entry *input); -static bool encode_suit_trigger_update_req(zcbor_state_t *state, - const struct suit_trigger_update_req *input); +#define log_result(state, result, func) \ + do { \ + if (!result) { \ + zcbor_trace_file(state); \ + zcbor_log("%s error: %s\r\n", func, \ + zcbor_error_str(zcbor_peek_error(state))); \ + } else { \ + zcbor_log("%s success\r\n", func); \ + } \ + } while (0) + +static bool encode_suit_missing_image_evt_nfy( + zcbor_state_t *state, const struct suit_missing_image_evt_nfy *input); +static bool +encode_suit_chunk_status_evt_nfy(zcbor_state_t *state, + const struct suit_chunk_status_evt_nfy *input); +static bool +encode_suit_cache_info_entry(zcbor_state_t *state, + const struct suit_cache_info_entry *input); +static bool +encode_suit_trigger_update_req(zcbor_state_t *state, + const struct suit_trigger_update_req *input); static bool encode_suit_check_installed_component_digest_req( - zcbor_state_t *state, const struct suit_check_installed_component_digest_req *input); + zcbor_state_t *state, + const struct suit_check_installed_component_digest_req *input); static bool encode_suit_get_installed_manifest_info_req( - zcbor_state_t *state, const struct suit_get_installed_manifest_info_req *input); -static bool -encode_suit_authenticate_manifest_req(zcbor_state_t *state, - const struct suit_authenticate_manifest_req *input); + zcbor_state_t *state, + const struct suit_get_installed_manifest_info_req *input); +static bool encode_suit_authenticate_manifest_req( + zcbor_state_t *state, const struct suit_authenticate_manifest_req *input); static bool encode_suit_authorize_unsigned_manifest_req( - zcbor_state_t *state, const struct suit_authorize_unsigned_manifest_req *input); -static bool encode_suit_authorize_seq_num_req(zcbor_state_t *state, - const struct suit_authorize_seq_num_req *input); + zcbor_state_t *state, + const struct suit_authorize_unsigned_manifest_req *input); +static bool encode_suit_authorize_seq_num_req( + zcbor_state_t *state, const struct suit_authorize_seq_num_req *input); static bool encode_suit_check_component_compatibility_req( - zcbor_state_t *state, const struct suit_check_component_compatibility_req *input); + zcbor_state_t *state, + const struct suit_check_component_compatibility_req *input); static bool encode_suit_get_supported_manifest_info_req( - zcbor_state_t *state, const struct suit_get_supported_manifest_info_req *input); + zcbor_state_t *state, + const struct suit_get_supported_manifest_info_req *input); static bool encode_suit_authorize_process_dependency_req( - zcbor_state_t *state, const struct suit_authorize_process_dependency_req *input); -static bool encode_suit_evt_sub_req(zcbor_state_t *state, const struct suit_evt_sub_req *input); -static bool encode_suit_chunk_enqueue_req(zcbor_state_t *state, - const struct suit_chunk_enqueue_req *input); -static bool encode_suit_chunk_status_req(zcbor_state_t *state, - const struct suit_chunk_status_req *input); -static bool encode_suit_invoke_confirm_req(zcbor_state_t *state, - const struct suit_invoke_confirm_req *input); -static bool encode_suit_trigger_update_rsp(zcbor_state_t *state, - const struct suit_trigger_update_rsp *input); -static bool encode_suit_check_installed_component_digest_rsp( - zcbor_state_t *state, const struct suit_check_installed_component_digest_rsp *input); -static bool encode_suit_get_installed_manifest_info_rsp( - zcbor_state_t *state, const struct suit_get_installed_manifest_info_rsp *input); + zcbor_state_t *state, + const struct suit_authorize_process_dependency_req *input); +static bool +encode_suit_get_manifest_var_req(zcbor_state_t *state, + const struct suit_get_manifest_var_req *input); +static bool +encode_suit_set_manifest_var_req(zcbor_state_t *state, + const struct suit_set_manifest_var_req *input); +static bool encode_suit_evt_sub_req(zcbor_state_t *state, + const struct suit_evt_sub_req *input); static bool -encode_suit_get_install_candidate_info_rsp(zcbor_state_t *state, - const struct suit_get_install_candidate_info_rsp *input); +encode_suit_chunk_enqueue_req(zcbor_state_t *state, + const struct suit_chunk_enqueue_req *input); static bool -encode_suit_authenticate_manifest_rsp(zcbor_state_t *state, - const struct suit_authenticate_manifest_rsp *input); +encode_suit_chunk_status_req(zcbor_state_t *state, + const struct suit_chunk_status_req *input); +static bool +encode_suit_invoke_confirm_req(zcbor_state_t *state, + const struct suit_invoke_confirm_req *input); +static bool +encode_suit_trigger_update_rsp(zcbor_state_t *state, + const struct suit_trigger_update_rsp *input); +static bool encode_suit_check_installed_component_digest_rsp( + zcbor_state_t *state, + const struct suit_check_installed_component_digest_rsp *input); +static bool encode_suit_get_installed_manifest_info_rsp( + zcbor_state_t *state, + const struct suit_get_installed_manifest_info_rsp *input); +static bool encode_suit_get_install_candidate_info_rsp( + zcbor_state_t *state, + const struct suit_get_install_candidate_info_rsp *input); +static bool encode_suit_authenticate_manifest_rsp( + zcbor_state_t *state, const struct suit_authenticate_manifest_rsp *input); static bool encode_suit_authorize_unsigned_manifest_rsp( - zcbor_state_t *state, const struct suit_authorize_unsigned_manifest_rsp *input); -static bool encode_suit_authorize_seq_num_rsp(zcbor_state_t *state, - const struct suit_authorize_seq_num_rsp *input); + zcbor_state_t *state, + const struct suit_authorize_unsigned_manifest_rsp *input); +static bool encode_suit_authorize_seq_num_rsp( + zcbor_state_t *state, const struct suit_authorize_seq_num_rsp *input); static bool encode_suit_check_component_compatibility_rsp( - zcbor_state_t *state, const struct suit_check_component_compatibility_rsp *input); + zcbor_state_t *state, + const struct suit_check_component_compatibility_rsp *input); static bool encode_suit_get_supported_manifest_roles_rsp( - zcbor_state_t *state, const struct suit_get_supported_manifest_roles_rsp *input); + zcbor_state_t *state, + const struct suit_get_supported_manifest_roles_rsp *input); static bool encode_suit_get_supported_manifest_info_rsp( - zcbor_state_t *state, const struct suit_get_supported_manifest_info_rsp *input); + zcbor_state_t *state, + const struct suit_get_supported_manifest_info_rsp *input); static bool encode_suit_authorize_process_dependency_rsp( - zcbor_state_t *state, const struct suit_authorize_process_dependency_rsp *input); -static bool encode_suit_evt_sub_rsp(zcbor_state_t *state, const struct suit_evt_sub_rsp *input); -static bool encode_suit_chunk_enqueue_rsp(zcbor_state_t *state, - const struct suit_chunk_enqueue_rsp *input); -static bool encode_suit_chunk_info_entry(zcbor_state_t *state, - const struct suit_chunk_info_entry *input); -static bool encode_suit_chunk_status_rsp(zcbor_state_t *state, - const struct suit_chunk_status_rsp *input); -static bool encode_suit_boot_mode_read_rsp(zcbor_state_t *state, - const struct suit_boot_mode_read_rsp *input); -static bool encode_suit_invoke_confirm_rsp(zcbor_state_t *state, - const struct suit_invoke_confirm_rsp *input); -static bool encode_suit_boot_flags_reset_rsp(zcbor_state_t *state, - const struct suit_boot_flags_reset_rsp *input); + zcbor_state_t *state, + const struct suit_authorize_process_dependency_rsp *input); +static bool +encode_suit_get_manifest_var_rsp(zcbor_state_t *state, + const struct suit_get_manifest_var_rsp *input); static bool -encode_suit_foreground_dfu_required_rsp(zcbor_state_t *state, - const struct suit_foreground_dfu_required_rsp *input); +encode_suit_set_manifest_var_rsp(zcbor_state_t *state, + const struct suit_set_manifest_var_rsp *input); +static bool encode_suit_evt_sub_rsp(zcbor_state_t *state, + const struct suit_evt_sub_rsp *input); +static bool +encode_suit_chunk_enqueue_rsp(zcbor_state_t *state, + const struct suit_chunk_enqueue_rsp *input); +static bool +encode_suit_chunk_info_entry(zcbor_state_t *state, + const struct suit_chunk_info_entry *input); +static bool +encode_suit_chunk_status_rsp(zcbor_state_t *state, + const struct suit_chunk_status_rsp *input); +static bool +encode_suit_boot_mode_read_rsp(zcbor_state_t *state, + const struct suit_boot_mode_read_rsp *input); +static bool +encode_suit_invoke_confirm_rsp(zcbor_state_t *state, + const struct suit_invoke_confirm_rsp *input); +static bool +encode_suit_boot_flags_reset_rsp(zcbor_state_t *state, + const struct suit_boot_flags_reset_rsp *input); +static bool encode_suit_foreground_dfu_required_rsp( + zcbor_state_t *state, const struct suit_foreground_dfu_required_rsp *input); static bool encode_suit_nfy(zcbor_state_t *state, const struct suit_nfy *input); static bool encode_suit_rsp(zcbor_state_t *state, const struct suit_rsp *input); static bool encode_suit_req(zcbor_state_t *state, const struct suit_req *input); -static bool encode_suit_missing_image_evt_nfy(zcbor_state_t *state, - const struct suit_missing_image_evt_nfy *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_missing_image_evt_nfy( + zcbor_state_t *state, const struct suit_missing_image_evt_nfy *input) { + zcbor_log("%s\r\n", __func__); - bool res = (( - (((zcbor_uint32_put(state, (41)))) && - ((zcbor_bstr_encode(state, (&(*input).suit_missing_image_evt_nfy_resource_id)))) && - ((zcbor_uint32_encode( - state, (&(*input).suit_missing_image_evt_nfy_stream_session_id))))))); + bool res = ((( + ((zcbor_uint32_put(state, (41)))) && + ((zcbor_bstr_encode( + state, (&(*input).suit_missing_image_evt_nfy_resource_id)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_missing_image_evt_nfy_stream_session_id))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_chunk_status_evt_nfy(zcbor_state_t *state, - const struct suit_chunk_status_evt_nfy *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_chunk_status_evt_nfy( + zcbor_state_t *state, const struct suit_chunk_status_evt_nfy *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (42)))) && - ((zcbor_uint32_encode( - state, (&(*input).suit_chunk_status_evt_nfy_stream_session_id))))))); + bool res = (( + (((zcbor_uint32_put(state, (42)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_chunk_status_evt_nfy_stream_session_id))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_cache_info_entry(zcbor_state_t *state, - const struct suit_cache_info_entry *input) -{ - zcbor_log("%s\r\n", __func__); +static bool +encode_suit_cache_info_entry(zcbor_state_t *state, + const struct suit_cache_info_entry *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_encode(state, (&(*input).suit_cache_info_entry_addr)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_cache_info_entry_size))))))); + bool res = ((( + ((zcbor_uint32_encode(state, (&(*input).suit_cache_info_entry_addr)))) && + ((zcbor_uint32_encode(state, (&(*input).suit_cache_info_entry_size))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_trigger_update_req(zcbor_state_t *state, - const struct suit_trigger_update_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_put(state, (1)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_trigger_update_req_addr)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_trigger_update_req_size)))) && - ((zcbor_list_start_encode(state, 12) && - ((zcbor_multi_encode_minmax( - 0, 6, - &(*input).suit_trigger_update_req_caches_suit_cache_info_entry_m_count, - (zcbor_encoder_t *)encode_suit_cache_info_entry, state, - (*&(*input).suit_trigger_update_req_caches_suit_cache_info_entry_m), - sizeof(struct suit_cache_info_entry))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 12)))))); - - log_result(state, res, __func__); - return res; +static bool +encode_suit_trigger_update_req(zcbor_state_t *state, + const struct suit_trigger_update_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (1)))) && + ((zcbor_uint32_encode(state, + (&(*input).suit_trigger_update_req_addr)))) && + ((zcbor_uint32_encode(state, + (&(*input).suit_trigger_update_req_size)))) && + ((zcbor_list_start_encode(state, 12) && + ((zcbor_multi_encode_minmax( + 0, 6, + &(*input) + .suit_trigger_update_req_caches_suit_cache_info_entry_m_count, + (zcbor_encoder_t *)encode_suit_cache_info_entry, state, + (*&(*input) + .suit_trigger_update_req_caches_suit_cache_info_entry_m), + sizeof(struct suit_cache_info_entry))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 12)))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_check_installed_component_digest_req( - zcbor_state_t *state, const struct suit_check_installed_component_digest_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_put(state, (2)))) && - ((zcbor_bstr_encode( - state, - (&(*input).suit_check_installed_component_digest_req_component_id)))) && - ((zcbor_int32_encode( - state, (&(*input).suit_check_installed_component_digest_req_alg_id)))) && - ((zcbor_bstr_encode( - state, (&(*input).suit_check_installed_component_digest_req_digest))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_check_installed_component_digest_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_put(state, (2)))) && + ((zcbor_bstr_encode( + state, + (&(*input) + .suit_check_installed_component_digest_req_component_id)))) && + ((zcbor_int32_encode( + state, + (&(*input).suit_check_installed_component_digest_req_alg_id)))) && + ((zcbor_bstr_encode( + state, + (&(*input).suit_check_installed_component_digest_req_digest))))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_get_installed_manifest_info_req( - zcbor_state_t *state, const struct suit_get_installed_manifest_info_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = - (((((zcbor_uint32_put(state, (3)))) && - ((zcbor_bstr_encode( - state, - (&(*input).suit_get_installed_manifest_info_req_manifest_class_id))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_get_installed_manifest_info_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_put(state, (3)))) && + ((zcbor_bstr_encode( + state, + (&(*input) + .suit_get_installed_manifest_info_req_manifest_class_id))))))); + + log_result(state, res, __func__); + return res; } -static bool -encode_suit_authenticate_manifest_req(zcbor_state_t *state, - const struct suit_authenticate_manifest_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_put(state, (10)))) && - ((zcbor_bstr_encode( - state, (&(*input).suit_authenticate_manifest_req_manifest_component_id)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_authenticate_manifest_req_alg_id)))) && - ((zcbor_bstr_encode(state, (&(*input).suit_authenticate_manifest_req_key_id)))) && - ((zcbor_bstr_encode(state, (&(*input).suit_authenticate_manifest_req_signature)))) && - ((zcbor_uint32_encode(state, - (&(*input).suit_authenticate_manifest_req_data_addr)))) && - ((zcbor_uint32_encode(state, - (&(*input).suit_authenticate_manifest_req_data_size))))))); - - log_result(state, res, __func__); - return res; +static bool encode_suit_authenticate_manifest_req( + zcbor_state_t *state, const struct suit_authenticate_manifest_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (10)))) && + ((zcbor_bstr_encode( + state, + (&(*input).suit_authenticate_manifest_req_manifest_component_id)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_authenticate_manifest_req_alg_id)))) && + ((zcbor_bstr_encode( + state, (&(*input).suit_authenticate_manifest_req_key_id)))) && + ((zcbor_bstr_encode( + state, (&(*input).suit_authenticate_manifest_req_signature)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_authenticate_manifest_req_data_addr)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_authenticate_manifest_req_data_size))))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_authorize_unsigned_manifest_req( - zcbor_state_t *state, const struct suit_authorize_unsigned_manifest_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_put(state, (11)))) && - ((zcbor_bstr_encode( - state, - (&(*input).suit_authorize_unsigned_manifest_req_manifest_component_id))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_authorize_unsigned_manifest_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (11)))) && + ((zcbor_bstr_encode( + state, + (&(*input) + .suit_authorize_unsigned_manifest_req_manifest_component_id))))))); + + log_result(state, res, __func__); + return res; } -static bool encode_suit_authorize_seq_num_req(zcbor_state_t *state, - const struct suit_authorize_seq_num_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_put(state, (12)))) && - ((zcbor_bstr_encode( - state, (&(*input).suit_authorize_seq_num_req_manifest_component_id)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_authorize_seq_num_req_command_seq)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_authorize_seq_num_req_seq_num))))))); - - log_result(state, res, __func__); - return res; +static bool encode_suit_authorize_seq_num_req( + zcbor_state_t *state, const struct suit_authorize_seq_num_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_put(state, (12)))) && + ((zcbor_bstr_encode( + state, + (&(*input).suit_authorize_seq_num_req_manifest_component_id)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_authorize_seq_num_req_command_seq)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_authorize_seq_num_req_seq_num))))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_check_component_compatibility_req( - zcbor_state_t *state, const struct suit_check_component_compatibility_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_put(state, (13)))) && - ((zcbor_bstr_encode( - state, - (&(*input).suit_check_component_compatibility_req_manifest_class_id)))) && - ((zcbor_bstr_encode( - state, (&(*input).suit_check_component_compatibility_req_component_id))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_check_component_compatibility_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (13)))) && + ((zcbor_bstr_encode( + state, + (&(*input) + .suit_check_component_compatibility_req_manifest_class_id)))) && + ((zcbor_bstr_encode( + state, + (&(*input).suit_check_component_compatibility_req_component_id))))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_get_supported_manifest_info_req( - zcbor_state_t *state, const struct suit_get_supported_manifest_info_req *input) -{ - zcbor_log("%s\r\n", __func__); + zcbor_state_t *state, + const struct suit_get_supported_manifest_info_req *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (19)))) && - ((zcbor_int32_encode( - state, (&(*input).suit_get_supported_manifest_info_req_role))))))); + bool res = + (((((zcbor_uint32_put(state, (19)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_supported_manifest_info_req_role))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool encode_suit_authorize_process_dependency_req( - zcbor_state_t *state, const struct suit_authorize_process_dependency_req *input) -{ - zcbor_log("%s\r\n", __func__); + zcbor_state_t *state, + const struct suit_authorize_process_dependency_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (21)))) && + ((zcbor_bstr_encode( + state, + (&(*input) + .suit_authorize_process_dependency_req_dependee_class_id)))) && + ((zcbor_bstr_encode( + state, + (&(*input) + .suit_authorize_process_dependency_req_dependent_class_id)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_authorize_process_dependency_req_seq_id))))))); + + log_result(state, res, __func__); + return res; +} + +static bool encode_suit_get_manifest_var_req( + zcbor_state_t *state, const struct suit_get_manifest_var_req *input) { + zcbor_log("%s\r\n", __func__); - bool res = ((( - ((zcbor_uint32_put(state, (21)))) && - ((zcbor_bstr_encode( - state, - (&(*input).suit_authorize_process_dependency_req_dependee_class_id)))) && - ((zcbor_bstr_encode( - state, - (&(*input).suit_authorize_process_dependency_req_dependent_class_id)))) && - ((zcbor_int32_encode(state, - (&(*input).suit_authorize_process_dependency_req_seq_id))))))); + bool res = (((((zcbor_uint32_put(state, (14)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_get_manifest_var_req_id))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_evt_sub_req(zcbor_state_t *state, const struct suit_evt_sub_req *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_set_manifest_var_req( + zcbor_state_t *state, const struct suit_set_manifest_var_req *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (40)))) && - ((zcbor_bool_encode(state, (&(*input).suit_evt_sub_req_subscribe))))))); + bool res = (((((zcbor_uint32_put(state, (15)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_set_manifest_var_req_id)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_set_manifest_var_req_value))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_chunk_enqueue_req(zcbor_state_t *state, - const struct suit_chunk_enqueue_req *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_evt_sub_req(zcbor_state_t *state, + const struct suit_evt_sub_req *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (43)))) && - ((zcbor_uint32_encode( - state, (&(*input).suit_chunk_enqueue_req_stream_session_id)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_chunk_enqueue_req_chunk_id)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_chunk_enqueue_req_offset)))) && - ((zcbor_bool_encode(state, (&(*input).suit_chunk_enqueue_req_last_chunk)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_chunk_enqueue_req_addr)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_chunk_enqueue_req_size))))))); + bool res = (( + (((zcbor_uint32_put(state, (40)))) && + ((zcbor_bool_encode(state, (&(*input).suit_evt_sub_req_subscribe))))))); + + log_result(state, res, __func__); + return res; +} - log_result(state, res, __func__); - return res; +static bool +encode_suit_chunk_enqueue_req(zcbor_state_t *state, + const struct suit_chunk_enqueue_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (43)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_chunk_enqueue_req_stream_session_id)))) && + ((zcbor_uint32_encode(state, + (&(*input).suit_chunk_enqueue_req_chunk_id)))) && + ((zcbor_uint32_encode(state, + (&(*input).suit_chunk_enqueue_req_offset)))) && + ((zcbor_bool_encode(state, + (&(*input).suit_chunk_enqueue_req_last_chunk)))) && + ((zcbor_uint32_encode(state, (&(*input).suit_chunk_enqueue_req_addr)))) && + ((zcbor_uint32_encode(state, + (&(*input).suit_chunk_enqueue_req_size))))))); + + log_result(state, res, __func__); + return res; } -static bool encode_suit_chunk_status_req(zcbor_state_t *state, - const struct suit_chunk_status_req *input) -{ - zcbor_log("%s\r\n", __func__); +static bool +encode_suit_chunk_status_req(zcbor_state_t *state, + const struct suit_chunk_status_req *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (44)))) && - ((zcbor_uint32_encode( - state, (&(*input).suit_chunk_status_req_stream_session_id))))))); + bool res = + (((((zcbor_uint32_put(state, (44)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_chunk_status_req_stream_session_id))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_invoke_confirm_req(zcbor_state_t *state, - const struct suit_invoke_confirm_req *input) -{ - zcbor_log("%s\r\n", __func__); +static bool +encode_suit_invoke_confirm_req(zcbor_state_t *state, + const struct suit_invoke_confirm_req *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (51)))) && - ((zcbor_int32_encode(state, (&(*input).suit_invoke_confirm_req_ret))))))); + bool res = ((( + ((zcbor_uint32_put(state, (51)))) && + ((zcbor_int32_encode(state, (&(*input).suit_invoke_confirm_req_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_trigger_update_rsp(zcbor_state_t *state, - const struct suit_trigger_update_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool +encode_suit_trigger_update_rsp(zcbor_state_t *state, + const struct suit_trigger_update_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (1)))) && - ((zcbor_int32_encode(state, (&(*input).suit_trigger_update_rsp_ret))))))); + bool res = ((( + ((zcbor_uint32_put(state, (1)))) && + ((zcbor_int32_encode(state, (&(*input).suit_trigger_update_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool encode_suit_check_installed_component_digest_rsp( - zcbor_state_t *state, const struct suit_check_installed_component_digest_rsp *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = - (((((zcbor_uint32_put(state, (2)))) && - ((zcbor_int32_encode( - state, (&(*input).suit_check_installed_component_digest_rsp_ret))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_check_installed_component_digest_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_put(state, (2)))) && + ((zcbor_int32_encode( + state, + (&(*input).suit_check_installed_component_digest_rsp_ret))))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_get_installed_manifest_info_rsp( - zcbor_state_t *state, const struct suit_get_installed_manifest_info_rsp *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_put(state, (3)))) && - ((zcbor_int32_encode(state, - (&(*input).suit_get_installed_manifest_info_rsp_ret)))) && - ((zcbor_uint32_encode(state, - (&(*input).suit_get_installed_manifest_info_rsp_seq_num)))) && - ((zcbor_list_start_encode(state, 5) && - ((zcbor_multi_encode_minmax( - 0, 5, &(*input).suit_get_installed_manifest_info_rsp_semver_int_count, - (zcbor_encoder_t *)zcbor_int32_encode, state, - (*&(*input).suit_get_installed_manifest_info_rsp_semver_int), - sizeof(int32_t))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 5))) && - ((zcbor_int32_encode( - state, (&(*input).suit_get_installed_manifest_info_rsp_digest_status)))) && - ((zcbor_int32_encode(state, - (&(*input).suit_get_installed_manifest_info_rsp_alg_id)))) && - ((zcbor_bstr_encode(state, - (&(*input).suit_get_installed_manifest_info_rsp_digest))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_get_installed_manifest_info_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_put(state, (3)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_installed_manifest_info_rsp_ret)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_get_installed_manifest_info_rsp_seq_num)))) && + ((zcbor_list_start_encode(state, 5) && + ((zcbor_multi_encode_minmax( + 0, 5, + &(*input).suit_get_installed_manifest_info_rsp_semver_int_count, + (zcbor_encoder_t *)zcbor_int32_encode, state, + (*&(*input).suit_get_installed_manifest_info_rsp_semver_int), + sizeof(int32_t))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 5))) && + ((zcbor_int32_encode( + state, + (&(*input).suit_get_installed_manifest_info_rsp_digest_status)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_installed_manifest_info_rsp_alg_id)))) && + ((zcbor_bstr_encode( + state, (&(*input).suit_get_installed_manifest_info_rsp_digest))))))); + + log_result(state, res, __func__); + return res; } -static bool -encode_suit_get_install_candidate_info_rsp(zcbor_state_t *state, - const struct suit_get_install_candidate_info_rsp *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_put(state, (4)))) && - ((zcbor_int32_encode(state, (&(*input).suit_get_install_candidate_info_rsp_ret)))) && - ((zcbor_bstr_encode( - state, - (&(*input).suit_get_install_candidate_info_rsp_manifest_class_id)))) && - ((zcbor_uint32_encode(state, - (&(*input).suit_get_install_candidate_info_rsp_seq_num)))) && - ((zcbor_list_start_encode(state, 5) && - ((zcbor_multi_encode_minmax( - 0, 5, &(*input).suit_get_install_candidate_info_rsp_semver_int_count, - (zcbor_encoder_t *)zcbor_int32_encode, state, - (*&(*input).suit_get_install_candidate_info_rsp_semver_int), - sizeof(int32_t))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 5))) && - ((zcbor_int32_encode(state, - (&(*input).suit_get_install_candidate_info_rsp_alg_id)))) && - ((zcbor_bstr_encode(state, - (&(*input).suit_get_install_candidate_info_rsp_digest))))))); - - log_result(state, res, __func__); - return res; +static bool encode_suit_get_install_candidate_info_rsp( + zcbor_state_t *state, + const struct suit_get_install_candidate_info_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_put(state, (4)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_install_candidate_info_rsp_ret)))) && + ((zcbor_bstr_encode( + state, + (&(*input) + .suit_get_install_candidate_info_rsp_manifest_class_id)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_get_install_candidate_info_rsp_seq_num)))) && + ((zcbor_list_start_encode(state, 5) && + ((zcbor_multi_encode_minmax( + 0, 5, + &(*input).suit_get_install_candidate_info_rsp_semver_int_count, + (zcbor_encoder_t *)zcbor_int32_encode, state, + (*&(*input).suit_get_install_candidate_info_rsp_semver_int), + sizeof(int32_t))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 5))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_install_candidate_info_rsp_alg_id)))) && + ((zcbor_bstr_encode( + state, (&(*input).suit_get_install_candidate_info_rsp_digest))))))); + + log_result(state, res, __func__); + return res; } -static bool -encode_suit_authenticate_manifest_rsp(zcbor_state_t *state, - const struct suit_authenticate_manifest_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_authenticate_manifest_rsp( + zcbor_state_t *state, const struct suit_authenticate_manifest_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = - (((((zcbor_uint32_put(state, (10)))) && - ((zcbor_int32_encode(state, (&(*input).suit_authenticate_manifest_rsp_ret))))))); + bool res = (((((zcbor_uint32_put(state, (10)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_authenticate_manifest_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool encode_suit_authorize_unsigned_manifest_rsp( - zcbor_state_t *state, const struct suit_authorize_unsigned_manifest_rsp *input) -{ - zcbor_log("%s\r\n", __func__); + zcbor_state_t *state, + const struct suit_authorize_unsigned_manifest_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (11)))) && - ((zcbor_int32_encode( - state, (&(*input).suit_authorize_unsigned_manifest_rsp_ret))))))); + bool res = + (((((zcbor_uint32_put(state, (11)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_authorize_unsigned_manifest_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_authorize_seq_num_rsp(zcbor_state_t *state, - const struct suit_authorize_seq_num_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_authorize_seq_num_rsp( + zcbor_state_t *state, const struct suit_authorize_seq_num_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (12)))) && - ((zcbor_int32_encode(state, (&(*input).suit_authorize_seq_num_rsp_ret))))))); + bool res = (((((zcbor_uint32_put(state, (12)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_authorize_seq_num_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool encode_suit_check_component_compatibility_rsp( - zcbor_state_t *state, const struct suit_check_component_compatibility_rsp *input) -{ - zcbor_log("%s\r\n", __func__); + zcbor_state_t *state, + const struct suit_check_component_compatibility_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (13)))) && - ((zcbor_int32_encode( - state, (&(*input).suit_check_component_compatibility_rsp_ret))))))); + bool res = (( + (((zcbor_uint32_put(state, (13)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_check_component_compatibility_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } static bool encode_suit_get_supported_manifest_roles_rsp( - zcbor_state_t *state, const struct suit_get_supported_manifest_roles_rsp *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_put(state, (18)))) && - ((zcbor_int32_encode(state, - (&(*input).suit_get_supported_manifest_roles_rsp_ret)))) && - ((zcbor_list_start_encode(state, 20) && - ((zcbor_multi_encode_minmax( - 0, 20, &(*input).suit_get_supported_manifest_roles_rsp_roles_int_count, - (zcbor_encoder_t *)zcbor_int32_encode, state, - (*&(*input).suit_get_supported_manifest_roles_rsp_roles_int), - sizeof(int32_t))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 20)))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_get_supported_manifest_roles_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_put(state, (18)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_supported_manifest_roles_rsp_ret)))) && + ((zcbor_list_start_encode(state, 20) && + ((zcbor_multi_encode_minmax( + 0, 20, + &(*input).suit_get_supported_manifest_roles_rsp_roles_int_count, + (zcbor_encoder_t *)zcbor_int32_encode, state, + (*&(*input).suit_get_supported_manifest_roles_rsp_roles_int), + sizeof(int32_t))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 20)))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_get_supported_manifest_info_rsp( - zcbor_state_t *state, const struct suit_get_supported_manifest_info_rsp *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - ((zcbor_uint32_put(state, (19)))) && - ((zcbor_int32_encode(state, - (&(*input).suit_get_supported_manifest_info_rsp_ret)))) && - ((zcbor_int32_encode(state, - (&(*input).suit_get_supported_manifest_info_rsp_role)))) && - ((zcbor_bstr_encode(state, - (&(*input).suit_get_supported_manifest_info_rsp_vendor_id)))) && - ((zcbor_bstr_encode(state, - (&(*input).suit_get_supported_manifest_info_rsp_class_id)))) && - ((zcbor_int32_encode( - state, - (&(*input).suit_get_supported_manifest_info_rsp_downgrade_prevention_policy)))) && - ((zcbor_int32_encode( - state, - (&(*input).suit_get_supported_manifest_info_rsp_independent_updateability_policy)))) && - ((zcbor_int32_encode( - state, - (&(*input).suit_get_supported_manifest_info_rsp_signature_verification_policy))))))); - - log_result(state, res, __func__); - return res; + zcbor_state_t *state, + const struct suit_get_supported_manifest_info_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (19)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_supported_manifest_info_rsp_ret)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_supported_manifest_info_rsp_role)))) && + ((zcbor_bstr_encode( + state, + (&(*input).suit_get_supported_manifest_info_rsp_vendor_id)))) && + ((zcbor_bstr_encode( + state, (&(*input).suit_get_supported_manifest_info_rsp_class_id)))) && + ((zcbor_int32_encode( + state, + (&(*input) + .suit_get_supported_manifest_info_rsp_downgrade_prevention_policy)))) && + ((zcbor_int32_encode( + state, + (&(*input) + .suit_get_supported_manifest_info_rsp_independent_updateability_policy)))) && + ((zcbor_int32_encode( + state, + (&(*input) + .suit_get_supported_manifest_info_rsp_signature_verification_policy))))))); + + log_result(state, res, __func__); + return res; } static bool encode_suit_authorize_process_dependency_rsp( - zcbor_state_t *state, const struct suit_authorize_process_dependency_rsp *input) -{ - zcbor_log("%s\r\n", __func__); + zcbor_state_t *state, + const struct suit_authorize_process_dependency_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_put(state, (21)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_authorize_process_dependency_rsp_ret))))))); + + log_result(state, res, __func__); + return res; +} + +static bool encode_suit_get_manifest_var_rsp( + zcbor_state_t *state, const struct suit_get_manifest_var_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (((((zcbor_uint32_put(state, (14)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_get_manifest_var_rsp_ret)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_get_manifest_var_rsp_value))))))); + + log_result(state, res, __func__); + return res; +} - bool res = (((((zcbor_uint32_put(state, (21)))) && - ((zcbor_int32_encode( - state, (&(*input).suit_authorize_process_dependency_rsp_ret))))))); +static bool encode_suit_set_manifest_var_rsp( + zcbor_state_t *state, const struct suit_set_manifest_var_rsp *input) { + zcbor_log("%s\r\n", __func__); - log_result(state, res, __func__); - return res; + bool res = (((((zcbor_uint32_put(state, (15)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_set_manifest_var_rsp_ret))))))); + + log_result(state, res, __func__); + return res; +} + +static bool encode_suit_evt_sub_rsp(zcbor_state_t *state, + const struct suit_evt_sub_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = + (((((zcbor_uint32_put(state, (40)))) && + ((zcbor_int32_encode(state, (&(*input).suit_evt_sub_rsp_ret))))))); + + log_result(state, res, __func__); + return res; } -static bool encode_suit_evt_sub_rsp(zcbor_state_t *state, const struct suit_evt_sub_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool +encode_suit_chunk_enqueue_rsp(zcbor_state_t *state, + const struct suit_chunk_enqueue_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_put(state, (40)))) && - ((zcbor_int32_encode(state, (&(*input).suit_evt_sub_rsp_ret))))))); + bool res = (( + (((zcbor_uint32_put(state, (43)))) && + ((zcbor_int32_encode(state, (&(*input).suit_chunk_enqueue_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_chunk_enqueue_rsp(zcbor_state_t *state, - const struct suit_chunk_enqueue_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool +encode_suit_chunk_info_entry(zcbor_state_t *state, + const struct suit_chunk_info_entry *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (((((zcbor_uint32_encode( + state, (&(*input).suit_chunk_info_entry_chunk_id)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_chunk_info_entry_status))))))); + + log_result(state, res, __func__); + return res; +} - bool res = (((((zcbor_uint32_put(state, (43)))) && - ((zcbor_int32_encode(state, (&(*input).suit_chunk_enqueue_rsp_ret))))))); +static bool +encode_suit_chunk_status_rsp(zcbor_state_t *state, + const struct suit_chunk_status_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = ((( + ((zcbor_uint32_put(state, (44)))) && + ((zcbor_int32_encode(state, (&(*input).suit_chunk_status_rsp_ret)))) && + ((zcbor_list_start_encode(state, 6) && + ((zcbor_multi_encode_minmax( + 0, 3, + &(*input) + .suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m_count, + (zcbor_encoder_t *)encode_suit_chunk_info_entry, state, + (*&(*input) + .suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m), + sizeof(struct suit_chunk_info_entry))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 6)))))); + + log_result(state, res, __func__); + return res; +} - log_result(state, res, __func__); - return res; +static bool +encode_suit_boot_mode_read_rsp(zcbor_state_t *state, + const struct suit_boot_mode_read_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (((zcbor_uint32_put(state, (50)))) && + ((zcbor_int32_encode(state, (&(*input).suit_boot_mode_read_rsp_ret)))) && + ((zcbor_uint32_encode( + state, (&(*input).suit_boot_mode_read_rsp_boot_mode))))))); + + log_result(state, res, __func__); + return res; } -static bool encode_suit_chunk_info_entry(zcbor_state_t *state, - const struct suit_chunk_info_entry *input) -{ - zcbor_log("%s\r\n", __func__); +static bool +encode_suit_invoke_confirm_rsp(zcbor_state_t *state, + const struct suit_invoke_confirm_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = (((((zcbor_uint32_encode(state, (&(*input).suit_chunk_info_entry_chunk_id)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_chunk_info_entry_status))))))); + bool res = ((( + ((zcbor_uint32_put(state, (51)))) && + ((zcbor_int32_encode(state, (&(*input).suit_invoke_confirm_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_chunk_status_rsp(zcbor_state_t *state, - const struct suit_chunk_status_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_boot_flags_reset_rsp( + zcbor_state_t *state, const struct suit_boot_flags_reset_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = ((( - ((zcbor_uint32_put(state, (44)))) && - ((zcbor_int32_encode(state, (&(*input).suit_chunk_status_rsp_ret)))) && - ((zcbor_list_start_encode(state, 6) && - ((zcbor_multi_encode_minmax( - 0, 3, - &(*input).suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m_count, - (zcbor_encoder_t *)encode_suit_chunk_info_entry, state, - (*&(*input).suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m), - sizeof(struct suit_chunk_info_entry))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 6)))))); + bool res = (((((zcbor_uint32_put(state, (52)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_boot_flags_reset_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_boot_mode_read_rsp(zcbor_state_t *state, - const struct suit_boot_mode_read_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_foreground_dfu_required_rsp( + zcbor_state_t *state, + const struct suit_foreground_dfu_required_rsp *input) { + zcbor_log("%s\r\n", __func__); - bool res = - (((((zcbor_uint32_put(state, (50)))) && - ((zcbor_int32_encode(state, (&(*input).suit_boot_mode_read_rsp_ret)))) && - ((zcbor_uint32_encode(state, (&(*input).suit_boot_mode_read_rsp_boot_mode))))))); + bool res = + (((((zcbor_uint32_put(state, (53)))) && + ((zcbor_int32_encode( + state, (&(*input).suit_foreground_dfu_required_rsp_ret))))))); - log_result(state, res, __func__); - return res; + log_result(state, res, __func__); + return res; } -static bool encode_suit_invoke_confirm_rsp(zcbor_state_t *state, - const struct suit_invoke_confirm_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +static bool encode_suit_nfy(zcbor_state_t *state, + const struct suit_nfy *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (zcbor_list_start_encode(state, 3) && + ((((((*input).suit_nfy_msg_choice == + suit_nfy_msg_suit_missing_image_evt_nfy_m_c) + ? ((encode_suit_missing_image_evt_nfy( + state, + (&(*input).suit_nfy_msg_suit_missing_image_evt_nfy_m)))) + : (((*input).suit_nfy_msg_choice == + suit_nfy_msg_suit_chunk_status_evt_nfy_m_c) + ? ((encode_suit_chunk_status_evt_nfy( + state, + (&(*input) + .suit_nfy_msg_suit_chunk_status_evt_nfy_m)))) + : false)))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 3)))); + + log_result(state, res, __func__); + return res; +} - bool res = (((((zcbor_uint32_put(state, (51)))) && - ((zcbor_int32_encode(state, (&(*input).suit_invoke_confirm_rsp_ret))))))); +static bool encode_suit_rsp(zcbor_state_t *state, + const struct suit_rsp *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (((zcbor_list_start_encode(state, 8) && + (((( + ((*input).suit_rsp_msg_choice == + suit_rsp_msg_suit_trigger_update_rsp_m_c) + ? ((encode_suit_trigger_update_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_trigger_update_rsp_m)))) + : ( + ((*input).suit_rsp_msg_choice == + suit_rsp_msg_suit_check_installed_component_digest_rsp_m_c) + ? ( + ( + encode_suit_check_installed_component_digest_rsp( + state, (&(*input).suit_rsp_msg_suit_check_installed_component_digest_rsp_m)))) + : ( + ((*input).suit_rsp_msg_choice == + suit_rsp_msg_suit_get_installed_manifest_info_rsp_m_c) + ? ( + ( + encode_suit_get_installed_manifest_info_rsp( + state, (&(*input).suit_rsp_msg_suit_get_installed_manifest_info_rsp_m)))) + : ( + ((*input).suit_rsp_msg_choice == + suit_rsp_msg_suit_get_install_candidate_info_rsp_m_c) + ? ( + ( + encode_suit_get_install_candidate_info_rsp( + state, (&(*input) + .suit_rsp_msg_suit_get_install_candidate_info_rsp_m)))) + : ( + ((*input).suit_rsp_msg_choice == + suit_rsp_msg_suit_authenticate_manifest_rsp_m_c) + ? ( + (encode_suit_authenticate_manifest_rsp(state, ( + &(*input) + .suit_rsp_msg_suit_authenticate_manifest_rsp_m)))) + : (((*input).suit_rsp_msg_choice == suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m_c) ? ( + ( + encode_suit_authorize_unsigned_manifest_rsp(state, ( + &(*input) + .suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m)))) + : ( + ((*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_authorize_seq_num_rsp_m_c) + ? (( + encode_suit_authorize_seq_num_rsp(state, ( + &(*input) + .suit_rsp_msg_suit_authorize_seq_num_rsp_m)))) + : ( + ( + (*input) + .suit_rsp_msg_choice == suit_rsp_msg_suit_check_component_compatibility_rsp_m_c) + ? ( + ( + encode_suit_check_component_compatibility_rsp(state, ( + &(*input) + .suit_rsp_msg_suit_check_component_compatibility_rsp_m)))) + : (((*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m_c) + ? ((encode_suit_get_supported_manifest_roles_rsp(state, + (&(*input) + .suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m)))) + : (((*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_get_supported_manifest_info_rsp_m_c) + ? ((encode_suit_get_supported_manifest_info_rsp(state, (&(*input) + .suit_rsp_msg_suit_get_supported_manifest_info_rsp_m)))) + : ( + ( + (*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_authorize_process_dependency_rsp_m_c) + ? (( + encode_suit_authorize_process_dependency_rsp(state, + (&(*input) + .suit_rsp_msg_suit_authorize_process_dependency_rsp_m)))) + : ( + ( + (*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_get_manifest_var_rsp_m_c) + ? ((encode_suit_get_manifest_var_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_get_manifest_var_rsp_m)))) + : (( + (*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_set_manifest_var_rsp_m_c) + ? ((encode_suit_set_manifest_var_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_set_manifest_var_rsp_m)))) + : ( + ( + (*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_evt_sub_rsp_m_c) + ? ((encode_suit_evt_sub_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_evt_sub_rsp_m)))) + : (((*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_chunk_enqueue_rsp_m_c) + ? ((encode_suit_chunk_enqueue_rsp(state, + ( + &(*input) + .suit_rsp_msg_suit_chunk_enqueue_rsp_m)))) + : (((*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_chunk_status_rsp_m_c) + ? ((encode_suit_chunk_status_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_chunk_status_rsp_m)))) + : (((*input) + .suit_rsp_msg_choice == suit_rsp_msg_suit_boot_mode_read_rsp_m_c) + ? ((encode_suit_boot_mode_read_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_boot_mode_read_rsp_m)))) + : (((*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_invoke_confirm_rsp_m_c) + ? (( + encode_suit_invoke_confirm_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_invoke_confirm_rsp_m)))) + : ( + ( + (*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_boot_flags_reset_rsp_m_c) + ? ((encode_suit_boot_flags_reset_rsp( + state, + (&(*input) + .suit_rsp_msg_suit_boot_flags_reset_rsp_m)))) + : (((*input) + .suit_rsp_msg_choice == + suit_rsp_msg_suit_foreground_dfu_required_rsp_m_c) + ? ((encode_suit_foreground_dfu_required_rsp( + state, (&(*input) + .suit_rsp_msg_suit_foreground_dfu_required_rsp_m)))) + : false)))))))))))))))))))))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 8)))); + + log_result(state, res, __func__); + return res; +} - log_result(state, res, __func__); - return res; +static bool encode_suit_req(zcbor_state_t *state, + const struct suit_req *input) { + zcbor_log("%s\r\n", __func__); + + bool res = (( + (zcbor_list_start_encode(state, 7) && + (((( + ((*input).suit_req_msg_choice == + suit_req_msg_suit_trigger_update_req_m_c) + ? ((encode_suit_trigger_update_req( + state, + (&(*input).suit_req_msg_suit_trigger_update_req_m)))) + : (((*input).suit_req_msg_choice == + suit_req_msg_suit_check_installed_component_digest_req_m_c) + ? ((encode_suit_check_installed_component_digest_req( + state, + (&(*input) + .suit_req_msg_suit_check_installed_component_digest_req_m)))) + : (((*input).suit_req_msg_choice == + suit_req_msg_suit_get_installed_manifest_info_req_m_c) + ? ((encode_suit_get_installed_manifest_info_req( + state, + (&(*input) + .suit_req_msg_suit_get_installed_manifest_info_req_m)))) + : (((*input).suit_req_msg_choice == + suit_req_msg_suit_get_install_candidate_info_req_m_c) + ? ((zcbor_uint32_put(state, (4)))) + : (((*input).suit_req_msg_choice == + suit_req_msg_suit_authenticate_manifest_req_m_c) + ? ((encode_suit_authenticate_manifest_req( + state, + (&(*input) + .suit_req_msg_suit_authenticate_manifest_req_m)))) + : (((*input).suit_req_msg_choice == + suit_req_msg_suit_authorize_unsigned_manifest_req_m_c) + ? ((encode_suit_authorize_unsigned_manifest_req( + state, + (&(*input) + .suit_req_msg_suit_authorize_unsigned_manifest_req_m)))) + : (((*input) + .suit_req_msg_choice == + suit_req_msg_suit_authorize_seq_num_req_m_c) + ? ((encode_suit_authorize_seq_num_req( + state, + (&(*input) + .suit_req_msg_suit_authorize_seq_num_req_m)))) + : (((*input) + .suit_req_msg_choice == + suit_req_msg_suit_check_component_compatibility_req_m_c) + ? ((encode_suit_check_component_compatibility_req( + state, + (&(*input) + .suit_req_msg_suit_check_component_compatibility_req_m)))) + : (((*input).suit_req_msg_choice == suit_req_msg_suit_get_supported_manifest_roles_req_m_c) ? ((zcbor_uint32_put( + state, + (18)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_get_supported_manifest_info_req_m_c) + ? ((encode_suit_get_supported_manifest_info_req( + state, + (&(*input) + .suit_req_msg_suit_get_supported_manifest_info_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_authorize_process_dependency_req_m_c) + ? ( + ( + encode_suit_authorize_process_dependency_req( + state, + ( + &( + *input) + .suit_req_msg_suit_authorize_process_dependency_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_get_manifest_var_req_m_c) + ? ((encode_suit_get_manifest_var_req( + state, ( + &( + *input) + .suit_req_msg_suit_get_manifest_var_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_set_manifest_var_req_m_c) + ? (( + encode_suit_set_manifest_var_req( + state, (&(*input) + .suit_req_msg_suit_set_manifest_var_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_evt_sub_req_m_c) + ? (( + encode_suit_evt_sub_req( + state, ( + &(*input) + .suit_req_msg_suit_evt_sub_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_chunk_enqueue_req_m_c) + ? (( + encode_suit_chunk_enqueue_req(state, + (&(*input) + .suit_req_msg_suit_chunk_enqueue_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == suit_req_msg_suit_chunk_status_req_m_c) + ? ((encode_suit_chunk_status_req( + state, + ( + &(*input) + .suit_req_msg_suit_chunk_status_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_boot_mode_read_req_m_c) + ? ((zcbor_uint32_put( + state, (50)))) + : (((*input) + .suit_req_msg_choice == + suit_req_msg_suit_invoke_confirm_req_m_c) + ? ((encode_suit_invoke_confirm_req(state, ( + &(*input) + .suit_req_msg_suit_invoke_confirm_req_m)))) + : ( + ( + (*input) + .suit_req_msg_choice == + suit_req_msg_suit_boot_flags_reset_req_m_c) + ? ((zcbor_uint32_put( + state, + (52)))) + : (((*input) + .suit_req_msg_choice == + suit_req_msg_suit_foreground_dfu_required_req_m_c) + ? ((zcbor_uint32_put( + state, + (53)))) + : false)))))))))))))))))))))) || + (zcbor_list_map_end_force_encode(state), false)) && + zcbor_list_end_encode(state, 7)))); + + log_result(state, res, __func__); + return res; } -static bool encode_suit_boot_flags_reset_rsp(zcbor_state_t *state, - const struct suit_boot_flags_reset_rsp *input) -{ - zcbor_log("%s\r\n", __func__); +int cbor_encode_suit_req(uint8_t *payload, size_t payload_len, + const struct suit_req *input, + size_t *payload_len_out) { + zcbor_state_t states[5]; + + return zcbor_entry_function(payload, payload_len, (void *)input, + payload_len_out, states, + (zcbor_decoder_t *)encode_suit_req, + sizeof(states) / sizeof(zcbor_state_t), 1); +} - bool res = (((((zcbor_uint32_put(state, (52)))) && - ((zcbor_int32_encode(state, (&(*input).suit_boot_flags_reset_rsp_ret))))))); +int cbor_encode_suit_rsp(uint8_t *payload, size_t payload_len, + const struct suit_rsp *input, + size_t *payload_len_out) { + zcbor_state_t states[5]; - log_result(state, res, __func__); - return res; + return zcbor_entry_function(payload, payload_len, (void *)input, + payload_len_out, states, + (zcbor_decoder_t *)encode_suit_rsp, + sizeof(states) / sizeof(zcbor_state_t), 1); } -static bool -encode_suit_foreground_dfu_required_rsp(zcbor_state_t *state, - const struct suit_foreground_dfu_required_rsp *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = (( - (((zcbor_uint32_put(state, (53)))) && - ((zcbor_int32_encode(state, (&(*input).suit_foreground_dfu_required_rsp_ret))))))); - - log_result(state, res, __func__); - return res; -} - -static bool encode_suit_nfy(zcbor_state_t *state, const struct suit_nfy *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - zcbor_list_start_encode(state, 3) && - ((((((*input).suit_nfy_msg_choice == suit_nfy_msg_suit_missing_image_evt_nfy_m_c) ? - ((encode_suit_missing_image_evt_nfy( - state, (&(*input).suit_nfy_msg_suit_missing_image_evt_nfy_m)))) : - (((*input).suit_nfy_msg_choice == - suit_nfy_msg_suit_chunk_status_evt_nfy_m_c) ? - ((encode_suit_chunk_status_evt_nfy( - state, - (&(*input).suit_nfy_msg_suit_chunk_status_evt_nfy_m)))) : - false)))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 3)))); - - log_result(state, res, __func__); - return res; -} - -static bool encode_suit_rsp(zcbor_state_t *state, const struct suit_rsp *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - zcbor_list_start_encode(state, 8) && - ((((((*input).suit_rsp_msg_choice == suit_rsp_msg_suit_trigger_update_rsp_m_c) ? - ((encode_suit_trigger_update_rsp( - state, (&(*input).suit_rsp_msg_suit_trigger_update_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_check_installed_component_digest_rsp_m_c) ? - ((encode_suit_check_installed_component_digest_rsp( - state, - (&(*input).suit_rsp_msg_suit_check_installed_component_digest_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_get_installed_manifest_info_rsp_m_c) ? - ((encode_suit_get_installed_manifest_info_rsp( - state, - (&(*input).suit_rsp_msg_suit_get_installed_manifest_info_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_get_install_candidate_info_rsp_m_c) ? - ((encode_suit_get_install_candidate_info_rsp( - state, - (&(*input).suit_rsp_msg_suit_get_install_candidate_info_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_authenticate_manifest_rsp_m_c) ? - ((encode_suit_authenticate_manifest_rsp( - state, - (&(*input).suit_rsp_msg_suit_authenticate_manifest_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m_c) ? - ((encode_suit_authorize_unsigned_manifest_rsp( - state, - (&(*input).suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_authorize_seq_num_rsp_m_c) ? - ((encode_suit_authorize_seq_num_rsp( - state, - (&(*input).suit_rsp_msg_suit_authorize_seq_num_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_check_component_compatibility_rsp_m_c) ? - ((encode_suit_check_component_compatibility_rsp( - state, - (&(*input).suit_rsp_msg_suit_check_component_compatibility_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m_c) ? - ((encode_suit_get_supported_manifest_roles_rsp( - state, - (&(*input).suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_get_supported_manifest_info_rsp_m_c) ? - ((encode_suit_get_supported_manifest_info_rsp( - state, - (&(*input).suit_rsp_msg_suit_get_supported_manifest_info_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_authorize_process_dependency_rsp_m_c) ? - ((encode_suit_authorize_process_dependency_rsp( - state, - (&(*input).suit_rsp_msg_suit_authorize_process_dependency_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_evt_sub_rsp_m_c) ? - ((encode_suit_evt_sub_rsp( - state, - (&(*input).suit_rsp_msg_suit_evt_sub_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_chunk_enqueue_rsp_m_c) ? - ((encode_suit_chunk_enqueue_rsp( - state, - (&(*input).suit_rsp_msg_suit_chunk_enqueue_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_chunk_status_rsp_m_c) ? - ((encode_suit_chunk_status_rsp( - state, - (&(*input).suit_rsp_msg_suit_chunk_status_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_boot_mode_read_rsp_m_c) ? - ((encode_suit_boot_mode_read_rsp( - state, - (&(*input).suit_rsp_msg_suit_boot_mode_read_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_invoke_confirm_rsp_m_c) ? - ((encode_suit_invoke_confirm_rsp( - state, - (&(*input).suit_rsp_msg_suit_invoke_confirm_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_boot_flags_reset_rsp_m_c) ? - ((encode_suit_boot_flags_reset_rsp( - state, - (&(*input).suit_rsp_msg_suit_boot_flags_reset_rsp_m)))) : - (((*input).suit_rsp_msg_choice == - suit_rsp_msg_suit_foreground_dfu_required_rsp_m_c) ? - ((encode_suit_foreground_dfu_required_rsp( - state, - (&(*input).suit_rsp_msg_suit_foreground_dfu_required_rsp_m)))) : - false)))))))))))))))))))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 8)))); - - log_result(state, res, __func__); - return res; -} - -static bool encode_suit_req(zcbor_state_t *state, const struct suit_req *input) -{ - zcbor_log("%s\r\n", __func__); - - bool res = ((( - zcbor_list_start_encode(state, 7) && - ((((((*input).suit_req_msg_choice == suit_req_msg_suit_trigger_update_req_m_c) ? - ((encode_suit_trigger_update_req( - state, (&(*input).suit_req_msg_suit_trigger_update_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_check_installed_component_digest_req_m_c) ? - ((encode_suit_check_installed_component_digest_req( - state, - (&(*input).suit_req_msg_suit_check_installed_component_digest_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_get_installed_manifest_info_req_m_c) ? - ((encode_suit_get_installed_manifest_info_req( - state, - (&(*input).suit_req_msg_suit_get_installed_manifest_info_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_get_install_candidate_info_req_m_c) ? - ((zcbor_uint32_put(state, (4)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_authenticate_manifest_req_m_c) ? - ((encode_suit_authenticate_manifest_req( - state, - (&(*input).suit_req_msg_suit_authenticate_manifest_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_authorize_unsigned_manifest_req_m_c) ? - ((encode_suit_authorize_unsigned_manifest_req( - state, - (&(*input).suit_req_msg_suit_authorize_unsigned_manifest_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_authorize_seq_num_req_m_c) ? - ((encode_suit_authorize_seq_num_req( - state, - (&(*input).suit_req_msg_suit_authorize_seq_num_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_check_component_compatibility_req_m_c) ? - ((encode_suit_check_component_compatibility_req( - state, - (&(*input).suit_req_msg_suit_check_component_compatibility_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_get_supported_manifest_roles_req_m_c) ? - ((zcbor_uint32_put( - state, - (18)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_get_supported_manifest_info_req_m_c) ? - ((encode_suit_get_supported_manifest_info_req( - state, - (&(*input).suit_req_msg_suit_get_supported_manifest_info_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_authorize_process_dependency_req_m_c) ? - ((encode_suit_authorize_process_dependency_req( - state, - (&(*input).suit_req_msg_suit_authorize_process_dependency_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_evt_sub_req_m_c) ? - ((encode_suit_evt_sub_req( - state, - (&(*input).suit_req_msg_suit_evt_sub_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_chunk_enqueue_req_m_c) ? - ((encode_suit_chunk_enqueue_req( - state, - (&(*input).suit_req_msg_suit_chunk_enqueue_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_chunk_status_req_m_c) ? - ((encode_suit_chunk_status_req( - state, - (&(*input).suit_req_msg_suit_chunk_status_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_boot_mode_read_req_m_c) ? - ((zcbor_uint32_put( - state, - (50)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_invoke_confirm_req_m_c) ? - ((encode_suit_invoke_confirm_req( - state, - (&(*input).suit_req_msg_suit_invoke_confirm_req_m)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_boot_flags_reset_req_m_c) ? - ((zcbor_uint32_put( - state, - (52)))) : - (((*input).suit_req_msg_choice == - suit_req_msg_suit_foreground_dfu_required_req_m_c) ? - ((zcbor_uint32_put( - state, - (53)))) : - false)))))))))))))))))))) || - (zcbor_list_map_end_force_encode(state), false)) && - zcbor_list_end_encode(state, 7)))); - - log_result(state, res, __func__); - return res; -} - -int cbor_encode_suit_req(uint8_t *payload, size_t payload_len, const struct suit_req *input, - size_t *payload_len_out) -{ - zcbor_state_t states[5]; - - return zcbor_entry_function(payload, payload_len, (void *)input, payload_len_out, states, - (zcbor_decoder_t *)encode_suit_req, - sizeof(states) / sizeof(zcbor_state_t), 1); -} - -int cbor_encode_suit_rsp(uint8_t *payload, size_t payload_len, const struct suit_rsp *input, - size_t *payload_len_out) -{ - zcbor_state_t states[5]; - - return zcbor_entry_function(payload, payload_len, (void *)input, payload_len_out, states, - (zcbor_decoder_t *)encode_suit_rsp, - sizeof(states) / sizeof(zcbor_state_t), 1); -} - -int cbor_encode_suit_nfy(uint8_t *payload, size_t payload_len, const struct suit_nfy *input, - size_t *payload_len_out) -{ - zcbor_state_t states[4]; - - return zcbor_entry_function(payload, payload_len, (void *)input, payload_len_out, states, - (zcbor_decoder_t *)encode_suit_nfy, - sizeof(states) / sizeof(zcbor_state_t), 1); +int cbor_encode_suit_nfy(uint8_t *payload, size_t payload_len, + const struct suit_nfy *input, + size_t *payload_len_out) { + zcbor_state_t states[4]; + + return zcbor_entry_function(payload, payload_len, (void *)input, + payload_len_out, states, + (zcbor_decoder_t *)encode_suit_nfy, + sizeof(states) / sizeof(zcbor_state_t), 1); } diff --git a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.h b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.h index 91c8efaca0b0..ad73bcba515b 100644 --- a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.h +++ b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_encode.h @@ -13,28 +13,29 @@ #ifndef SUIT_SERVICE_ENCODE_H__ #define SUIT_SERVICE_ENCODE_H__ -#include +#include "suit_service_types.h" #include #include +#include #include -#include "suit_service_types.h" #ifdef __cplusplus extern "C" { #endif #if DEFAULT_MAX_QTY != 3 -#error "The type file was generated with a different default_max_qty than this file" +#error \ + "The type file was generated with a different default_max_qty than this file" #endif -int cbor_encode_suit_req(uint8_t *payload, size_t payload_len, const struct suit_req *input, - size_t *payload_len_out); +int cbor_encode_suit_req(uint8_t *payload, size_t payload_len, + const struct suit_req *input, size_t *payload_len_out); -int cbor_encode_suit_rsp(uint8_t *payload, size_t payload_len, const struct suit_rsp *input, - size_t *payload_len_out); +int cbor_encode_suit_rsp(uint8_t *payload, size_t payload_len, + const struct suit_rsp *input, size_t *payload_len_out); -int cbor_encode_suit_nfy(uint8_t *payload, size_t payload_len, const struct suit_nfy *input, - size_t *payload_len_out); +int cbor_encode_suit_nfy(uint8_t *payload, size_t payload_len, + const struct suit_nfy *input, size_t *payload_len_out); #ifdef __cplusplus } diff --git a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_types.h b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_types.h index e79631f50511..5358f26137cc 100644 --- a/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_types.h +++ b/subsys/sdfw_services/services/suit_service/zcbor_generated/suit_service_types.h @@ -13,9 +13,9 @@ #ifndef SUIT_SERVICE_TYPES_H__ #define SUIT_SERVICE_TYPES_H__ -#include #include #include +#include #include #ifdef __cplusplus @@ -32,296 +32,327 @@ extern "C" { #define DEFAULT_MAX_QTY 3 struct suit_missing_image_evt_nfy { - struct zcbor_string suit_missing_image_evt_nfy_resource_id; - uint32_t suit_missing_image_evt_nfy_stream_session_id; + struct zcbor_string suit_missing_image_evt_nfy_resource_id; + uint32_t suit_missing_image_evt_nfy_stream_session_id; }; struct suit_chunk_status_evt_nfy { - uint32_t suit_chunk_status_evt_nfy_stream_session_id; + uint32_t suit_chunk_status_evt_nfy_stream_session_id; }; struct suit_nfy { - union { - struct suit_missing_image_evt_nfy suit_nfy_msg_suit_missing_image_evt_nfy_m; - struct suit_chunk_status_evt_nfy suit_nfy_msg_suit_chunk_status_evt_nfy_m; - }; - enum { - suit_nfy_msg_suit_missing_image_evt_nfy_m_c, - suit_nfy_msg_suit_chunk_status_evt_nfy_m_c, - } suit_nfy_msg_choice; + union { + struct suit_missing_image_evt_nfy suit_nfy_msg_suit_missing_image_evt_nfy_m; + struct suit_chunk_status_evt_nfy suit_nfy_msg_suit_chunk_status_evt_nfy_m; + }; + enum { + suit_nfy_msg_suit_missing_image_evt_nfy_m_c, + suit_nfy_msg_suit_chunk_status_evt_nfy_m_c, + } suit_nfy_msg_choice; }; struct suit_cache_info_entry { - uint32_t suit_cache_info_entry_addr; - uint32_t suit_cache_info_entry_size; + uint32_t suit_cache_info_entry_addr; + uint32_t suit_cache_info_entry_size; }; struct suit_trigger_update_req { - uint32_t suit_trigger_update_req_addr; - uint32_t suit_trigger_update_req_size; - struct suit_cache_info_entry suit_trigger_update_req_caches_suit_cache_info_entry_m[6]; - size_t suit_trigger_update_req_caches_suit_cache_info_entry_m_count; + uint32_t suit_trigger_update_req_addr; + uint32_t suit_trigger_update_req_size; + struct suit_cache_info_entry + suit_trigger_update_req_caches_suit_cache_info_entry_m[6]; + size_t suit_trigger_update_req_caches_suit_cache_info_entry_m_count; }; struct suit_check_installed_component_digest_req { - struct zcbor_string suit_check_installed_component_digest_req_component_id; - int32_t suit_check_installed_component_digest_req_alg_id; - struct zcbor_string suit_check_installed_component_digest_req_digest; + struct zcbor_string suit_check_installed_component_digest_req_component_id; + int32_t suit_check_installed_component_digest_req_alg_id; + struct zcbor_string suit_check_installed_component_digest_req_digest; }; struct suit_get_installed_manifest_info_req { - struct zcbor_string suit_get_installed_manifest_info_req_manifest_class_id; + struct zcbor_string suit_get_installed_manifest_info_req_manifest_class_id; }; struct suit_authenticate_manifest_req { - struct zcbor_string suit_authenticate_manifest_req_manifest_component_id; - uint32_t suit_authenticate_manifest_req_alg_id; - struct zcbor_string suit_authenticate_manifest_req_key_id; - struct zcbor_string suit_authenticate_manifest_req_signature; - uint32_t suit_authenticate_manifest_req_data_addr; - uint32_t suit_authenticate_manifest_req_data_size; + struct zcbor_string suit_authenticate_manifest_req_manifest_component_id; + uint32_t suit_authenticate_manifest_req_alg_id; + struct zcbor_string suit_authenticate_manifest_req_key_id; + struct zcbor_string suit_authenticate_manifest_req_signature; + uint32_t suit_authenticate_manifest_req_data_addr; + uint32_t suit_authenticate_manifest_req_data_size; }; struct suit_authorize_unsigned_manifest_req { - struct zcbor_string suit_authorize_unsigned_manifest_req_manifest_component_id; + struct zcbor_string + suit_authorize_unsigned_manifest_req_manifest_component_id; }; struct suit_authorize_seq_num_req { - struct zcbor_string suit_authorize_seq_num_req_manifest_component_id; - uint32_t suit_authorize_seq_num_req_command_seq; - uint32_t suit_authorize_seq_num_req_seq_num; + struct zcbor_string suit_authorize_seq_num_req_manifest_component_id; + uint32_t suit_authorize_seq_num_req_command_seq; + uint32_t suit_authorize_seq_num_req_seq_num; }; struct suit_check_component_compatibility_req { - struct zcbor_string suit_check_component_compatibility_req_manifest_class_id; - struct zcbor_string suit_check_component_compatibility_req_component_id; + struct zcbor_string suit_check_component_compatibility_req_manifest_class_id; + struct zcbor_string suit_check_component_compatibility_req_component_id; }; struct suit_get_supported_manifest_info_req { - int32_t suit_get_supported_manifest_info_req_role; + int32_t suit_get_supported_manifest_info_req_role; }; struct suit_authorize_process_dependency_req { - struct zcbor_string suit_authorize_process_dependency_req_dependee_class_id; - struct zcbor_string suit_authorize_process_dependency_req_dependent_class_id; - int32_t suit_authorize_process_dependency_req_seq_id; + struct zcbor_string suit_authorize_process_dependency_req_dependee_class_id; + struct zcbor_string suit_authorize_process_dependency_req_dependent_class_id; + int32_t suit_authorize_process_dependency_req_seq_id; +}; + +struct suit_get_manifest_var_req { + uint32_t suit_get_manifest_var_req_id; +}; + +struct suit_set_manifest_var_req { + uint32_t suit_set_manifest_var_req_id; + uint32_t suit_set_manifest_var_req_value; }; struct suit_evt_sub_req { - bool suit_evt_sub_req_subscribe; + bool suit_evt_sub_req_subscribe; }; struct suit_chunk_enqueue_req { - uint32_t suit_chunk_enqueue_req_stream_session_id; - uint32_t suit_chunk_enqueue_req_chunk_id; - uint32_t suit_chunk_enqueue_req_offset; - bool suit_chunk_enqueue_req_last_chunk; - uint32_t suit_chunk_enqueue_req_addr; - uint32_t suit_chunk_enqueue_req_size; + uint32_t suit_chunk_enqueue_req_stream_session_id; + uint32_t suit_chunk_enqueue_req_chunk_id; + uint32_t suit_chunk_enqueue_req_offset; + bool suit_chunk_enqueue_req_last_chunk; + uint32_t suit_chunk_enqueue_req_addr; + uint32_t suit_chunk_enqueue_req_size; }; struct suit_chunk_status_req { - uint32_t suit_chunk_status_req_stream_session_id; + uint32_t suit_chunk_status_req_stream_session_id; }; struct suit_invoke_confirm_req { - int32_t suit_invoke_confirm_req_ret; + int32_t suit_invoke_confirm_req_ret; }; struct suit_req { - union { - struct suit_trigger_update_req suit_req_msg_suit_trigger_update_req_m; - struct suit_check_installed_component_digest_req - suit_req_msg_suit_check_installed_component_digest_req_m; - struct suit_get_installed_manifest_info_req - suit_req_msg_suit_get_installed_manifest_info_req_m; - struct suit_authenticate_manifest_req suit_req_msg_suit_authenticate_manifest_req_m; - struct suit_authorize_unsigned_manifest_req - suit_req_msg_suit_authorize_unsigned_manifest_req_m; - struct suit_authorize_seq_num_req suit_req_msg_suit_authorize_seq_num_req_m; - struct suit_check_component_compatibility_req - suit_req_msg_suit_check_component_compatibility_req_m; - struct suit_get_supported_manifest_info_req - suit_req_msg_suit_get_supported_manifest_info_req_m; - struct suit_authorize_process_dependency_req - suit_req_msg_suit_authorize_process_dependency_req_m; - struct suit_evt_sub_req suit_req_msg_suit_evt_sub_req_m; - struct suit_chunk_enqueue_req suit_req_msg_suit_chunk_enqueue_req_m; - struct suit_chunk_status_req suit_req_msg_suit_chunk_status_req_m; - struct suit_invoke_confirm_req suit_req_msg_suit_invoke_confirm_req_m; - }; - enum { - suit_req_msg_suit_trigger_update_req_m_c, - suit_req_msg_suit_check_installed_component_digest_req_m_c, - suit_req_msg_suit_get_installed_manifest_info_req_m_c, - suit_req_msg_suit_get_install_candidate_info_req_m_c, - suit_req_msg_suit_authenticate_manifest_req_m_c, - suit_req_msg_suit_authorize_unsigned_manifest_req_m_c, - suit_req_msg_suit_authorize_seq_num_req_m_c, - suit_req_msg_suit_check_component_compatibility_req_m_c, - suit_req_msg_suit_get_supported_manifest_roles_req_m_c, - suit_req_msg_suit_get_supported_manifest_info_req_m_c, - suit_req_msg_suit_authorize_process_dependency_req_m_c, - suit_req_msg_suit_evt_sub_req_m_c, - suit_req_msg_suit_chunk_enqueue_req_m_c, - suit_req_msg_suit_chunk_status_req_m_c, - suit_req_msg_suit_boot_mode_read_req_m_c, - suit_req_msg_suit_invoke_confirm_req_m_c, - suit_req_msg_suit_boot_flags_reset_req_m_c, - suit_req_msg_suit_foreground_dfu_required_req_m_c, - } suit_req_msg_choice; + union { + struct suit_trigger_update_req suit_req_msg_suit_trigger_update_req_m; + struct suit_check_installed_component_digest_req + suit_req_msg_suit_check_installed_component_digest_req_m; + struct suit_get_installed_manifest_info_req + suit_req_msg_suit_get_installed_manifest_info_req_m; + struct suit_authenticate_manifest_req + suit_req_msg_suit_authenticate_manifest_req_m; + struct suit_authorize_unsigned_manifest_req + suit_req_msg_suit_authorize_unsigned_manifest_req_m; + struct suit_authorize_seq_num_req suit_req_msg_suit_authorize_seq_num_req_m; + struct suit_check_component_compatibility_req + suit_req_msg_suit_check_component_compatibility_req_m; + struct suit_get_supported_manifest_info_req + suit_req_msg_suit_get_supported_manifest_info_req_m; + struct suit_authorize_process_dependency_req + suit_req_msg_suit_authorize_process_dependency_req_m; + struct suit_get_manifest_var_req suit_req_msg_suit_get_manifest_var_req_m; + struct suit_set_manifest_var_req suit_req_msg_suit_set_manifest_var_req_m; + struct suit_evt_sub_req suit_req_msg_suit_evt_sub_req_m; + struct suit_chunk_enqueue_req suit_req_msg_suit_chunk_enqueue_req_m; + struct suit_chunk_status_req suit_req_msg_suit_chunk_status_req_m; + struct suit_invoke_confirm_req suit_req_msg_suit_invoke_confirm_req_m; + }; + enum { + suit_req_msg_suit_trigger_update_req_m_c, + suit_req_msg_suit_check_installed_component_digest_req_m_c, + suit_req_msg_suit_get_installed_manifest_info_req_m_c, + suit_req_msg_suit_get_install_candidate_info_req_m_c, + suit_req_msg_suit_authenticate_manifest_req_m_c, + suit_req_msg_suit_authorize_unsigned_manifest_req_m_c, + suit_req_msg_suit_authorize_seq_num_req_m_c, + suit_req_msg_suit_check_component_compatibility_req_m_c, + suit_req_msg_suit_get_supported_manifest_roles_req_m_c, + suit_req_msg_suit_get_supported_manifest_info_req_m_c, + suit_req_msg_suit_authorize_process_dependency_req_m_c, + suit_req_msg_suit_get_manifest_var_req_m_c, + suit_req_msg_suit_set_manifest_var_req_m_c, + suit_req_msg_suit_evt_sub_req_m_c, + suit_req_msg_suit_chunk_enqueue_req_m_c, + suit_req_msg_suit_chunk_status_req_m_c, + suit_req_msg_suit_boot_mode_read_req_m_c, + suit_req_msg_suit_invoke_confirm_req_m_c, + suit_req_msg_suit_boot_flags_reset_req_m_c, + suit_req_msg_suit_foreground_dfu_required_req_m_c, + } suit_req_msg_choice; }; struct suit_trigger_update_rsp { - int32_t suit_trigger_update_rsp_ret; + int32_t suit_trigger_update_rsp_ret; }; struct suit_check_installed_component_digest_rsp { - int32_t suit_check_installed_component_digest_rsp_ret; + int32_t suit_check_installed_component_digest_rsp_ret; }; struct suit_get_installed_manifest_info_rsp { - int32_t suit_get_installed_manifest_info_rsp_ret; - uint32_t suit_get_installed_manifest_info_rsp_seq_num; - int32_t suit_get_installed_manifest_info_rsp_semver_int[5]; - size_t suit_get_installed_manifest_info_rsp_semver_int_count; - int32_t suit_get_installed_manifest_info_rsp_digest_status; - int32_t suit_get_installed_manifest_info_rsp_alg_id; - struct zcbor_string suit_get_installed_manifest_info_rsp_digest; + int32_t suit_get_installed_manifest_info_rsp_ret; + uint32_t suit_get_installed_manifest_info_rsp_seq_num; + int32_t suit_get_installed_manifest_info_rsp_semver_int[5]; + size_t suit_get_installed_manifest_info_rsp_semver_int_count; + int32_t suit_get_installed_manifest_info_rsp_digest_status; + int32_t suit_get_installed_manifest_info_rsp_alg_id; + struct zcbor_string suit_get_installed_manifest_info_rsp_digest; }; struct suit_get_install_candidate_info_rsp { - int32_t suit_get_install_candidate_info_rsp_ret; - struct zcbor_string suit_get_install_candidate_info_rsp_manifest_class_id; - uint32_t suit_get_install_candidate_info_rsp_seq_num; - int32_t suit_get_install_candidate_info_rsp_semver_int[5]; - size_t suit_get_install_candidate_info_rsp_semver_int_count; - int32_t suit_get_install_candidate_info_rsp_alg_id; - struct zcbor_string suit_get_install_candidate_info_rsp_digest; + int32_t suit_get_install_candidate_info_rsp_ret; + struct zcbor_string suit_get_install_candidate_info_rsp_manifest_class_id; + uint32_t suit_get_install_candidate_info_rsp_seq_num; + int32_t suit_get_install_candidate_info_rsp_semver_int[5]; + size_t suit_get_install_candidate_info_rsp_semver_int_count; + int32_t suit_get_install_candidate_info_rsp_alg_id; + struct zcbor_string suit_get_install_candidate_info_rsp_digest; }; struct suit_authenticate_manifest_rsp { - int32_t suit_authenticate_manifest_rsp_ret; + int32_t suit_authenticate_manifest_rsp_ret; }; struct suit_authorize_unsigned_manifest_rsp { - int32_t suit_authorize_unsigned_manifest_rsp_ret; + int32_t suit_authorize_unsigned_manifest_rsp_ret; }; struct suit_authorize_seq_num_rsp { - int32_t suit_authorize_seq_num_rsp_ret; + int32_t suit_authorize_seq_num_rsp_ret; }; struct suit_check_component_compatibility_rsp { - int32_t suit_check_component_compatibility_rsp_ret; + int32_t suit_check_component_compatibility_rsp_ret; }; struct suit_get_supported_manifest_roles_rsp { - int32_t suit_get_supported_manifest_roles_rsp_ret; - int32_t suit_get_supported_manifest_roles_rsp_roles_int[20]; - size_t suit_get_supported_manifest_roles_rsp_roles_int_count; + int32_t suit_get_supported_manifest_roles_rsp_ret; + int32_t suit_get_supported_manifest_roles_rsp_roles_int[20]; + size_t suit_get_supported_manifest_roles_rsp_roles_int_count; }; struct suit_get_supported_manifest_info_rsp { - int32_t suit_get_supported_manifest_info_rsp_ret; - int32_t suit_get_supported_manifest_info_rsp_role; - struct zcbor_string suit_get_supported_manifest_info_rsp_vendor_id; - struct zcbor_string suit_get_supported_manifest_info_rsp_class_id; - int32_t suit_get_supported_manifest_info_rsp_downgrade_prevention_policy; - int32_t suit_get_supported_manifest_info_rsp_independent_updateability_policy; - int32_t suit_get_supported_manifest_info_rsp_signature_verification_policy; + int32_t suit_get_supported_manifest_info_rsp_ret; + int32_t suit_get_supported_manifest_info_rsp_role; + struct zcbor_string suit_get_supported_manifest_info_rsp_vendor_id; + struct zcbor_string suit_get_supported_manifest_info_rsp_class_id; + int32_t suit_get_supported_manifest_info_rsp_downgrade_prevention_policy; + int32_t suit_get_supported_manifest_info_rsp_independent_updateability_policy; + int32_t suit_get_supported_manifest_info_rsp_signature_verification_policy; }; struct suit_authorize_process_dependency_rsp { - int32_t suit_authorize_process_dependency_rsp_ret; + int32_t suit_authorize_process_dependency_rsp_ret; +}; + +struct suit_get_manifest_var_rsp { + int32_t suit_get_manifest_var_rsp_ret; + uint32_t suit_get_manifest_var_rsp_value; +}; + +struct suit_set_manifest_var_rsp { + int32_t suit_set_manifest_var_rsp_ret; }; struct suit_evt_sub_rsp { - int32_t suit_evt_sub_rsp_ret; + int32_t suit_evt_sub_rsp_ret; }; struct suit_chunk_enqueue_rsp { - int32_t suit_chunk_enqueue_rsp_ret; + int32_t suit_chunk_enqueue_rsp_ret; }; struct suit_chunk_info_entry { - uint32_t suit_chunk_info_entry_chunk_id; - uint32_t suit_chunk_info_entry_status; + uint32_t suit_chunk_info_entry_chunk_id; + uint32_t suit_chunk_info_entry_status; }; struct suit_chunk_status_rsp { - int32_t suit_chunk_status_rsp_ret; - struct suit_chunk_info_entry suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m[3]; - size_t suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m_count; + int32_t suit_chunk_status_rsp_ret; + struct suit_chunk_info_entry + suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m[3]; + size_t suit_chunk_status_rsp_chunk_info_suit_chunk_info_entry_m_count; }; struct suit_boot_mode_read_rsp { - int32_t suit_boot_mode_read_rsp_ret; - uint32_t suit_boot_mode_read_rsp_boot_mode; + int32_t suit_boot_mode_read_rsp_ret; + uint32_t suit_boot_mode_read_rsp_boot_mode; }; struct suit_invoke_confirm_rsp { - int32_t suit_invoke_confirm_rsp_ret; + int32_t suit_invoke_confirm_rsp_ret; }; struct suit_boot_flags_reset_rsp { - int32_t suit_boot_flags_reset_rsp_ret; + int32_t suit_boot_flags_reset_rsp_ret; }; struct suit_foreground_dfu_required_rsp { - int32_t suit_foreground_dfu_required_rsp_ret; + int32_t suit_foreground_dfu_required_rsp_ret; }; struct suit_rsp { - union { - struct suit_trigger_update_rsp suit_rsp_msg_suit_trigger_update_rsp_m; - struct suit_check_installed_component_digest_rsp - suit_rsp_msg_suit_check_installed_component_digest_rsp_m; - struct suit_get_installed_manifest_info_rsp - suit_rsp_msg_suit_get_installed_manifest_info_rsp_m; - struct suit_get_install_candidate_info_rsp - suit_rsp_msg_suit_get_install_candidate_info_rsp_m; - struct suit_authenticate_manifest_rsp suit_rsp_msg_suit_authenticate_manifest_rsp_m; - struct suit_authorize_unsigned_manifest_rsp - suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m; - struct suit_authorize_seq_num_rsp suit_rsp_msg_suit_authorize_seq_num_rsp_m; - struct suit_check_component_compatibility_rsp - suit_rsp_msg_suit_check_component_compatibility_rsp_m; - struct suit_get_supported_manifest_roles_rsp - suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m; - struct suit_get_supported_manifest_info_rsp - suit_rsp_msg_suit_get_supported_manifest_info_rsp_m; - struct suit_authorize_process_dependency_rsp - suit_rsp_msg_suit_authorize_process_dependency_rsp_m; - struct suit_evt_sub_rsp suit_rsp_msg_suit_evt_sub_rsp_m; - struct suit_chunk_enqueue_rsp suit_rsp_msg_suit_chunk_enqueue_rsp_m; - struct suit_chunk_status_rsp suit_rsp_msg_suit_chunk_status_rsp_m; - struct suit_boot_mode_read_rsp suit_rsp_msg_suit_boot_mode_read_rsp_m; - struct suit_invoke_confirm_rsp suit_rsp_msg_suit_invoke_confirm_rsp_m; - struct suit_boot_flags_reset_rsp suit_rsp_msg_suit_boot_flags_reset_rsp_m; - struct suit_foreground_dfu_required_rsp - suit_rsp_msg_suit_foreground_dfu_required_rsp_m; - }; - enum { - suit_rsp_msg_suit_trigger_update_rsp_m_c, - suit_rsp_msg_suit_check_installed_component_digest_rsp_m_c, - suit_rsp_msg_suit_get_installed_manifest_info_rsp_m_c, - suit_rsp_msg_suit_get_install_candidate_info_rsp_m_c, - suit_rsp_msg_suit_authenticate_manifest_rsp_m_c, - suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m_c, - suit_rsp_msg_suit_authorize_seq_num_rsp_m_c, - suit_rsp_msg_suit_check_component_compatibility_rsp_m_c, - suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m_c, - suit_rsp_msg_suit_get_supported_manifest_info_rsp_m_c, - suit_rsp_msg_suit_authorize_process_dependency_rsp_m_c, - suit_rsp_msg_suit_evt_sub_rsp_m_c, - suit_rsp_msg_suit_chunk_enqueue_rsp_m_c, - suit_rsp_msg_suit_chunk_status_rsp_m_c, - suit_rsp_msg_suit_boot_mode_read_rsp_m_c, - suit_rsp_msg_suit_invoke_confirm_rsp_m_c, - suit_rsp_msg_suit_boot_flags_reset_rsp_m_c, - suit_rsp_msg_suit_foreground_dfu_required_rsp_m_c, - } suit_rsp_msg_choice; + union { + struct suit_trigger_update_rsp suit_rsp_msg_suit_trigger_update_rsp_m; + struct suit_check_installed_component_digest_rsp + suit_rsp_msg_suit_check_installed_component_digest_rsp_m; + struct suit_get_installed_manifest_info_rsp + suit_rsp_msg_suit_get_installed_manifest_info_rsp_m; + struct suit_get_install_candidate_info_rsp + suit_rsp_msg_suit_get_install_candidate_info_rsp_m; + struct suit_authenticate_manifest_rsp + suit_rsp_msg_suit_authenticate_manifest_rsp_m; + struct suit_authorize_unsigned_manifest_rsp + suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m; + struct suit_authorize_seq_num_rsp suit_rsp_msg_suit_authorize_seq_num_rsp_m; + struct suit_check_component_compatibility_rsp + suit_rsp_msg_suit_check_component_compatibility_rsp_m; + struct suit_get_supported_manifest_roles_rsp + suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m; + struct suit_get_supported_manifest_info_rsp + suit_rsp_msg_suit_get_supported_manifest_info_rsp_m; + struct suit_authorize_process_dependency_rsp + suit_rsp_msg_suit_authorize_process_dependency_rsp_m; + struct suit_get_manifest_var_rsp suit_rsp_msg_suit_get_manifest_var_rsp_m; + struct suit_set_manifest_var_rsp suit_rsp_msg_suit_set_manifest_var_rsp_m; + struct suit_evt_sub_rsp suit_rsp_msg_suit_evt_sub_rsp_m; + struct suit_chunk_enqueue_rsp suit_rsp_msg_suit_chunk_enqueue_rsp_m; + struct suit_chunk_status_rsp suit_rsp_msg_suit_chunk_status_rsp_m; + struct suit_boot_mode_read_rsp suit_rsp_msg_suit_boot_mode_read_rsp_m; + struct suit_invoke_confirm_rsp suit_rsp_msg_suit_invoke_confirm_rsp_m; + struct suit_boot_flags_reset_rsp suit_rsp_msg_suit_boot_flags_reset_rsp_m; + struct suit_foreground_dfu_required_rsp + suit_rsp_msg_suit_foreground_dfu_required_rsp_m; + }; + enum { + suit_rsp_msg_suit_trigger_update_rsp_m_c, + suit_rsp_msg_suit_check_installed_component_digest_rsp_m_c, + suit_rsp_msg_suit_get_installed_manifest_info_rsp_m_c, + suit_rsp_msg_suit_get_install_candidate_info_rsp_m_c, + suit_rsp_msg_suit_authenticate_manifest_rsp_m_c, + suit_rsp_msg_suit_authorize_unsigned_manifest_rsp_m_c, + suit_rsp_msg_suit_authorize_seq_num_rsp_m_c, + suit_rsp_msg_suit_check_component_compatibility_rsp_m_c, + suit_rsp_msg_suit_get_supported_manifest_roles_rsp_m_c, + suit_rsp_msg_suit_get_supported_manifest_info_rsp_m_c, + suit_rsp_msg_suit_authorize_process_dependency_rsp_m_c, + suit_rsp_msg_suit_get_manifest_var_rsp_m_c, + suit_rsp_msg_suit_set_manifest_var_rsp_m_c, + suit_rsp_msg_suit_evt_sub_rsp_m_c, + suit_rsp_msg_suit_chunk_enqueue_rsp_m_c, + suit_rsp_msg_suit_chunk_status_rsp_m_c, + suit_rsp_msg_suit_boot_mode_read_rsp_m_c, + suit_rsp_msg_suit_invoke_confirm_rsp_m_c, + suit_rsp_msg_suit_boot_flags_reset_rsp_m_c, + suit_rsp_msg_suit_foreground_dfu_required_rsp_m_c, + } suit_rsp_msg_choice; }; #ifdef __cplusplus