Skip to content

Commit

Permalink
update specification: support Autosar version R23-11
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielT committed Dec 14, 2023
1 parent af70d01 commit e244078
Show file tree
Hide file tree
Showing 6 changed files with 29,052 additions and 26,162 deletions.
7 changes: 6 additions & 1 deletion autosar-data-specification/src/autosarversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ pub enum AutosarVersion {
Autosar_00050 = 0x20000,
/// AUTOSAR R22-11 - xsd file name: AUTOSAR_00051.xsd
Autosar_00051 = 0x40000,
/// AUTOSAR R23-11 - xsd file name: AUTOSAR_00052.xsd
Autosar_00052 = 0x80000,
}

impl AutosarVersion {
Expand All @@ -75,6 +77,7 @@ impl AutosarVersion {
Self::Autosar_00049 => "AUTOSAR_00049.xsd",
Self::Autosar_00050 => "AUTOSAR_00050.xsd",
Self::Autosar_00051 => "AUTOSAR_00051.xsd",
Self::Autosar_00052 => "AUTOSAR_00052.xsd",

}
}
Expand Down Expand Up @@ -105,6 +108,7 @@ impl AutosarVersion {
Self::Autosar_00049 => "AUTOSAR R20-11",
Self::Autosar_00050 => "AUTOSAR R21-11",
Self::Autosar_00051 => "AUTOSAR R22-11",
Self::Autosar_00052 => "AUTOSAR R23-11",

}
}
Expand All @@ -121,7 +125,7 @@ impl AutosarVersion {
}

/// `AutosarVersion::LATEST` is an alias of which ever is the latest version
pub const LATEST: AutosarVersion = AutosarVersion::Autosar_00051;
pub const LATEST: AutosarVersion = AutosarVersion::Autosar_00052;
}

impl std::str::FromStr for AutosarVersion {
Expand All @@ -147,6 +151,7 @@ impl std::str::FromStr for AutosarVersion {
"AUTOSAR_00049.xsd" => Ok(Self::Autosar_00049),
"AUTOSAR_00050.xsd" => Ok(Self::Autosar_00050),
"AUTOSAR_00051.xsd" => Ok(Self::Autosar_00051),
"AUTOSAR_00052.xsd" => Ok(Self::Autosar_00052),

_ => Err(ParseAutosarVersionError),
}
Expand Down
Loading

0 comments on commit e244078

Please sign in to comment.