GetValueSize
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
Syntax
int getValueSize(EnvVarName);
int getValueSize(char name[]); // form 2
Function
Returns the size of the environment variable value in bytes.
Parameters
EnvVarName Environment variable name.Must exist in the database.
name
Environment variable name
Return Values
Size of the data in bytes.
Reference example from the CANoe 12 help. This is an incomplete context fragment: omitted surrounding code is shown as comments. Do not paste it as a complete program.
int vSize;
// ... surrounding context omitted
// Size of the data of an environment variable of type integer
vSize = getValueSize(switch);
// Buffersize of an environment variable of type string
// (with terminating Null character)
vSize = getValueSize(nodename);
// Size of the data byffer of an environment variable of type data
vSize = getValueSize(DiagData);
// ... surrounding context omitted
Related APIs
| getValue | putValue | Direct access to values from system variables