Skip to content

Commit

Permalink
update the docs to show that Autosar R23-11 is supported
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielT committed Jul 23, 2024
1 parent 2817fd4 commit 29db4c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion autosar-data-specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This crate exists to support the autosar-data crate.

The Autosar data model is originally specified as .xsd files - one for each version of the standard.
All these separate xsd files were parsed into data structures and combined; this crate contains the
combined specification data of all 19 Autosar 4 standard revisions.
combined specification data of all 20 Autosar 4 standard revisions.

## Supported standards

Expand All @@ -33,6 +33,7 @@ combined specification data of all 19 Autosar 4 standard revisions.
| AUTOSAR_00049.xsd | AUTOSAR R20-11 |
| AUTOSAR_00050.xsd | AUTOSAR R21-11 |
| AUTOSAR_00051.xsd | AUTOSAR R22-11 |
| AUTOSAR_00052.xsd | AUTOSAR R23-11 |

## Using the crate

Expand Down
3 changes: 2 additions & 1 deletion autosar-data-specification/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//!
//! The Autosar data model is originally specified as .xsd files - one for each version of the standard.
//! All these separate xsd files were parsed into data structures and combined; this crate contains the
//! combined specification data of all 19 Autosar 4 standard revisions.
//! combined specification data of all 20 Autosar 4 standard revisions.
//!
//! ## Supported standards:
//!
Expand All @@ -29,6 +29,7 @@
//! | `AUTOSAR_00049.xsd` | AUTOSAR R20-11 |
//! | `AUTOSAR_00050.xsd` | AUTOSAR R21-11 |
//! | `AUTOSAR_00051.xsd` | AUTOSAR R22-11 |
//! | `AUTOSAR_00052.xsd` | AUTOSAR R23-11 |
//!
//! ## Using the crate
//!
Expand Down
4 changes: 3 additions & 1 deletion autosar-data/examples/generate_files/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashSet;
use autosar_data::*;
use autosar_data_specification::CharacterDataSpec;

static VERSIONS: [AutosarVersion; 19] = [
static VERSIONS: [AutosarVersion; 20] = [
AutosarVersion::Autosar_4_0_1,
AutosarVersion::Autosar_4_0_2,
AutosarVersion::Autosar_4_0_3,
Expand All @@ -23,6 +23,7 @@ static VERSIONS: [AutosarVersion; 19] = [
AutosarVersion::Autosar_00049,
AutosarVersion::Autosar_00050,
AutosarVersion::Autosar_00051,
AutosarVersion::Autosar_00052,
];

fn main() {
Expand Down Expand Up @@ -151,6 +152,7 @@ fn make_cdata(spec: &CharacterDataSpec, version: AutosarVersion) -> CharacterDat
}
autosar_data_specification::CharacterDataSpec::Pattern { regex, .. } => match *regex {
r"0x[0-9a-z]*" => CharacterData::String("0xdeadbeef".to_string()),
r"0[xX][0-9a-fA-F]+" => CharacterData::String("0xbaadf00d".to_string()),
r"[1-9][0-9]*|0[xX][0-9a-fA-F]*|0[bB][0-1]+|0[0-7]*|UNSPECIFIED|UNKNOWN|BOOLEAN|PTR" => {
CharacterData::String("UNSPECIFIED".to_string())
}
Expand Down

0 comments on commit 29db4c5

Please sign in to comment.