Part 1
요약·해설
Write operation으로 빈 CBOR map을 보내 storage_partition을 지우며 성공 response도 빈 map입니다.
63
Erase storage
storage_partition
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
0933451F22D125D959D15672CBB58073688EE6298EC0C956D4445C84FE75E624
.. _mcumgr_smp_group_63:
Zephyr Management Group
#######################
Zephyr management group defines the following commands:
.. table::
:align: center
+----------------+------------------------------+
| ``Command ID`` | Command description |
+================+==============================+
| ``0`` | Erase storage |
+----------------+------------------------------+
Erase storage command
*********************
Erase storage command allows clearing the ``storage_partition`` flash partition on a device,
generally this is used when switching to a new application build if the application uses storage
that should be cleared (application dependent).
Erase storage request
=====================
Erase storage request header fields:
.. table::
:align: center
+--------+--------------+----------------+
| ``OP`` | ``Group ID`` | ``Command ID`` |
+========+==============+================+
| ``2`` | ``63`` | ``0`` |
+--------+--------------+----------------+
The command sends sends empty CBOR map as data.
Erase storage response
======================
Read setting response header fields:
.. table::
:align: center
+--------+--------------+----------------+
| ``OP`` | ``Group ID`` | ``Command ID`` |
+========+==============+================+
| ``3`` | ``63`` | ``0`` |
+--------+--------------+----------------+
The command sends an empty CBOR map as data if successful. In case of error the CBOR data takes
the form:
.. tabs::
.. group-tab:: SMP version 2
.. code-block:: none
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}
.. group-tab:: SMP version 1
.. code-block:: none
{
(str)"rc" : (int)
}
where:
.. table::
:align: center
+------------------+-------------------------------------------------------------------------+
| "err" -> "group" | :c:enum:`mcumgr_group_t` group of the group-based error code. Only |
| | appears if an error is returned when using SMP version 2. |
+------------------+-------------------------------------------------------------------------+
| "err" -> "rc" | contains the index of the group-based error code. Only appears if |
| | non-zero (error condition) when using SMP version 2. |
+------------------+-------------------------------------------------------------------------+
| "rc" | :c:enum:`mcumgr_err_t` only appears if non-zero (error condition) when |
| | using SMP version 1 or for SMP errors when using SMP version 2. |
+------------------+-------------------------------------------------------------------------+
Part 3
한국어 전문 번역
Zephyr management group은 다음 command를 정의합니다.
| Command ID | Command description |
|---|---|
| 0 | Storage erase |
Storage erase command
Storage erase command는 device의 storage_partition flash partition을 지웁니다. 일반적으로 storage를 사용하는 application을 새 build로 바꿀 때 기존 storage를 비워야 하는 경우에 사용하며, 실제 필요 여부는 application에 따라 달라집니다.
Storage erase request
Storage erase request header field는 다음과 같습니다.
| OP | Group ID | Command ID |
|---|---|---|
| 2 | 63 | 0 |
이 command는 data로 빈 CBOR map을 보냅니다. 원문의 ‘sends sends’ 중복은 의미상 한 번 보내는 것으로 옮겼습니다.
Storage erase response
원문에서 read setting response header라고 표기한 storage erase response header field는 다음과 같습니다.
| OP | Group ID | Command ID |
|---|---|---|
| 3 | 63 | 0 |
성공하면 command는 data로 빈 CBOR map을 보냅니다.
Error가 발생하면 CBOR data는 다음 형식입니다.
{
(str)"err" : {
(str)"group" : (uint)
(str)"rc" : (uint)
}
}{
(str)"rc" : (int)
}Error field의 의미는 다음과 같습니다.
err → group | Group 기반 error code의 mcumgr_group_t group입니다. SMP version 2를 사용하며 error가 반환될 때만 나타납니다. |
err → rc | Group 기반 error code의 index입니다. SMP version 2에서 값이 0이 아닌 error condition일 때만 나타납니다. |
rc | mcumgr_err_t입니다. SMP version 1에서 값이 0이 아닌 error condition일 때, 또는 SMP version 2에서 SMP error가 발생할 때만 나타납니다. |
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.