-
Hello, Thanks for the great work with this library. I've recently updated to the new asammdf 6.2 and i've noticed that the api call has changed. This is what i've been doing before:
But it gives the new error "_raise_on_mutiple_occurences" because i did not provide the source. Something like:
I've looked a bit around at different examples, but could not find something to work.
It gives me 2 tuples something like ((642, 35849), (707, 35849)) which i assume the first value is the source, and the second value is the signal itself. But how do I get the name of the source as string (ex. "ECU1") in order to build my data with it. Any suggestion would be greatly appreciated :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @gitMesa I highly recommend that you re-read the documentation but I think this example can help you understand the general principle: from pathlib import Path
from asammdf import MDF
path = Path("my_mdf_file.mf4")
channels = ("name1", "name2", "name3")
source_name = "ECU1"
with MDF(path, channels=channels) as mdf:
occurrences = tuple(
(None, gp_idx, cn_idx)
for name in channels
for gp_idx, cn_idx in mdf.whereis(name, source_name=source_name)
)
signals = mdf.select(occurrences) |
Beta Was this translation helpful? Give feedback.
-
Hi @gitMesa Following our discussion today I made these changes for you: #494 Please mark this question as answered. |
Beta Was this translation helpful? Give feedback.
Hi @gitMesa
Following our discussion today I made these changes for you: #494
Please mark this question as answered.