sPath | (String) Relative or absolute path to the Pma object in the Pma object tree (case sensitive text).
The path describes the location of the object in the Pma object tree. Each tree level adress is separated by the / character. - The immersed Pma object is referenced by its name.
- The superior Pma object is referenced by .. characters.
- The immersed implementation subobject (other than PmaObject type) is referenced by # character, followed by the implementation subobject type definition (e.g. #vars).
It means that the # addressing leaves the Pma objects tree (created by user) and starts to address the implementation subobjects of the Pma object. For example "/appdata/data/#vars/Temperature". |
---|---|
nAttr | [optional] (Long) allows to change the behavior of the function.
0 (default) - Default behavior.
1 - When referencing the non-existing object, the global error of the INFO system will not be generated. |
// Returns reference to the Pma object by the absolute path:
o = oObject.Pm("/Boiler1/Temperature");
// Returns reference by the relative path. The object will be searched on the same level of the objects tree as the object over which the method is called:
o = oObject.Pm("../Temperature");
// Returns reference by the relative path. The object will be searched among subobjects of the object over which the method is called:
o = oObject.Pm("Temperature");
// Returns reference to the PmVar subobject of the PmaData object:
oVar = pMe.Pm("/Boiler1/Data/#vars/Temperature");
// Detects the existence of the object (possible error will not be generated in the INFO system):
o = oObject.Pm("/Boiler1/Temperature", 1);
if (o)
{
// ...
}