PLCnext API Documentation 26.0.1.58
ISoftwareUpdateService.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Base/Rsc/Commons/Rsc.hpp"
9#include "Arp/Base/Rsc/Commons/IRscService.hpp"
10#include <vector>
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"
20
21// DO NOT MODIFY THIS FILE, THIS FILE IS AUTOGENERATED BY ISoftwareUpdateService.cs
22
23namespace Arp::Services::SoftwareUpdate::Services
24{
25
26using namespace Arp::Base::Rsc::Commons;
27
39class ARP_EXPORT ISoftwareUpdateService : public IRscService
40{
41public: // usings
42 using Ptr = std::shared_ptr<ISoftwareUpdateService>;
43
44public: // construction/destruction
46 ISoftwareUpdateService(void) = default;
47
48public: // static policy operation
49 static IRscServiceProxyFactory& GetProxyFactory(void);
50
51public: // abstract operations
56 virtual std::vector<RscString<64>> GetUpdaterList() = 0;
57
64 virtual StatusCode GetUpdaterCapabilities(const RscString<64>& updaterName, UpdaterCapabilities& capabilities) = 0;
65
76 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;
77
85 virtual StatusCode GetStatus(const RscString<64>& updaterName, const RscString<512>& componentId, SoftwareUpdateStatus& status) = 0;
86
95 virtual StatusCode GetSoftwareVersion(const RscString<64>& updaterName, const RscString<512>& componentId, SoftwareVersionFileType fileType, SoftwareVersionType& version) = 0;
96
113 virtual StatusCode SetSoftwarePackage(const RscString<64>& updaterName, const RscString<512>& componentId, SoftwareVersionFileType fileType, const RscString<512>& fileName, boolean async, RscString<512>& errorMessage) = 0;
114
126 virtual StatusCode GetSoftwarePackage(const RscString<64>& updaterName, const RscString<512>& componentId, SoftwareVersionFileType fileType, const RscString<512>& fileName, boolean async, RscString<512>& errorMessage) = 0;
127
135 virtual StatusCode GetTransferStatus(const RscString<64>& updaterName, const RscString<512>& componentId, TransferStatus& status) = 0;
136
143 virtual StatusCode Prepare(const RscString<64>& updaterName, const RscString<512>& componentId) = 0;
144
152 virtual StatusCode ForcePrepare(const RscString<64>& updaterName, const RscString<512>& componentId) = 0;
153
160 virtual StatusCode Abort(const RscString<64>& updaterName, const RscString<512>& componentId) = 0;
161
168 virtual StatusCode ResumePrepare(const RscString<64>& updaterName, const RscString<512>& componentId) = 0;
169
177 virtual StatusCode SetUpdateKey(const RscString<64>& updaterName, const RscString<512>& componentId, const RscSecureString<512>& updateKey) = 0;
178
187 virtual StatusCode SetInstallationDelay(const RscString<64>& updaterName, const RscString<512>& componentId, int64 installationDelay) = 0;
188
196 virtual StatusCode GetInstallationDelay(const RscString<64>& updaterName, const RscString<512>& componentId, int64& installationDelay) = 0;
197
208 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;
209
216 virtual StatusCode ResumeInstall(const RscString<64>& updaterName, const RscString<512>& componentId) = 0;
217
224
231 virtual StatusCode SetConfirmationTimeout(int64 timeout) = 0;
232
237 virtual StatusCode Confirm() = 0;
238
246 virtual StatusCode Clear(const RscString<64>& updaterName, const RscString<512>& componentId, SoftwareVersionFileType fileType) = 0;
247};
248
249} // end of namespace Arp::Services::SoftwareUpdate::Services
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