danielhrisca / asammdf

Fast Python reader and editor for ASAM MDF / MF4 (Measurement Data Format) files
GNU Lesser General Public License v3.0
611 stars 216 forks source link

Get values from invalid signals #990

Open pergustav opened 3 months ago

pergustav commented 3 months ago

Hi,

Using assammdf 7.4.1.

I have signal that I want to read, but the sample values don't match the result from vSignalyzer. I tried to get the signal over the extract_bus_logging function.

The get function has a deprecated variable, ignore_invalid_signals. When adding it back (with an ugly hack, please see below), I retrieve the values as in vSignalyzer.

Setting the parameter raw=True, didn't make any difference.

My goal would be to get invalid signal values, thefore some questions:

`

    if database_files.get("CAN", None):
        out = self._extract_can_logging(
            out,
            database_files["CAN"],
            ignore_value2text_conversion,
            prefix,
            progress=progress,
            ignore_invalid_signals=ignore_invalid_signals
        )

...

def _extract_can_logging(
        self,
        output_file: MDF,
        dbc_files: Iterable[DbcFileType],
        ignore_value2text_conversion: bool = True,
        prefix: str = "",
        progress=None,
        ignore_invalid_signals=False
) -> MDF:

...

    if ignore_invalid_signals:
        if to_keep != all_channels:
            tmp = out.filter(to_keep, out.version)
            out.close()
            out = tmp

`