From 7dc085bc003d445ec1ecd2cff02643dc61f26154 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Thu, 1 Sep 2022 16:16:31 +0900 Subject: [PATCH 1/3] add more info to ds err conv fn --- Drivers/Super/driver_super.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Drivers/Super/driver_super.c b/Drivers/Super/driver_super.c index 3dc1e32d0..5260045f9 100644 --- a/Drivers/Super/driver_super.c +++ b/Drivers/Super/driver_super.c @@ -1687,15 +1687,15 @@ CCP_CmdRet DS_conv_driver_err_to_ccp_cmd_ret(DS_DRIVER_ERR_CODE code) case DS_DRIVER_ERR_CODE_ILLEGAL_CONTEXT: case DS_DRIVER_ERR_CODE_UNKNOWN_ERR: // 全てこれでいいのかは,要検討 - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)code); case DS_DRIVER_ERR_CODE_ILLEGAL_PARAMETER: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)code); case DS_DRIVER_ERR_CODE_ILLEGAL_LENGTH: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_LENGTH, (uint32_t)code); default: // ここに来るのは以下 // DS_DRIVER_ERR_CODE_OK - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)code); } } @@ -1705,11 +1705,11 @@ CCP_CmdRet DS_conv_cmd_err_to_ccp_cmd_ret(DS_CMD_ERR_CODE code) switch (code) { case DS_CMD_ILLEGAL_CONTEXT: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)code); case DS_CMD_ILLEGAL_PARAMETER: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)code); case DS_CMD_ILLEGAL_LENGTH: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_LENGTH, (uint32_t)code); default: // ここに来るのは以下の3つ // DS_CMD_OK @@ -1717,7 +1717,7 @@ CCP_CmdRet DS_conv_cmd_err_to_ccp_cmd_ret(DS_CMD_ERR_CODE code) // DS_CMD_UNKNOWN_ERR // 下2つのエラーはDriver側の問題で,そちらでエラー情報を持つべき // ここでは SUCCESSを返す - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)code); } } From 365320a6c77f120da1bf41db9ed80a89142837b0 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Thu, 1 Sep 2022 16:24:28 +0900 Subject: [PATCH 2/3] add more info to tmgr err conv fn --- System/TimeManager/time_manager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/System/TimeManager/time_manager.c b/System/TimeManager/time_manager.c index 6816f476f..70be48dbe 100644 --- a/System/TimeManager/time_manager.c +++ b/System/TimeManager/time_manager.c @@ -237,11 +237,11 @@ static CCP_CmdRet TMGR_conv_tmgr_ack_to_ccp_cmd_ret_(TMGR_ACK ack) switch (ack) { case TMGR_ACK_OK: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)ack); case TMGR_ACK_PARAM_ERR: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); default: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)ack); } } From bdf0d8c5c615da6c5457ca6787a588ece4e4c1cb Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Thu, 1 Sep 2022 16:32:36 +0900 Subject: [PATCH 3/3] add more info to bct err conv fn --- TlmCmd/block_command_table.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/TlmCmd/block_command_table.c b/TlmCmd/block_command_table.c index 8d1a7f5d3..9ce1bcf7f 100644 --- a/TlmCmd/block_command_table.c +++ b/TlmCmd/block_command_table.c @@ -388,30 +388,30 @@ CCP_CmdRet BCT_convert_bct_ack_to_ccp_cmd_ret(BCT_ACK ack) switch (ack) { case BCT_SUCCESS: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)ack); // FIXME: これだめじゃん? case BCT_INVALID_BLOCK_NO: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); case BCT_INVALID_CMD_NO: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_CMD_NOT_DEFINED); + return CCP_make_cmd_ret(CCP_EXEC_CMD_NOT_DEFINED, (uint32_t)ack); case BCT_DEFECTIVE_BLOCK: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)ack); case BCT_CMD_TOO_LONG: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); case BCT_BC_FULL: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)ack); case BCT_ZERO_PERIOD: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); // FIXME: これだめじゃん? default: - return CCP_make_cmd_ret_without_err_code(CCP_EXEC_UNKNOWN); + return CCP_make_cmd_ret(CCP_EXEC_UNKNOWN, (uint32_t)ack); } }