Multiple frames should be related to signal
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: https://github.com/c4deszes/ldfparser/blob/fbf34fe04a2fee9dfc1a5ab9c721127ed25e0055/ldfparser/signal.py#L34
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
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;
}
}
...
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.
Thank you for fast reply. Looks good, I will test it in my codegen later :)