ModifyConfiguration
(VTScada-Layer function. Must be called with a leading backslash.)
Description: | Provides a safe way to write to configuration files. |
Returns: | Nothing |
Usage: | Script Only. |
Function Groups: | File I/O |
Related to: | FRead | ReadConfiguration | WritePropertiesFile |
Format: | \ModifyConfiguration(pSuccess, CallBackModuleName[, ExtraInfo, Deploy]) |
Parameters: |
pSuccess |
A required pointer to a value, which will be set to 1 on successful completion or 0 on failure. |
CallBackModuleName |
A required text value, containing the name of the callback module to be launched into the caller. |
ExtraInfo |
An optional parameter which may be any value. If present, it will be passed through to the callback module. |
Deploy |
Optional Boolean. Has no effect while the application is running in automatic-deploy mode. If auto-deploy is off, then when this parameter is TRUE (or Invalid) the modified files will be deployed immediately after the changes occur. Defaults to TRUE.
Deploy must be present and set to FALSE to prevent ModifyConfiguration from acting as if auto-deploy is always on. |
Comments: |
If the caller of ModifyConfiguration is subscribed to working copy changes (via WCSubscribe), then it will not get subscription callbacks for its own changes following a call to this function. The callback module, named in the second parameter, must be either a launched module or a subroutine that returns Invalid. The callback module is allowed to write configuration files and is guaranteed that, for the life of the module, no other configuration code can modify that file. |
pUserID |
A pointer variable, to which the current user ID should be assigned. This will be saved as part of the version history. |
pComment |
A pointer variable for a text comment, to be recorded in the version history. |
ChangedFiles |
A dictionary that must be populated with the names of the files to be changed during the callback. For each file, add an entry with the key being the file name and the value set to zero. File names may be absolute or relative. The callback must record the changed files in this dictionary or else they will not be recorded in the configuration management system or deployed to other workstations. |
ExtraInfo |
Extra data to be passed to the callback function. |