dpGetAllAliases()
Returns all data points and their aliases. For the return of aliases you can also define filters in this function (see description of the parameters below). The function replaces getAllDpAliases() in versions > 2.11.1.
Synopsis
int dpGetAllAliases(dyn_string &dps, dyn_string &aliases [, string
aliasFilter [, string dpeFilter]]);
Parameters
Parameter | Meaning |
---|---|
dps | Data points |
aliases | Aliases of data points |
aliasFilter | Pattern string for filtering the aliases (for example,"Engine*", "*"). See also dpGetAllDescriptions(). |
dpeFilter | Pattern string for filtering data point elements (for example, dpeFilter = "*.para"). An empty dpe pattern ("") and a "*" are treated like ALL DPEs. Also queries on remote systems can be executed. The system is part of the dpeFilter (for example, "Sys23:*.**" - returns all aliases of a specific system; "*:*.**" would return the aliases of all systems. you can use it e.g. in a distributed system). Several systems can be defined with a list (for example, "Sys{1,2,3,45}:Ex*"). See also dpGetAllDescriptions(). |
Return Value
In the event of an error -1, otherwise the number of aliases that were found.
Errors
Errors can be retrieved with getLastError() . The return value is then the appropriate error code.
Description
Fills the transferred dyn_strings with data point names and the associated aliases in the language lang.
Example
The aliases of Motor_1 and Motor_2 are read by the dyn_string "ali", and afterwards debugged in the log viewer.
main()
{
dyn_string dps, ali;
int i;
i = dpGetAllAliases(dps, ali);
DebugN(i);
DebugN(dps, ali); // Output
}
Assignment
Data point function
Availability
UI, CTRL