Name | py-eb-model JSON |
Version |
1.1.5
JSON |
| download |
home_page | None |
Summary | The parser for EB XDM file |
upload_time | 2025-02-03 13:06:26 |
maintainer | None |
docs_url | None |
author | melodypapa |
requires_python | None |
license | proprietary |
keywords |
eb
tresos
xdm
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 1. py-eb-model
1. The python parser engine for EB Tresos Xdm file.
2. To support EB Tresos data model with python.
# 2. How to create the distribution and upload to pypi
1. Run `python setup.py bdist_wheel` to generate distribution
2. Run `twine check dist/*` to check the validation of distribution
3. Run `twine upload dist/*` to upload to pypi repository
4. Check the website https://pypi.org/project/armodel/ to find out it works or not
And more details can be found at https://packaging.python.org/
# 3. CLI
## 3.1. os-task-xlsx
Extract the Os Task information from os.xdm and then report all to Excel file.
```bash
os-xdm-xlsx data/Os.xdm data/Os.xlsx
```
**Result:**
1. OsIsrs

1. OsTasks

3. OsScheduleTable

4. OsCounter

## 3.2. rte-task-xls
Extract the Rte Configuration information from rte.xdm and then report all to Excel file.
1. Export the Rte Configuration information to excel file
```bash
rte-xdm-xlsx data/Rte.xdm data/Rte.xlsx
```
2. Export the Runnable Entities information to excel file
```bash
rte-xdm-xlsx -r data/Rte.xdm data/Os.xdm data/Runnable.xlsx
```
## 3.3. PrefSystemImporter
Read the EB preference XDM and generate the ARXML file list into text file or create the AUTOSAR builder project file.
```bash
$ pref-system-importer.exe -h
usage: pref-system-importer [-h] [-v] [--file-list] [--ab-project] [--base-path BASE_PATH] [--TRESOS_OUTPUT_BASE_DIR TRESOS_OUTPUT_BASE_DIR] [--project PROJECT] INPUTS [INPUTS ...] OUTPUT
positional arguments:
INPUTS The path of perf_imp_xxx.xdm.
OUTPUT The path of output file.
optional arguments:
-h, --help show this help message and exit
-v, --verbose print debug information.
--file-list generate the file list (Default)
--ab-project generate the AUTOSAR builder project
--base-path BASE_PATH
base Path for EB tresos
--env ENV [ENV ...] specify the environment variable
--project PROJECT specify the project name
```
### 3.3.1. Configuration
**h, help**
> Show the usage information
**-v, --verbose**
> Print the extra debug information during execution.
**--file-list or --ab-project**
> Generate ARXML file list text file or AUTOSAR builder project.
**--base-path**
> Base path for the EB tresos project. **For example**: c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte
>
> If the base path is specified, all input preference XDM configuration files will be based on this BasePath, which can solve the problem of the input preference configuration file name being too long.
**--project**
> The project name will be generate in the AUTOSAR build project.
>
> It is meaningless if you choose to generate ARXML file list text file.
**--env**
> Replace the variable definition of ${env_var:xxx} which is defined in the EB preference XDM file.
### 3.3.2. Example
**To generate the ARXML file list:**
* Base path: c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte
* INPUT:
* c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/.prefs/pref_imp_exp_Imp_System.xdm
* OUTPUT: output.lst
```bash
PrefSystemImporter --base-path c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte .prefs/pref_imp_exp_Imp_System.xdm output.lst
```
**To generate the AUTOSAR builder project:**
All ARXML files in the .project file will use relative path names, so it is recommended to run PrefSystemImporter in the directory where the .project is located.
* Base Path: c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte
* INPUTs:
* c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/.prefs/pref_imp_exp_Bswm_rte.xdm
* c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/.prefs/pref_imp_exp_Imp_System.xdm
* OUTPUT
* c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/ab_project/.project
* Project Name: SimpleDemoRte
```bash
cd c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/ab_project
PrefSystemImporter --base-path c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte --ab-project --project SimpleDemoRte .prefs/pref_imp_exp_Bswm_rte.xdm .prefs/pref_imp_exp_Imp_System.xdm .project
```
# 4. Change History
**Version 0.8.0**
1. Create the basic model for EB xdm. (Issue #1)
2. Support to extract the Os Tasks/Isrs from EB xdm and store them in the excel files. (Issue #1)
**Version 1.0.1**
1. Change the attribute to start with lowercase
2. *read_ref_value* and *read_optional_ref_value* method returns EcucRefType.
3. Read the OsScheduleTable and export to excel
4. Read the OsCounter and export to excel
**Version 1.0.2**
1. Fix the setOsAlarmCallbackName bug
**Version 1.0.3**
1. Generate the System import file list based on EB preference Xdm.
2. Add the support to read OsTaskAutostart element.
3. Add the support to read OsTaskType element.
**Version 1.1.1**
1. Add the support to append SystemMod/EcuExtract.arxml into list automatically for PrefSystemImporter.
**Version 1.1.2**
1. Read the OsAppTaskRef from OsApplication.
**Version 1.1.3**
1. Support to read Isr Priority and Vector for R52+ core.
2. Export the Isr Priority and Vector to Excel.
3. Read the OsAppResourceRef, OsAppIsrRef from OsApplication.
**Version 1.1.4**
1. Fix the incorrect attribute of osTaskAutostart.
2. Add the isOsTaskAutostart method to get the enabled flag of osTaskAutostart.
3. Add the flake8 change rules.
**Version 1.1.5**
1. Add the new interfaces to support to get the instance by name.
* Rte::getRteBswModuleInstance
* Rte::getRteBswModuleInstance
Raw data
{
"_id": null,
"home_page": null,
"name": "py-eb-model",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "EB Tresos XDM",
"author": "melodypapa",
"author_email": "melodypapa@outlook.com",
"download_url": null,
"platform": null,
"description": "# 1. py-eb-model\r\n\r\n1. The python parser engine for EB Tresos Xdm file.\r\n2. To support EB Tresos data model with python.\r\n\r\n# 2. How to create the distribution and upload to pypi\r\n\r\n1. Run `python setup.py bdist_wheel` to generate distribution\r\n2. Run `twine check dist/*` to check the validation of distribution\r\n3. Run `twine upload dist/*` to upload to pypi repository\r\n4. Check the website https://pypi.org/project/armodel/ to find out it works or not\r\n\r\nAnd more details can be found at https://packaging.python.org/ \r\n\r\n# 3. CLI \r\n\r\n## 3.1. os-task-xlsx\r\n\r\nExtract the Os Task information from os.xdm and then report all to Excel file.\r\n\r\n```bash\r\nos-xdm-xlsx data/Os.xdm data/Os.xlsx\r\n```\r\n\r\n**Result:**\r\n\r\n1. OsIsrs\r\n\r\n\r\n\r\n1. OsTasks\r\n\r\n\r\n\r\n3. OsScheduleTable\r\n\r\n\r\n\r\n4. OsCounter\r\n\r\n\r\n\r\n## 3.2. rte-task-xls\r\n\r\nExtract the Rte Configuration information from rte.xdm and then report all to Excel file.\r\n\r\n1. Export the Rte Configuration information to excel file\r\n\r\n```bash\r\nrte-xdm-xlsx data/Rte.xdm data/Rte.xlsx\r\n```\r\n\r\n2. Export the Runnable Entities information to excel file\r\n\r\n```bash\r\nrte-xdm-xlsx -r data/Rte.xdm data/Os.xdm data/Runnable.xlsx\r\n```\r\n\r\n## 3.3. PrefSystemImporter\r\n\r\nRead the EB preference XDM and generate the ARXML file list into text file or create the AUTOSAR builder project file.\r\n\r\n```bash\r\n$ pref-system-importer.exe -h\r\nusage: pref-system-importer [-h] [-v] [--file-list] [--ab-project] [--base-path BASE_PATH] [--TRESOS_OUTPUT_BASE_DIR TRESOS_OUTPUT_BASE_DIR] [--project PROJECT] INPUTS [INPUTS ...] OUTPUT\r\n\r\npositional arguments:\r\n INPUTS The path of perf_imp_xxx.xdm.\r\n OUTPUT The path of output file.\r\n\r\noptional arguments:\r\n -h, --help show this help message and exit\r\n -v, --verbose print debug information.\r\n --file-list generate the file list (Default)\r\n --ab-project generate the AUTOSAR builder project\r\n --base-path BASE_PATH\r\n base Path for EB tresos\r\n --env ENV [ENV ...] specify the environment variable\r\n --project PROJECT specify the project name\r\n```\r\n### 3.3.1. Configuration\r\n\r\n**h, help**\r\n> Show the usage information \r\n\r\n**-v, --verbose**\r\n> Print the extra debug information during execution.\r\n\r\n**--file-list or --ab-project**\r\n> Generate ARXML file list text file or AUTOSAR builder project.\r\n\r\n**--base-path**\r\n> Base path for the EB tresos project. **For example**: c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte\r\n>\r\n> If the base path is specified, all input preference XDM configuration files will be based on this BasePath, which can solve the problem of the input preference configuration file name being too long.\r\n\r\n**--project**\r\n\r\n> The project name will be generate in the AUTOSAR build project. \r\n>\r\n> It is meaningless if you choose to generate ARXML file list text file.\r\n\r\n**--env**\r\n\r\n> Replace the variable definition of ${env_var:xxx} which is defined in the EB preference XDM file.\r\n\r\n### 3.3.2. Example\r\n\r\n**To generate the ARXML file list:**\r\n\r\n* Base path: c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte\r\n* INPUT: \r\n * c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/.prefs/pref_imp_exp_Imp_System.xdm \r\n* OUTPUT: output.lst\r\n\r\n```bash\r\nPrefSystemImporter --base-path c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte .prefs/pref_imp_exp_Imp_System.xdm output.lst \r\n```\r\n\r\n**To generate the AUTOSAR builder project:**\r\n\r\nAll ARXML files in the .project file will use relative path names, so it is recommended to run PrefSystemImporter in the directory where the .project is located.\r\n\r\n* Base Path: c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte\r\n* INPUTs:\r\n * c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/.prefs/pref_imp_exp_Bswm_rte.xdm \r\n * c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/.prefs/pref_imp_exp_Imp_System.xdm\r\n* OUTPUT\r\n * c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/ab_project/.project\r\n* Project Name: SimpleDemoRte\r\n\r\n```bash\r\ncd c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte/ab_project\r\nPrefSystemImporter --base-path c:/EB/ACG-8_8_8_WIN32X86/workspace/simple_demo_rte --ab-project --project SimpleDemoRte .prefs/pref_imp_exp_Bswm_rte.xdm .prefs/pref_imp_exp_Imp_System.xdm .project \r\n```\r\n\r\n# 4. Change History\r\n\r\n**Version 0.8.0** \r\n\r\n1. Create the basic model for EB xdm. (Issue #1)\r\n2. Support to extract the Os Tasks/Isrs from EB xdm and store them in the excel files. (Issue #1)\r\n\r\n**Version 1.0.1**\r\n\r\n1. Change the attribute to start with lowercase \r\n2. *read_ref_value* and *read_optional_ref_value* method returns EcucRefType.\r\n3. Read the OsScheduleTable and export to excel\r\n4. Read the OsCounter and export to excel\r\n\r\n**Version 1.0.2**\r\n\r\n1. Fix the setOsAlarmCallbackName bug\r\n\r\n**Version 1.0.3**\r\n\r\n1. Generate the System import file list based on EB preference Xdm.\r\n2. Add the support to read OsTaskAutostart element.\r\n3. Add the support to read OsTaskType element.\r\n\r\n**Version 1.1.1**\r\n\r\n1. Add the support to append SystemMod/EcuExtract.arxml into list automatically for PrefSystemImporter.\r\n\r\n**Version 1.1.2**\r\n\r\n1. Read the OsAppTaskRef from OsApplication.\r\n\r\n**Version 1.1.3**\r\n\r\n1. Support to read Isr Priority and Vector for R52+ core.\r\n2. Export the Isr Priority and Vector to Excel.\r\n3. Read the OsAppResourceRef, OsAppIsrRef from OsApplication.\r\n\r\n**Version 1.1.4**\r\n\r\n1. Fix the incorrect attribute of osTaskAutostart.\r\n2. Add the isOsTaskAutostart method to get the enabled flag of osTaskAutostart.\r\n3. Add the flake8 change rules.\r\n\r\n**Version 1.1.5**\r\n\r\n1. Add the new interfaces to support to get the instance by name.\r\n * Rte::getRteBswModuleInstance\r\n * Rte::getRteBswModuleInstance\r\n\r\n\r\n",
"bugtrack_url": null,
"license": "proprietary",
"summary": "The parser for EB XDM file",
"version": "1.1.5",
"project_urls": null,
"split_keywords": [
"eb",
"tresos",
"xdm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d44b89e9ec610ab870f4d39fc5060ce51b00b6d446d944ad69e592816af2ce69",
"md5": "a6db444baa4611f127842ec78a94dbd6",
"sha256": "fe72db08a6d6d669d54ee67c6061eb28a6ee2e95cfd4e21a6a075457576248d5"
},
"downloads": -1,
"filename": "py_eb_model-1.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6db444baa4611f127842ec78a94dbd6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 34272,
"upload_time": "2025-02-03T13:06:26",
"upload_time_iso_8601": "2025-02-03T13:06:26.104308Z",
"url": "https://files.pythonhosted.org/packages/d4/4b/89e9ec610ab870f4d39fc5060ce51b00b6d446d944ad69e592816af2ce69/py_eb_model-1.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-03 13:06:26",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "py-eb-model"
}