PLCnext API Documentation 25.0.2.69
Public Types | Public Member Functions | Protected Member Functions | List of all members
Arp::Base::Acf::Commons::IControllerComponent Class Referenceabstract

The Acf will use this interface to start and stop components during system startup and shutdown, respectively. More...

#include <IControllerComponent.hpp>

Public Types

using Ptr = std::shared_ptr< IControllerComponent >
 The pointer type of this interface.
 

Public Member Functions

virtual void Start (void)=0
 Starts this component, that is, the component starts its own threads. More...
 
virtual void Stop (void)=0
 Stops this component, i.e. the component stops its own threads.
 

Protected Member Functions

 IControllerComponent (void)=default
 The default constructor.
 
 IControllerComponent (IControllerComponent &&arg) noexcept=default
 The move constructor. More...
 
 IControllerComponent (const IControllerComponent &arg)=delete
 The copy constructor is deleted. More...
 
IControllerComponentoperator= (IControllerComponent &&arg) noexcept=default
 The move assignment operator. More...
 
IControllerComponentoperator= (const IControllerComponent &arg)=delete
 The copy assignment operator is deleted. More...
 
virtual ~IControllerComponent (void)=default
 The virtual default destructor.
 

Detailed Description

The Acf will use this interface to start and stop components during system startup and shutdown, respectively.

This is a quite important interface of the Arp platform. This is an extension to the basic IComponent interface and shall be implemented by components providing its own threads.

Asynchronous programming might be extremely difficult and error prone. This interface supports the component developer to get rid of the most multi-threading issues. There is a clear and strict asynchronous design and pattern in the Arp platform. During the startup phase, there is no asynchronism. This comes up not until calling the IControllerComponent::Start() operation and ends when calling the IControllerComponent::Stop() operation

Constructor & Destructor Documentation

◆ IControllerComponent() [1/2]

Arp::Base::Acf::Commons::IControllerComponent::IControllerComponent ( IControllerComponent &&  arg)
protecteddefaultnoexcept

The move constructor.

Parameters
argThe argument to move.

◆ IControllerComponent() [2/2]

Arp::Base::Acf::Commons::IControllerComponent::IControllerComponent ( const IControllerComponent arg)
protecteddelete

The copy constructor is deleted.

Parameters
argThe argument to copy.

Member Function Documentation

◆ operator=() [1/2]

IControllerComponent & Arp::Base::Acf::Commons::IControllerComponent::operator= ( const IControllerComponent arg)
protecteddelete

The copy assignment operator is deleted.

Parameters
argThe argument to copy.
Returns
This instance.

◆ operator=() [2/2]

IControllerComponent & Arp::Base::Acf::Commons::IControllerComponent::operator= ( IControllerComponent &&  arg)
protecteddefaultnoexcept

The move assignment operator.

Parameters
argThe argument to move.
Returns
This instance.

◆ Start()

virtual void Arp::Base::Acf::Commons::IControllerComponent::Start ( void  )
pure virtual

Starts this component, that is, the component starts its own threads.

It is recommended to use the Arp::System::Commons::Threading::WorkerThread class for own threads.


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