-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default manager / Bootloader info command
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
mcumgr-core/src/main/java/io/runtime/mcumgr/response/dflt/McuMgrBootloaderInfoResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) Intellinium SAS, 2014-present | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.runtime.mcumgr.response.dflt; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
/** @noinspection unused*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class McuMgrBootloaderInfoResponse extends McuMgrOsResponse { | ||
/** Unknown mode of MCUboot. */ | ||
public static final int MODE_UNKNOWN = -1; | ||
/** MCUboot is in single application mode. */ | ||
public static final int MODE_SINGLE_APP = 0; | ||
/** MCUboot is in swap using scratch partition mode. */ | ||
public static final int MODE_SWAP_SCRATCH = 1; | ||
/** MCUboot is in swap without scratch mode. */ | ||
public static final int MODE_SWAP_WITHOUT_SCRATCH = 2; | ||
/** MCUboot is in DirectXIP mode. */ | ||
public static final int MODE_DIRECT_XIP = 3; | ||
|
||
// Note: other modes may be added in the future. | ||
|
||
/** Text response including requested parameters. */ | ||
@JsonProperty("mode") | ||
public int mode = MODE_UNKNOWN; | ||
|
||
@JsonProperty("bootloader") | ||
public String bootloader; | ||
|
||
@JsonCreator | ||
public McuMgrBootloaderInfoResponse() {} | ||
} |