PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Arp::Plc::Retain::Services::IRetainManagerService Class Referenceabstract

Use this service for the retain backup handling. More...

#include <IRetainManagerService.hpp>

Inheritance diagram for Arp::Plc::Retain::Services::IRetainManagerService:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< IRetainManagerService >
 
- Public Types inherited from Arp::Base::Rsc::Commons::IRscService
using Ptr = std::shared_ptr< IRscService >
 The shared_ptr type of IRscService.
 

Public Member Functions

 IRetainManagerService (void)=default
 Constructs an IRetainManagerService instance.
 
virtual BackupResult GenerateBackupFile ()=0
 Generates a backup file of the retain data More...
 
virtual BackupResult PrepareLatestBackupFileForRestoring ()=0
 Prepares the latest backup file of retain data for restoring for the next plc 'RestoreWarm' start More...
 
- Public Member Functions inherited from Arp::Base::Rsc::Commons::IRscService
 IRscService (void)=default
 The default constructor.
 
 IRscService (const IRscService &arg)=delete
 The deleted copy constructor. More...
 
 IRscService (IRscService &&arg) noexcept=default
 The default move constructor. More...
 
IRscServiceoperator= (const IRscService &arg)=delete
 The deleted assignment operator. More...
 
IRscServiceoperator= (IRscService &&arg) noexcept=default
 The default move-assignment operator. More...
 
virtual ~IRscService (void)=default
 Destructs this instance and frees all resources.
 

Static Public Member Functions

static IRscServiceProxyFactoryGetProxyFactory (void)
 
- Static Public Member Functions inherited from Arp::Base::Rsc::Commons::IRscService
static IRscServiceProxyFactoryGetProxyFactory (void)
 Returns a reference to service proxy factory to create a proxy instance of this service. More...
 

Detailed Description

Use this service for the retain backup handling.

This service is defined in library Arp.Plc.Retain.

Realtime Usage: This API call does not have to be deterministic in runtime behaviour, so an asynchronous execution should be considered.

Member Function Documentation

◆ GenerateBackupFile()

virtual BackupResult Arp::Plc::Retain::Services::IRetainManagerService::GenerateBackupFile ( )
pure virtual

Generates a backup file of the retain data

Generates a backup file of all configured retain data including a header with several information e.g. version, project name, hw name, fw version, etc. The backup file is stored in the configured retain backup path. The name of the backup file is generated from the time of creation with the suffix '_USER'. E.g.: 2020_06_02_14_44_23_User

Returns
A result item which contains the created backup file name and an error code.

◆ PrepareLatestBackupFileForRestoring()

virtual BackupResult Arp::Plc::Retain::Services::IRetainManagerService::PrepareLatestBackupFileForRestoring ( )
pure virtual

Prepares the latest backup file of retain data for restoring for the next plc 'RestoreWarm' start

Prepares the retain data of the lastest retain backup file based on the name, which is contained in the configured retain backup path and matched to the format defined. On the next 'RestoreWarm' start the prepared backup data is used instead of the data from the retain memory. The prepared backup will be cleared at each plc start (Cold, Warm, Hot, RestoreWarm), DCG and PlcReset.

Returns
An item which contains the prepared backup file name and an error code.

The documentation for this class was generated from the following file: