Update ExtensionsAndHelpers.cs to fix cycleTime problem#110
Update ExtensionsAndHelpers.cs to fix cycleTime problem#110Adhara3 merged 5 commits intoEFeru:mainfrom
Conversation
当cycletime被定义为FLOAT类型是,原先的代码将无法读取cycletime并直接报错,我增加了一点判断,使其能够读取FLOAT类型的cycletime
Update ExtensionsAndHelpers.cs to fix cycleTime problem
|
Hi, I fear we ended up in the usual lack of spec issue. Bottom line: I will merge the PR to unlock you but technically/philosophically speaking this may lead to other issues. Regards |
|
Hi @Adhara3, Thank you for raising this concern! I did some testing in Vector's CANdb++ Editor to verify the behavior. Here's what I found: Even when the
More importantly, CANoe only supports integer transmission cycles. A cycle time like This behavior suggests that:
Based on this observation, I believe the current PR implementation using That said, if you prefer a more explicit rounding approach like Best regards |
|
Hi, In an ideal world if the property is integer then it should be specified as such, given the spec is clear and distinguish between integer and floating point values. Usually what happens is that the parsing should fail in strict mode, work in loose mode. DBC is instead a pile of sh*t where tons of wrongly formatted files are around so basically we must work in loose mode all the time, so the current implementation is fine. I'm a bit a black swan,. Bottom line: the changed is merged, let's keep it like that. |


When the cycletime is defined as a FLOAT type, the original code will not be able to read the cycletime and will report an error, I added a little bit of judgment to make it able to read the FLOAT type cycletime