ssc_parseContext()

The function parses context input to context types and returns the matching DPs and paths.

Synopsis

int ssc_parseContext(dyn_string &dps, const string context);

Parameters

Parameter Description
dps The data points that correspond to the specified context are returned.
context The context that is parsed. A string that can be used to present a group of DPs or plant model paths. "*" and "?" are allowed in the string. The context is used in the context search in the KPI associate panel.

Return Value

The return value is one of the following constants:

const int NO_CONTEXT = 0;
const int TYPE_CONTEXT = 1;
const int CNS_VIEW_CONTEXT = 2;
const int CNS_NODE_CONTEXT = 4;
const int CNS_CONTEXT = 5;
const int DP_CONTEXT = 3;
>

Description

The function parses context input to context types and returns the matching DPs and paths. The result is used when searching for parameters while registering KPI instances.

Example

The example returns data points that correspond to the specified context "System1:ssc_demo_drive?.value".

main()
{
  //Context: The context "System1:ssc_demo_drive?.value"; returns all
  ssc_demo_drive data points of the system 1
  int i;
  dyn_string dps;
  const string context = "System1:ssc_demo_drive?.value";
  i = ssc_parseContext(dps, context);
  DebugN("The returned DPs:", dps);
}

The function outputs the data points that correspond to the specified context, for example:

WCCOAui2: ["The returned DPs:"][dyn_string 3 items
WCCOAui2:
    1: "System1:ssc_demo_drive1.value"
WCCOAui2:
    2: "System1:ssc_demo_drive2.value"
WCCOAui2:
    3: "System1:ssc_demo_drive3.value"
WCCOAui2:
]

Assignment

KPI functions

Availability

SmartSCADA