NetLogic with custom backup and restore methods
Minimal example: Custom backup and restore methods
#region Using directives using System; using UAManagedCore; using OpcUa = UAManagedCore.OpcUa; using FTOptix.UI; using FTOptix.HMIProject; using FTOptix.CoreBase; using FTOptix.NativeUI; using FTOptix.Retentivity; using FTOptix.Core; using FTOptix.NetLogic; #endregion public class RuntimeNetLogic1 : BaseNetLogic { public override void Start() { // Insert code to be executed when the user-defined logic is started } public override void Stop() { // Insert code to be executed when the user-defined logic is stopped } [ExportMethod] public void DoBackup(string path) { var retentivityStorage = Project.Current.Get("Retentivity/RetentivityStorage") as RetentivityStorage; var resourceUri = ResourceUri.FromAbsoluteFilePath(path); retentivityStorage.Backup(resourceUri); } [ExportMethod] public void DoRestore(string path) { var retentivityStorage = Project.Current.Get("Retentivity/RetentivityStorage") as RetentivityStorage; var resourceUri = ResourceUri.FromAbsoluteFilePath(path); retentivityStorage.Restore(resourceUri); } }
For more information about implementation, see Configure retentivity storage backup and restore buttons.
Provide Feedback