8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9#include "Arp/Base/Rsc/Commons/IRscService.hpp"
11#include "Arp/Base/Rsc/Commons/RscSecureString.hxx"
12#include "Arp/Base/Rsc/Commons/RscString.hxx"
13#include "Arp/Services/SoftwareUpdate/Services/SoftwareUpdateStatus.hpp"
14#include "Arp/Services/SoftwareUpdate/Services/SoftwareVersionFileType.hpp"
15#include "Arp/Services/SoftwareUpdate/Services/SoftwareVersionType.hpp"
16#include "Arp/Services/SoftwareUpdate/Services/StatusCode.hpp"
17#include "Arp/Services/SoftwareUpdate/Services/TransferStatus.hpp"
18#include "Arp/Services/SoftwareUpdate/Services/UpdateBehavior.hpp"
19#include "Arp/Services/SoftwareUpdate/Services/UpdaterCapabilities.hpp"
23namespace Arp::Services::SoftwareUpdate::Services
26using namespace Arp::Base::Rsc::Commons;
42 using Ptr = std::shared_ptr<ISoftwareUpdateService>;
This is the base interface of all Rsc services.
Definition: IRscService.hpp:22
std::shared_ptr< IRscService > Ptr
The shared_ptr type of IRscService.
Definition: IRscService.hpp:25
Specialized implementation of RscString for secure context.
Definition: RscSecureString.hxx:16
Contains a static string with string lentgh up to N characters. The string shall be null terminated.
Definition: RscString.hxx:24
Interface for service proxy factories to create service proxies used by RSC clients.
Definition: IRscServiceProxyFactory.hpp:22
The service of the SoftwareUpdate component which provides the feature to update the software of the ...
Definition: ISoftwareUpdateService.hpp:40
virtual StatusCode GetStatus(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, SoftwareUpdateStatus &status)=0
Returns the update status of the component.
virtual StatusCode SetConfirmationTimeout(int64 timeout)=0
Sets the timeout for the confirmation feature. The timeout must be set by a client to a value greater...
virtual StatusCode Abort(const RscString< 64 > &updaterName, const RscString< 512 > &componentId)=0
Aborts the preparation or resuming process which results in the transition to the Idle state.
virtual StatusCode Confirm()=0
Confirms that the device can keep the update and must not revert to the previous version.
virtual StatusCode SetUpdateKey(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, const RscSecureString< 512 > &updateKey)=0
Sets a key / password that should be used for the firmware update.
virtual StatusCode ResumePrepare(const RscString< 64 > &updaterName, const RscString< 512 > &componentId)=0
Resumes from the PreparedForUpdate state.
virtual StatusCode GetUpdaterCapabilities(const RscString< 64 > &updaterName, UpdaterCapabilities &capabilities)=0
Returns information about the capabilities and behavior of the specified updater.
virtual StatusCode SetInstallationDelay(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, int64 installationDelay)=0
Sets the installation delay for the installation of a software package.
virtual StatusCode ForcePrepare(const RscString< 64 > &updaterName, const RscString< 512 > &componentId)=0
Forces the transition from Preparing to the PreparedForUpdate state. This might be necessary if the c...
virtual StatusCode InstallSoftwarePackage(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, const RscString< 512 > &manufacturerUri, const RscString< 512 > &softwareRevision, const std::vector< RscString< 512 > > &patchIdentifiers, boolean autoResumePrepareForUpdate)=0
Starts the installation.
virtual StatusCode Prepare(const RscString< 64 > &updaterName, const RscString< 512 > &componentId)=0
Prepares the PLCnext device for updates.
virtual StatusCode GetInstallationDelay(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, int64 &installationDelay)=0
Returns the installation delay.
virtual StatusCode ResumeInstall(const RscString< 64 > &updaterName, const RscString< 512 > &componentId)=0
If the installation is in the Error state, the resume method will set the installation state machine ...
ISoftwareUpdateService(void)=default
Constructs an ISoftwareUpdateService instance.
virtual StatusCode GetSoftwarePackage(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, SoftwareVersionFileType fileType, const RscString< 512 > &fileName, boolean async, RscString< 512 > &errorMessage)=0
The updater creates a software package for the specified version type and saves the file at the speci...
virtual StatusCode GetUpdateBehavior(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, const RscString< 512 > &manufacturerUri, const RscString< 512 > &softwareRevision, const std::vector< RscString< 512 > > &patchIdentifiers, UpdateBehavior &updateBehavior)=0
Returns the update behavior of either the Pending or Fallback SoftwareVersionType.
virtual std::vector< RscString< 64 > > GetUpdaterList()=0
Returns a list of all updaters that are available on the system.
virtual StatusCode GetSoftwareVersion(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, SoftwareVersionFileType fileType, SoftwareVersionType &version)=0
Returns information about the software version for a specific file type (fallback,...
virtual StatusCode GetTransferStatus(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, TransferStatus &status)=0
Returns the status of the last or ongoing transfer operation.
virtual StatusCode SetSoftwarePackage(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, SoftwareVersionFileType fileType, const RscString< 512 > &fileName, boolean async, RscString< 512 > &errorMessage)=0
Passes a software package to the updater and performs validation. The validation can take a certain a...
virtual int64 GetConfirmationTimeout()=0
Returns the timeout for the confirmation feature. Represents the maximum time that the client may nee...
virtual StatusCode Clear(const RscString< 64 > &updaterName, const RscString< 512 > &componentId, SoftwareVersionFileType fileType)=0
Clears the software version type. / Removes the software package.
The UpdateStatus may be used together with the PrepareForUpdateStateMachineType, the InstallationStat...
Definition: SoftwareUpdateStatus.hpp:31
Detailed description of a particular software version (current, pending or fallback)....
Definition: SoftwareVersionType.hpp:29
Contains info about a transfer operation.
Definition: TransferStatus.hpp:28
std::int64_t int64
The Arp integer type of 8 byte size.
Definition: PrimitiveTypes.hpp:39