CAPL 访问超过 52 位的整数信号
CAPL Accessing integer signal with more than 52 bits
问题是关于 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 type int64
.
int64 largeValue;
largeValue = $Some64bitSignal.raw64;
问题是关于 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;