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

This is the most important interface of the PLC domain. It is used to load and unload the PLC project of any component implementing this interface. Furthermore it provides the operations to start and stop any component, if it is required, otherwise the operations are left empty. More...

#include <IPlcComponent.hpp>

Inheritance diagram for Arp::Plc::Domain::Commons::IPlcComponent:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< IPlcComponent >
 

Public Member Functions

virtual DcgResultInfo LoadPlc (bool isChanging)=0
 Loads the PLC project configuration of this component. More...
 
virtual DcgResultInfo SetupPlc (bool isChanging, PlcStartKind startKind)=0
 Sets up the PLC project configuration of this component. More...
 
virtual void StartPlc (PlcStartKind startKind)=0
 Starts this PLC component using the specified start kind. More...
 
virtual void StopPlc (void)=0
 Stops this PLC component. More...
 
virtual void ResetPlc (bool isChanging, bool onError)=0
 Resets the PLC project configuration of this component. More...
 
virtual void UnloadPlc (bool isChanging, bool onError)=0
 Unloads the PLC project configuration of this component. More...
 

Protected Member Functions

 IPlcComponent (void)=default
 Constructs an IPlcComponent instance.
 
 IPlcComponent (const IPlcComponent &arg)=default
 The deleted copy-constructor.
 
 IPlcComponent (IPlcComponent &&arg)=default
 The move-constructor.
 
IPlcComponentoperator= (const IPlcComponent &arg)=default
 The deleted copy-assignment operator.
 
IPlcComponentoperator= (IPlcComponent &&arg)=default
 The move-assignment operator.
 
virtual ~IPlcComponent (void)=default
 The destructor.
 

Detailed Description

This is the most important interface of the PLC domain. It is used to load and unload the PLC project of any component implementing this interface. Furthermore it provides the operations to start and stop any component, if it is required, otherwise the operations are left empty.

The normal sequence of the PLC operations e.g. during startup and shutdown of a conroller is LoadPlc() -> SetupPlc() -> StartPlc() -> StopPlc() -> ResetPlc() -> UnloadPLc().

If the PLC was stopped and is in state Stop|Hot or Stop|Warm a PLC cold start would cause the following sequence: ResetPlc() -> SetupPlc() -> StartPlc().

Member Function Documentation

◆ LoadPlc()

virtual DcgResultInfo Arp::Plc::Domain::Commons::IPlcComponent::LoadPlc ( bool  isChanging)
pure virtual

Loads the PLC project configuration of this component.

Parameters
isChangingtrue if this operation is called during download-changes, otherwise false.
Returns

Implemented in Arp::Io::Commons::IoComponentBase.

◆ ResetPlc()

virtual void Arp::Plc::Domain::Commons::IPlcComponent::ResetPlc ( bool  isChanging,
bool  onError 
)
pure virtual

Resets the PLC project configuration of this component.

Parameters
isChangingtrue if this operation is called during download-changes, otherwise false.
onErrortrue if this operation is called after an error occurs, otherwise false.

Implemented in Arp::Io::Commons::IoComponentBase.

◆ SetupPlc()

virtual DcgResultInfo Arp::Plc::Domain::Commons::IPlcComponent::SetupPlc ( bool  isChanging,
PlcStartKind  startKind 
)
pure virtual

Sets up the PLC project configuration of this component.

Parameters
isChangingtrue if this operation is called during download-changes, otherwise false.
startKindThe start kind to process (cold, warm, hot).
Returns

◆ StartPlc()

virtual void Arp::Plc::Domain::Commons::IPlcComponent::StartPlc ( PlcStartKind  startKind)
pure virtual

Starts this PLC component using the specified start kind.

Parameters
startKindThe PLC start kind to process: Cold, Warm, Hothot, RestoreWarm. <see cref"PlcStartKind" /> for more infos.

◆ StopPlc()

virtual void Arp::Plc::Domain::Commons::IPlcComponent::StopPlc ( void  )
pure virtual

Stops this PLC component.

Implemented in Arp::Io::Commons::IoComponentBase.

◆ UnloadPlc()

virtual void Arp::Plc::Domain::Commons::IPlcComponent::UnloadPlc ( bool  isChanging,
bool  onError 
)
pure virtual

Unloads the PLC project configuration of this component.

Parameters
isChangingtrue if this operation is called during download-changes, otherwise false.
onErrortrue if this operation is called after an error occurs, otherwise false.

Implemented in Arp::Io::Commons::IoComponentBase.


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