Skip to content

Commit

Permalink
TO BE REMOVED - Only done until the CI is green with this
Browse files Browse the repository at this point in the history
Revert "sdfw_services: regenerate zcbor encoders/decoders with current version"

This reverts commit 48d68a3.
  • Loading branch information
Vge0rge committed Jan 15, 2025
1 parent c193ec0 commit 4d80edd
Show file tree
Hide file tree
Showing 24 changed files with 1,954 additions and 913 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand All @@ -22,45 +22,47 @@
#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_echo_service_rsp(zcbor_state_t *state, struct echo_service_rsp *result);
static bool decode_echo_service_req(zcbor_state_t *state, struct zcbor_string *result);

static bool decode_echo_service_rsp(zcbor_state_t *state, struct echo_service_rsp *result)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_decode(state) &&
((((zcbor_int32_decode(state, (&(*result).echo_service_rsp_ret)))) &&
((zcbor_tstr_decode(state, (&(*result).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));
bool tmp_result =
(((zcbor_list_start_decode(state) &&
((((zcbor_int32_decode(state, (&(*result).echo_service_rsp_ret)))) &&
((zcbor_tstr_decode(state, (&(*result).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

if (!tmp_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__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

static bool decode_echo_service_req(zcbor_state_t *state, struct zcbor_string *result)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_decode(state) &&
((((zcbor_tstr_decode(state, (&(*result)))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));
bool tmp_result = (((zcbor_list_start_decode(state) &&
((((zcbor_tstr_decode(state, (&(*result)))))) ||
(zcbor_list_map_end_force_decode(state), false)) &&
zcbor_list_end_decode(state))));

if (!tmp_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__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

int cbor_decode_echo_service_req(const uint8_t *payload, size_t payload_len,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand All @@ -22,45 +22,47 @@
#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_echo_service_rsp(zcbor_state_t *state, const struct echo_service_rsp *input);
static bool encode_echo_service_req(zcbor_state_t *state, const struct zcbor_string *input);

static bool encode_echo_service_rsp(zcbor_state_t *state, const struct echo_service_rsp *input)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_encode(state, 2) &&
((((zcbor_int32_encode(state, (&(*input).echo_service_rsp_ret)))) &&
((zcbor_tstr_encode(state, (&(*input).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 2))));
bool tmp_result =
(((zcbor_list_start_encode(state, 2) &&
((((zcbor_int32_encode(state, (&(*input).echo_service_rsp_ret)))) &&
((zcbor_tstr_encode(state, (&(*input).echo_service_rsp_str_out))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 2))));

if (!tmp_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__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

static bool encode_echo_service_req(zcbor_state_t *state, const struct zcbor_string *input)
{
zcbor_log("%s\r\n", __func__);

bool res = (((zcbor_list_start_encode(state, 1) &&
((((zcbor_tstr_encode(state, (&(*input)))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 1))));
bool tmp_result = (((zcbor_list_start_encode(state, 1) &&
((((zcbor_tstr_encode(state, (&(*input)))))) ||
(zcbor_list_map_end_force_encode(state), false)) &&
zcbor_list_end_encode(state, 1))));

if (!tmp_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__);
}

log_result(state, res, __func__);
return res;
return tmp_result;
}

int cbor_encode_echo_service_req(uint8_t *payload, size_t payload_len,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

/*
* Generated using zcbor version 0.9.0
* Generated using zcbor version 0.8.1
* https://github.com/NordicSemiconductor/zcbor
* Generated with a --default-max-qty of 3
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
# Copyright (c) 2022 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
Expand Down
Loading

0 comments on commit 4d80edd

Please sign in to comment.