PLCnext API Documentation  20.6.0.30321
Public Types | Public Member Functions | Protected Member Functions | List of all members
Arp::Plc::Commons::Domain::IPlcChangeComponent Class Referenceabstract

This interfaces shall be implemented by any Plc component supporting the download changes feature. More...

#include <IPlcChangeComponent.hpp>

Public Types

typedef std::shared_ptr< IPlcChangeComponentPtr
 

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...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ IPlcChangeComponent()

Arp::Plc::Commons::Domain::IPlcChangeComponent::IPlcChangeComponent ( void  )
protecteddefault

Constructs an IPlcChangeComponent instance.

◆ ~IPlcChangeComponent()

virtual Arp::Plc::Commons::Domain::IPlcChangeComponent::~IPlcChangeComponent ( void  )
protectedvirtualdefault

Destructs this instance and frees all resources.

Member Function Documentation

◆ Change()

virtual void Arp::Plc::Commons::Domain::IPlcChangeComponent::Change ( bool  simulate)
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.

Parameters
simulateIs true if the should only be simulated to measure duration, otherwise false.

◆ Changed()

virtual void Arp::Plc::Commons::Domain::IPlcChangeComponent::Changed ( void  )
pure virtual

This operation is called during download changes on each Plc component one time, to finish the change process.

This operation is called for each Plc component one time to complete the change transaction.

◆ ChangeData()

virtual bool Arp::Plc::Commons::Domain::IPlcChangeComponent::ChangeData ( void  )
pure virtual

This operation is called during download changes on each Plc component one or more times, to copy the preserved data.

This operation is called for each Plc component one or more times in an idle slot to copy the data to be preserved.

Returns
false if the change is not possible, otherwise true

◆ Changing()

virtual bool Arp::Plc::Commons::Domain::IPlcChangeComponent::Changing ( bool  revert)
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.

Parameters
revertIs true if the operation is called when any component returns false and the entire Changing sequende should be reverted
Returns
false if revert is false and the change is not possible, otherwise true

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