Combine
(VTScada Layer module. Obtain LayerRoot using the following script-only statement: )
LayerRoot = \System.GetLoadedAppInstance(GetGUID(0, \LocalGUID));
Description: | Performs a Merge2 operation with automated conflict resolution and change priority. |
Returns: | Merge buffer |
Usage: | Script Only. (always called as a subroutine) |
Function Groups: | Configuration Management |
Related to: | Diff | Merge2 | Merge |
Format: | LayerRoot\Combine(Source, Diff1, Diff2, SrcPath, pFail) |
Parameters: |
Source |
Required. The buffer or stream to be modified |
Diff1 |
Required. High priority diff to merge to Source. |
Diff2 |
Required. Low priority diff to merge to Source. |
SRCPath |
Required. Full file path for the origin of the Source buffer. |
pFail |
Required. Pointer to a variable in which an error message will be returned. |
Comments: |
This module must be called as a subroutine. This function is guaranteed to return a result, however it will discard changes if unable to merge them without conflict. It is the recommended method for combining different change paths against standard VTScada file types (settings files, source files, tag files, etc.). Notes:
The results of conflict resolution are passed to the Mend function to generate complete merged file buffers. This module returns a simple merge of the high priority diff and the source buffer should conflicts occur and conflict resolution fail. In this case *pFail is set to an error string that describes the failure in a human-readable form. |