Skip to main content

sysFilterAddVariable

Open topic with navigation CAPL Functions » System Variables » sysFilterAddVariable

Function Syntax

  • long sysFilterAddVariable(sysVar variable); // form 1
  • long sysFilterAddVariable(sysVar variable, char filterName[]); // form 2
  • long sysFilterAddVariable(char namespace[], char variable[]); // form 3
  • long sysFilterAddVariable(char namespace[], char variable[], char filterName[]); // form 4

Description

Adds a variable to a filter. If no filterName is given, the variable will be added to the default filter.

Parameters

  • variable: The variable to add.
    • Note: If a struct member is specified, the whole struct will be added.
  • filterName: The name of the filter the variable should be added to.
    • Note: An empty filterName refers to the default filter and can be omitted completely.
  • namespace: The namespace that contains the variable.
  • variable (char[]): The name of the variable.

Return Values

  • 0: No error, function successful.
  • 2: The variable filter does not exist. The variable cannot be added.
  • 3: The variable is already added to the filter.
  • 6: The variable does not exist. The variable cannot be added.

Example

long result;
//create default filter as Stop Filter
result = sysCreateVariableFilter(0);
//add a variable that should be stopped by the filter
result = sysFilterAddVariable(sysvar::myNamespace::myVariable);