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

Multiple frames should be related to signal #141

Open
sukvojte opened this issue Jan 19, 2025 · 3 comments
Open

Multiple frames should be related to signal #141

sukvojte opened this issue Jan 19, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@sukvojte
Copy link

Describe the bug
According to spec one signal can be part of multiple frames as long as publisher is same (see LIN Protocol Specification; Revision 2.2A; December 31, 2010; 2.2.3 - Signal packing). But in LinSignal class contain space only for one frame. See:

self.frame: 'LinUnconditionalFrame' = None

To Reproduce

Edit LDF file and add one signal to multiple frame (with same publisher), something like this:

...
Nodes {
    Master: MA, 5 ms, 0.1 ms;
    Slaves: SL1;
}

Signals {
    test1: 4, 0, SL, MA;
    test2: 2, 0, SL, MA;
}

Frames {
    MA_FR1: 0x01, MA, 1 {
        test1, 0;
    }
    MA_FR2: 0x03, MA, 1 {
        test1, 0;
    }
}
...

Expected behavior
A presence of frames property with all frames related to LinSignal object.

Stacktrace/Code
not applicable

Environment:

  • OS: System Version: macOS 15.2 (24C101); Kernel Version: Darwin 24.2.0 ; arm64
  • Python version: 3.11.9
  • ldfparser version: current lastest version (0102a94185b0c25b8eec85e2d190daa4d6b70fe0)

Additional context

@sukvojte sukvojte added the bug Something isn't working label Jan 19, 2025
@sukvojte
Copy link
Author

Threre is mistake in provided example, it should look like this:

...
Nodes {
    Master: MA, 5 ms, 0.1 ms;
    Slaves: SL1;
}

Signals {
    test1: 4, 0, MA,SL1;
    test2: 2, 0, MA, SL1;
}

Frames {
    MA_FR1: 0x01, MA, 1 {
        test1, 0;
    }
    MA_FR2: 0x03, MA, 1 {
        test1, 0;
    }
}
...

@c4deszes
Copy link
Owner

I opened a PR that would allow this mapping and retrieval of this information and for compatibility reasons the existing property is kept.

It doesn't validate the publishers, could you test it whether it satisfies your use cases? If so it would be released under 0.26.0.

@sukvojte
Copy link
Author

Thank you for fast reply. Looks good, I will test it in my codegen later :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants