Expand description
§AUTOSAR E2E Protection Library
This library implements the AUTOSAR E2E (End-to-End) protection mechanism as specified in the AUTOSAR standard.
§Overview
The E2E protection mechanism provides end-to-end data protection for safety-critical automotive communication. It detects errors in data transmission including:
- Data corruption (via CRC)
- Message loss, duplication, or reordering (via sequence counter)
- Incorrect addressing (via Data ID)
§Example
use autosar_e2e::{E2EProfile, E2EResult};
use autosar_e2e::profile11::{Profile11, Profile11Config, Profile11IdMode};
// Create a Profile 11 configuration
let config = Profile11Config {
mode: Profile11IdMode::Nibble,
max_delta_counter: 1,
data_length: 40,
..Default::default()
};
// Create the profile instance
let mut profile = Profile11::new(config)?;
// Protect data
let mut data = vec![0x00, 0x00, 0x12, 0x34, 0x56]; //[CRC, counter, user data ..]
profile.protect(&mut data)?;
// Check protected data
let status = profile.check(&data)?;Modules§
- profile4
- E2E Profile 4 Implementation
- profile5
- E2E Profile 5 Implementation
- profile6
- E2E Profile 6 Implementation
- profile7
- E2E Profile 7 Implementation
- profile8
- E2E Profile 8 Implementation
- profile4m
- E2E Profile 4M Implementation
- profile7m
- E2E Profile 7M Implementation
- profile11
- E2E Profile 11 Implementation
- profile22
- E2E Profile 22 Implementation
Enums§
Traits§
- E2EProfile
- This trait defines the common interface that all E2E profiles must implement. Each profile provides three main operations:
Type Aliases§
- E2EResult
- Result type for E2E operations