Limitation of Lengths
Object | Limitation of Length | Note |
---|---|---|
strings | — | Version 4.0...6.0 256 characters, previously 79 characters. |
CANdb | maximum: 128 characters | With longer names, only 128 characters are taken into account.* |
CANdb | maximum: 80 characters | With longer names, only 80 characters are taken into account.* |
CANdb | maximum: 32 characters | With longer names, only 32 characters are taken into account.* |
names of variables/functions | maximum: 128 characters | Starting with CANoe Version 5.2. |
line length | — | Up to and including CANoe Version 4.1: when compiling from CANoe no limitation. Starting with version 5.0: unlimited overall |
Value Ranges
Number of bits, signed/unsigned by integral data types:
Object | Limitation in bytes | Value Range | Note |
---|---|---|---|
char | 1 byte | -128...+127 | C/C++: char |
byte | 1 byte | 0...255 | C/C++: unsigned char |
int | 2 bytes | -32768...+32767 | C/C++: short |
word | 2 bytes | 0...65535 | C/C++: unsigned short |
long | 4 bytes | -2147483648 | C/C++: long |
dword | 4 bytes | 0...4294967295 | C/C++: unsigned long |
int64 | 8 bytes | -9223372036854775808 | C/C++: long long |
qword | 8 bytes | 0... 18446744073709551615 (0xffffffffffffffff) | C/C++: unsigned long long |
Display of floats (64-bit IEEE-float):
Object | Limitation in bytes | Value Range | Note |
---|---|---|---|
double, float | 8 bytes | -1.7E +/- 308 | C/C++: double |
Limitation of Lengths and Numbers
Object | Limitation | Note |
---|---|---|
function names in | maximum length: 20 characters | when using |
maximum length: 50 characters | when using CAPL_DLL_INFO2 * when using CAPL_DLL_INFO3 * | |
parameters in CAPL functions | maximum number: 64 | Intrinsic functions and functions in CAPL DLLs. Maximum parameter number up to and including CANoe version 8.0: 10. |
databases that can be assigned to a node | unlimited number | — |
CAPL DLLs | unlimited number | — |
case in switch instructions | unlimited number | Starting with CANoe Version 6.0, previously 97. |
数据转换:
{
// Float32 转 U32
float in_float = 123.456;
dword out_dword;
out_dword = interpretAsDword(in_float);
write("out_dword =0x%x, ",out_dword);
}
{
//U32 转 Float32
dword in_dword = 0x42f6e979;
float out_float;
out_float = interpretAsFloat(in_dword);
write("out_float =%.3f, ",out_float);
}
out_dword =0x42f6e979,
out_float =123.456001,
数据转换计算平台:
IEEE-754 Floating Point Converter