sysGetVariableArrayLength
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DEFunction Syntax
dword sysGetVariableArrayLength(char namespace[], char variable[]); // form 1dword sysGetVariableArrayLength(SysVarName); // form 2
Description
Returns the length of the array of the system variable. Note- Direct access to values from system variables. An access to the whole array is with this variant not possible.
-
The function can also be used for specific elements of a system variable of type struct or generic array. For this, add the element to the name of the variable. If you directly give the element name to the function instead of using strings, precede the name by sysvarMember:: instead of sysvar::.
Example:
sysvarMember::SomeNamespace::SomeStructVariable.SomeArrayMember[0]
Parameters
- namespace: Name of the namespace.
- variable: Name of the variable.
- SysVarName: Name of the fully qualified name of the system variable, including all namespaces, separated by ”::”. The name must be preceded by “sysVar::”.
Return Values
- For system variables of type data, returns the current size (in bytes) of the value.
- For system variables of type long or float array, returns the number of elements in the array.
- For system variables of type string, returns the length of the string, excluding the terminating 0 character.
- For system variables of type long or float, returns 1.