Apache License 2.0

项目介绍

DanielT/autosar-data-abstraction 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,采用 Apache License 2.0 许可证,目前获得 7 个 Star、4 次 Fork。

仓库全名
DanielT/autosar-data-abstraction
开源许可证
Apache License 2.0
Star 数
7
Fork 数
4

README 摘要

autosar-data-abstraction This crate provides an abstraction layer for the AUTOSAR data model. It is built on top of the crate autosar-data and provides complex interactions with the model on top of the elementary operations of autosar-data. Rather than transforming the element based model into a new form, it only presents a view into the existing model, and provides methods to retrieve and modify the data. Since the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

autosar-data-abstraction 用什么语言开发?

主要使用 Rust 编写,采用 Apache License 2.0 许可证,目前有 7 个 Star。

autosar-data-abstraction 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 autosar-data-abstraction 的源码?

可以直接克隆仓库:git clone https://github.com/DanielT/autosar-data-abstraction.git,默认分支为 main;安装与运行步骤见仓库 README。

autosar-data-abstraction 最近还在维护吗?

仓库最近一次更新为 8月16日,当前没有未关闭的 Issue;Star 数为 7,可作为社区活跃度的参考。

关于

An abstraction layer to simplify working with ARXML files

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
16
价值分
5
活跃状态
活跃

语言占比

Rust

贡献者

README

autosar-data-abstraction

Github Actions

This crate provides an abstraction layer for the AUTOSAR data model. It is built on top of the crate autosar-data and provides complex interactions with the model on top of the elementary operations of autosar-data.

Rather than transforming the element based model into a new form, it only presents a view into the existing model, and provides methods to retrieve and modify the data.

Since the AUTOSAR data model is very complex and has many different types of elements, this crate does not aim to provide full coverage of all classes. Instead the focus is on the most common classes and their interactions.

Any other data can still be accessed through the basic operations of autosar-data, because the calls to autosar-data and autosar-data-abstraction can be mixed freely.

Features

Autosar Classic Platform:

  • Communication:
    • Busses
      • CAN
      • Ethernet (both old and new style)
      • FlexRay
      • not supported: LIN, J1939
    • PDUs
    • Signals
    • Transformations: SomeIp, E2E, Com
  • Data Types
    • Basic data types
    • Implementation data types
    • Application data types
  • Software Components
    • Atomic SWCs, Compositions, etc.
    • Interfaces
    • Ports
    • Internal behavior: Runnables, Events, etc.
  • ECU Configuration

Example

# use autosar_data::*;
# use autosar_data_abstraction::*;
# use autosar_data_abstraction::communication::*;
# fn main() -> Result<(), AutosarAbstractionError> {
let model = AutosarModelAbstraction::create("file.arxml", AutosarVersion::Autosar_00049);
let package_1 = model.get_or_create_package("/System")?;
let system = package_1.create_system("System", SystemCategory::SystemExtract)?;
let package_2 = model.get_or_create_package("/Clusters")?;

// create an Ethernet cluster and a physical channel for VLAN 33
let eth_cluster = system.create_ethernet_cluster("EthCluster", &package_2)?;
let vlan_info = EthernetVlanInfo {
    vlan_id: 33,
    vlan_name: "VLAN_33".to_string(),
};
let eth_channel = eth_cluster.create_physical_channel("EthChannel", Some(&vlan_info))?;
let vlan_info_2 = eth_channel.vlan_info().unwrap();

// create an ECU instance and connect it to the Ethernet channel
let package_3 = model.get_or_create_package("/Ecus")?;
let ecu_instance_a = system.create_ecu_instance("Ecu_A", &package_3)?;
let ethctrl = ecu_instance_a
    .create_ethernet_communication_controller(
        "EthernetController",
        Some("ab:cd:ef:01:02:03".to_string())
    )?;
let channels_iter = ethctrl.connected_channels();
ethctrl.connect_physical_channel("Ecu_A_connector", &eth_channel)?;
let channels_iter = ethctrl.connected_channels();

// ...
# Ok(())}

评论

暂无评论