PLCnext API Documentation
20.6.0.30321
|
This interfaces shall be implemented by any Plc component supporting the download changes feature. More...
#include <IPlcChangeComponent.hpp>
Public Types | |
typedef std::shared_ptr< IPlcChangeComponent > | Ptr |
Public Member Functions | |
virtual bool | ChangeData (void)=0 |
This operation is called during download changes on each Plc component one or more times, to copy the preserved data. More... | |
virtual bool | Changing (bool revert)=0 |
This operation is called during download changes on each Plc component one or more times, to initiate the change process. More... | |
virtual void | Change (bool simulate)=0 |
This operation is called during download changes on each Plc component one time, to process the change. More... | |
virtual void | Changed (void)=0 |
This operation is called during download changes on each Plc component one time, to finish the change process. More... | |
Protected Member Functions | |
IPlcChangeComponent (void)=default | |
Constructs an IPlcChangeComponent instance. More... | |
virtual | ~IPlcChangeComponent (void)=default |
Destructs this instance and frees all resources. More... | |
This interfaces shall be implemented by any Plc component supporting the download changes feature.
This interface is used by the PlcManager to implement the download changes feature and to process the configuration change of all Plc componentes. The change algorithm is as follows:
For all plc components Call LoadPlc(isChanging=true), if result is false => Dcg not possible => Return Call SetupPlc(isChanging=true), if result is false => Dcg not possible => Return
Begin measure time For all plc components Call Change(simulate=true); End measure time, if duration is exceeds threshold, Dcg RealTimeViolation => Return
For several trials For all plc components Call ChangeData(), if result is false => Dcg not possible => Return For all plc components Call Changing(), if result is false => Dcg not currently possible => next trial Check if Plc is still in Idle slot, if not => next trial
If trials exceeds => Dcg RealTimeViolation => Return
For all plc components Call Change() Call Changed()
On error or exception: For all plc components Call ResetPlc(isChagning=true) Call UnloadPlc(isChagning=true) Return Dcg not possible, set PlcState = Error
|
protecteddefault |
Constructs an IPlcChangeComponent instance.
|
protectedvirtualdefault |
Destructs this instance and frees all resources.
|
pure virtual |
This operation is called during download changes on each Plc component one time, to process the change.
This operation is called for each Plc component one time and shall not throw any exception and shall never fail, thus it should be transaction safe.
simulate | Is true if the should only be simulated to measure duration, otherwise false . |
|
pure virtual |
|
pure virtual |
|
pure virtual |
This operation is called during download changes on each Plc component one or more times, to initiate the change process.
This operation is called for each Plc component one or more times in an idle slot to enter the change transaction.
revert | Is true if the operation is called when any component returns false and the entire Changing sequende should be reverted |
false
if revert is false
and the change is not possible, otherwise true