PLCnext API Documentation  22.9.0.33
Public Types | Public Member Functions | Public Attributes | List of all members
Arp::Plc::Commons::Esm::IProgram Class Referenceabstract

Interface to implement PLC program to be executed in realtime context. More...

#include <IProgram.hpp>

Inheritance diagram for Arp::Plc::Commons::Esm::IProgram:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< IProgram >
 Shared pointer type of IProgram. More...
 
using EventHandler = delegate< void(void)>
 The Event handler type is executed by the events Executing and Executed. More...
 

Public Member Functions

 IProgram (void)=default
 Constructs an IProgram instance. More...
 
virtual ~IProgram (void)=default
 Destructs this instance and frees all resouces. More...
 
virtual const StringGetFullName (void) const =0
 Returns the program name with full namespace. More...
 
virtual const StringGetTaskName () const =0
 Returns the task name in which is this program will be executed. More...
 
virtual void SetTaskName (const String &value)=0
 Set the task name in which is this program will be executed. More...
 
virtual void SetInitialValues (void)=0
 Sets all variables of this program to its initial values. More...
 
virtual void Execute (void)=0
 Executes this program. More...
 
virtual void AbortRequest (void)=0
 Requests an abort of program execution. More...
 
virtual bool IsAbortRequested (void) const =0
 Determines if this program is requested to abort. More...
 

Public Attributes

event< void > Executing
 The Executing event is invoked before this program is executed by the Execute operation. More...
 
event< void > Executed
 The Executed event is executed after this program is executed by the Execute operation. More...
 

Detailed Description

Interface to implement PLC program to be executed in realtime context.

Programs implementing this interface might be scheduled and executed by the Esm. Use ProgramBase as base class to implement your own programs.

Member Typedef Documentation

◆ EventHandler

using Arp::Plc::Commons::Esm::IProgram::EventHandler = delegate<void(void)>

The Event handler type is executed by the events Executing and Executed.

◆ Ptr

Shared pointer type of IProgram.

Constructor & Destructor Documentation

◆ IProgram()

Arp::Plc::Commons::Esm::IProgram::IProgram ( void  )
default

Constructs an IProgram instance.

◆ ~IProgram()

virtual Arp::Plc::Commons::Esm::IProgram::~IProgram ( void  )
virtualdefault

Destructs this instance and frees all resouces.

Member Function Documentation

◆ AbortRequest()

virtual void Arp::Plc::Commons::Esm::IProgram::AbortRequest ( void  )
pure virtual

Requests an abort of program execution.

Implemented in Arp::Plc::Commons::Esm::ProgramBase.

◆ Execute()

virtual void Arp::Plc::Commons::Esm::IProgram::Execute ( void  )
pure virtual

Executes this program.

This operation should be overridden in any derived implementation.

Implemented in Arp::Plc::Commons::Esm::ProgramBase.

◆ GetFullName()

virtual const String& Arp::Plc::Commons::Esm::IProgram::GetFullName ( void  ) const
pure virtual

Returns the program name with full namespace.

Returns
The program name with full namespace.

Implemented in Arp::Plc::Commons::Esm::ProgramBase.

◆ GetTaskName()

virtual const String& Arp::Plc::Commons::Esm::IProgram::GetTaskName ( ) const
pure virtual

Returns the task name in which is this program will be executed.

Returns
The task name in which is this program will be executed.

Implemented in Arp::Plc::Commons::Esm::ProgramBase.

◆ IsAbortRequested()

virtual bool Arp::Plc::Commons::Esm::IProgram::IsAbortRequested ( void  ) const
pure virtual

Determines if this program is requested to abort.

Implemented in Arp::Plc::Commons::Esm::ProgramBase.

◆ SetInitialValues()

virtual void Arp::Plc::Commons::Esm::IProgram::SetInitialValues ( void  )
pure virtual

Sets all variables of this program to its initial values.

Implemented in Arp::Plc::Commons::Esm::ProgramBase.

◆ SetTaskName()

virtual void Arp::Plc::Commons::Esm::IProgram::SetTaskName ( const String value)
pure virtual

Set the task name in which is this program will be executed.

Parameters
valueThe task name in which is this program will be executed.

Implemented in Arp::Plc::Commons::Esm::ProgramBase.

Member Data Documentation

◆ Executed

event<void> Arp::Plc::Commons::Esm::IProgram::Executed

The Executed event is executed after this program is executed by the Execute operation.

◆ Executing

event<void> Arp::Plc::Commons::Esm::IProgram::Executing

The Executing event is invoked before this program is executed by the Execute operation.


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