An example of the usage: Imagine the folder PmFolder that represents a device (e.g. Boiler). Sometimes it is necessary to detach this Boiler. It can be done so that in another folder there is detailed algorithm how to detach the Boiler but much better is to create the method directly in the Boiler folder where the algorithm for the outage is placed. Then from the other folder this method is just called.
|pMe||(Object) Reference to the Promotic object, where the method is defined.|
|pResult||[for write only] (Variant) Represents a return parameter that is used for method output value.|
|pContext||(Object) (for PmRoot and PmPanel objects) reference to the object containig additional information about method calling conditions.|
pContext.User - (Object) property with User object referrence, containing detailed information about the user (local or network), that called the method. It can be used for example:
- for protecting the method for specific logged user or user group.
- for storing and reading the private user state data using the methods SetPrivateData and GetPrivateData.
Caution! In order to keep the subobject User value trustworthy it is necessary to exclude the the pseudo-groups $ANY and $ANY_NET from the appropriate permission WebRead (i.e. to ensure that the user is logged in when opening the Web panel).
pContext.Language - (String) it returns the information about the national language, to be used for text outputs of the method (suitable especially for calling the method from Web panels). Language is determined with a text identifier, e.g. "en", "de", "ru" etc. - see Fully supported languages in the PROMOTIC system. See the configurator "Main language of runtime".
pContext.TypeEnable - (Long) A permission type of client method calling. The designer can (according to the user setting, password or the computer address) disable the operation. Setting this parameter is recommended only for special cases. Common security setting is better to be done by standard means of the permissions: WebMethods.
Caution! The property is functional only for Web panels.
1 (default) - enabling operation.
-1 - required log-on of the user (if the user hasn't been set) or disabling the user (if the user has been set but the name and password are wrong).
-2 - disabling operation for the client unconditionally.
|User defined parameters||(Variant) They serve as passed parameters when calling the method These parameters are defined in the Parameters configurator.|
pResult = val + 10
n = oFolder.Methods.dataadd("data1")
val = Pm.Methods.GetStartTime(par1)