问题是关于 CAPL 信号访问。我们假设代码中有来自某个 PDU 的 64 位无符号整数信号。
尝试将信号值分配给 sysvar
或 qword
变量时,例如:
@sysvar::bar = $foo;
出现警告:
CAPL / .NET Accessing integer signal '[...]/foo' with more than 52 bits, possible loss of data!
在 CANoe 帮助中有关警告 2808
我发现
In $ instructions only integer signals with up to 52 bits can be used without data loss, as values are saved and disclosed internally as doubles.
您知道如何在不丢失数据的情况下分配 64 位无符号整数信号值吗?
最佳答案
在文档中找到解决方案:
Due to the data type double,
.raw
does not return the exact values for signals longer than 52 bit. Please use for these signal lengths.raw64
with the data typeint64
.int64 largeValue; largeValue = $Some64bitSignal.raw64;
关于CAPL 访问超过 52 位的整数信号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66260901/