PLCnext API Documentation 25.0.2.69
Public Member Functions | List of all members
Arp::Plc::Commons::Esm::ProgramBase Class Referenceabstract

This class implements the base functionality of a program. More...

#include <ProgramBase.hpp>

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

Public Member Functions

 ProgramBase (const String &programName)
 Constructs an ProgramBase instance. More...
 
virtual ~ProgramBase (void)=default
 Destructs this instance and frees all resouces.
 
const StringGetFullName (void) const override
 Returns the program name with full namespace. More...
 
const StringGetTaskName (void) const override
 Returns the task name in which is this program will be executed. More...
 
void SetTaskName (const String &taskNameArg) override
 Set the task name in which is this program will be executed. More...
 
void SetInitialValues (void) override
 Set the initial values of all containing variables of this program. More...
 
void AbortRequest (void) override
 Request a abort of program execution. More...
 
bool IsAbortRequested (void) const override
 Determines if this program is requested to abort. More...
 
virtual void Execute (void)=0
 Executes this program. More...
 
- Public Member Functions inherited from Arp::Plc::Commons::Esm::IProgram
 IProgram (void)=default
 Constructs an IProgram instance.
 
virtual ~IProgram (void)=default
 Destructs this instance and frees all resouces.
 
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...
 

Additional Inherited Members

- Public Types inherited from Arp::Plc::Commons::Esm::IProgram
using Ptr = std::shared_ptr< IProgram >
 Shared pointer type of IProgram.
 
using EventHandler = delegate< void(void)>
 The Event handler type is executed by the events Executing and Executed.
 
- Public Attributes inherited from Arp::Plc::Commons::Esm::IProgram
event< void > Executing
 The Executing event is invoked before this program is executed by the Execute operation.
 
event< void > Executed
 The Executed event is executed after this program is executed by the Execute operation.
 

Detailed Description

This class implements the base functionality of a program.

Any (custom or not) program implementation should derive from this class.

Constructor & Destructor Documentation

◆ ProgramBase()

Arp::Plc::Commons::Esm::ProgramBase::ProgramBase ( const String programNameArg)

Constructs an ProgramBase instance.

Parameters
programNameThe full name of the program instance.

Member Function Documentation

◆ AbortRequest()

void Arp::Plc::Commons::Esm::ProgramBase::AbortRequest ( void  )
overridevirtual

Request a abort of program execution.

Implements Arp::Plc::Commons::Esm::IProgram.

◆ Execute()

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

Executes this program.

This operation should be overridden in any derived implementation.

Implements Arp::Plc::Commons::Esm::IProgram.

◆ GetFullName()

const String & Arp::Plc::Commons::Esm::ProgramBase::GetFullName ( void  ) const
overridevirtual

Returns the program name with full namespace.

Returns
The program name with full namespace.

Implements Arp::Plc::Commons::Esm::IProgram.

◆ GetTaskName()

const String & Arp::Plc::Commons::Esm::ProgramBase::GetTaskName ( void  ) const
overridevirtual

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

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

Implements Arp::Plc::Commons::Esm::IProgram.

◆ IsAbortRequested()

bool Arp::Plc::Commons::Esm::ProgramBase::IsAbortRequested ( void  ) const
overridevirtual

Determines if this program is requested to abort.

Implements Arp::Plc::Commons::Esm::IProgram.

◆ SetInitialValues()

void Arp::Plc::Commons::Esm::ProgramBase::SetInitialValues ( void  )
overridevirtual

Set the initial values of all containing variables of this program.

Implements Arp::Plc::Commons::Esm::IProgram.

◆ SetTaskName()

void Arp::Plc::Commons::Esm::ProgramBase::SetTaskName ( const String value)
overridevirtual

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

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

Implements Arp::Plc::Commons::Esm::IProgram.


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