PLCnext API Documentation 25.0.2.69
IPlcComponent.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
8#include "Arp/Plc/Domain/Commons/PlcStartKind.hpp"
9#include "Arp/Plc/Domain/Commons/DcgResultInfo.hpp"
10#include <memory>
11
13{
14
28class ARP_EXPORT IPlcComponent
29{
30public: // using
31 using Ptr = std::shared_ptr<IPlcComponent>;
32
33protected: // construction/destruction
35 IPlcComponent(void) = default;
37 IPlcComponent(const IPlcComponent& arg) = default;
39 IPlcComponent(IPlcComponent&& arg) = default;
41 IPlcComponent& operator=(const IPlcComponent& arg) = default;
45 virtual ~IPlcComponent(void) = default;
46
47public: // abstract operations
67 virtual DcgResultInfo LoadPlc(bool isChanging) = 0;
68
89 virtual DcgResultInfo SetupPlc(bool isChanging, PlcStartKind startKind) = 0;
90
96 virtual void StartPlc(PlcStartKind startKind) = 0;
97
99 virtual void StopPlc(void) = 0;
100
108 virtual void ResetPlc(bool isChanging, bool onError) = 0;
109
117 virtual void UnloadPlc(bool isChanging, bool onError) = 0;
118};
119
120} // end of namespace Arp::Plc::Commons::Domain
This class is used to return the result of a PLC operation concerning download-changes (Dcg).
Definition: DcgResultInfo.hpp:21
This is the most important interface of the PLC domain. It is used to load and unload the PLC project...
Definition: IPlcComponent.hpp:29
IPlcComponent(void)=default
Constructs an IPlcComponent instance.
virtual void ResetPlc(bool isChanging, bool onError)=0
Resets the PLC project configuration of this component.
virtual DcgResultInfo LoadPlc(bool isChanging)=0
Loads the PLC project configuration of this component.
IPlcComponent(IPlcComponent &&arg)=default
The move-constructor.
virtual void StartPlc(PlcStartKind startKind)=0
Starts this PLC component using the specified start kind.
virtual void StopPlc(void)=0
Stops this PLC component.
IPlcComponent(const IPlcComponent &arg)=default
The deleted copy-constructor.
IPlcComponent & operator=(IPlcComponent &&arg)=default
The move-assignment operator.
virtual DcgResultInfo SetupPlc(bool isChanging, PlcStartKind startKind)=0
Sets up the PLC project configuration of this component.
virtual ~IPlcComponent(void)=default
The destructor.
virtual void UnloadPlc(bool isChanging, bool onError)=0
Unloads the PLC project configuration of this component.
IPlcComponent & operator=(const IPlcComponent &arg)=default
The deleted copy-assignment operator.
Namespace for interface types of the PLC domain
PlcStartKind
Determines which kind of start operation is initiated using PlcManager::StartPlc(PlcStartKind startKi...
Definition: PlcStartKind.hpp:18