refactor(firmware): simplify configuration and diagnostics
This commit is contained in:
1 parent
ba9c97ed3b
commit
fdf82a5114
96 files changed
+1612
-2772
No files matched your search
@@ -3,7 +3,7 @@
|
||||
use kaptan_config::{
|
||||
ConfigModel, ConfigValue, ConfigViolation, FieldWriteError, ValidationRule, ValueKind,
|
||||
};
|
||||
use kaptan_log::KaptanError;
|
||||
use kaptan_err_propagate::KaptanError;
|
||||
use minicbor::{Decoder, Encoder, encode::Write};
|
||||
|
||||
use crate::{CandidateProfile, FORMAT_VERSION, SCHEMA_ID, VehicleCapabilities};
|
||||
@@ -17,12 +17,16 @@ const SCHEMA_KEY: u16 = u16::MAX;
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, KaptanError)]
|
||||
pub enum CborError {
|
||||
/// The supplied payload exceeded the bounded configuration storage budget.
|
||||
#[kaptan_error(id = 3001)]
|
||||
TooLarge,
|
||||
/// CBOR was malformed or did not match a supported versioned wire record.
|
||||
#[kaptan_error(id = 3002)]
|
||||
Malformed,
|
||||
/// A second CBOR item followed the candidate snapshot.
|
||||
#[kaptan_error(id = 3003)]
|
||||
TrailingData,
|
||||
/// The decoded candidate violated complete schema/capability validation.
|
||||
#[kaptan_error(id = 3004)]
|
||||
InvalidProfile(ConfigViolation),
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user