acGetRefACType()
Returns the AC type name if the leaf dpeName refers to an AC type; otherwise, returns an empty string.
Synopsis
string acGetRefACType(string dpeName, string &refType);
Parameters
| Parameter | Meaning |
|---|---|
| dpeName | Datapoint element to check (for example, _mp_COUNTER1.counter) |
| refType | The corresponding AC type (for example, COUNTER_SUB) |
Return Value
The AC type name or an empty string.
Description
Returns the AC-type (Archive and Compression type) name if the leaf dpeName references an AC type; otherwise, returns an empty string. The check starts from the last leaf and stops at the first leaf that references an AC type.
Example
Enter the datapoint element in the text field. When you click the button, the following script checks whether an AC type exists and, if it does, returns the AC type name in a selection list.
main()
{
int value;
value = abs(-56412);
//Setzt 'value' auf den Wert 56412
string name, acType;
name = TextField1.text;
acGetRefACType(name, acType);
DebugN("DP: ",name);
DebugN("AC-DPT: ",acType);
if(acType == "")
SelectionList1.appendItem = "empty";
else
SelectionList1.appendItem = acType;
}
main()
{
string name, acType;
name = TextField1.text;
acGetRefACType(name, acType);
DebugN("DP: ",name);
DebugN("AC-DPT: ",acType);
if(acType == "")
SelectionList1.appendItem = "empty";
else
SelectionList1.appendItem = acType;
}
