Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to visualize the database generated from the pdx #361

Open
Sheero-git opened this issue Nov 19, 2024 · 3 comments
Open

Is there a way to visualize the database generated from the pdx #361

Sheero-git opened this issue Nov 19, 2024 · 3 comments

Comments

@Sheero-git
Copy link

I'm looking for an api which helps me visualise the data as an excel or sql format

@andlaus
Copy link
Collaborator

andlaus commented Nov 21, 2024

I suppose the closest thing to what you want that's shipping out-of-the-box is the list command line tool (odxtools list -a $PDX_FILE). That said, since there are basically infinitely many possibilities matching the requirements which you describe above, you probably need to write a script for doing what exactly you need. E.g., if you want to produce a CSV of all diagnostic services but not single-ECU-jobs of all ECU variants in a database, you can use something like this:

import sys
import odxtools

db = odxtools.load_file(sys.argv[1])

print("ECU Name,Service Name")

for ecu in db.ecu_variants:
    for service in ecu.services:
        print(f"{ecu.short_name},{service.short_name}")

@Sheero-git
Copy link
Author

Sheero-git commented Nov 21, 2024

I was actually targetting to change my pdx file to a .db format. It can also be an excel sheet of all details of my pdx containing all requests, pos and neg responses with params defined
Like everything in my file but in a structured format to view it all in a single file

@andlaus
Copy link
Collaborator

andlaus commented Nov 21, 2024

I'm not aware of such a format. odxtools will enable you to easily access all data that's contained in PDX files, but it obviously cannot know what parts of that data you are interested in and how you want that data to be formatted, i.e., you have to write a script doing this (or hire somebody to do it for you)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants