PLCnext API Documentation  22.9.0.33
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. More...
 
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. More...
 
virtual ~IProgram (void)=default
 Destructs this instance and frees all resouces. More...
 

Additional Inherited Members

- Public Types inherited from Arp::Plc::Commons::Esm::IProgram
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 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. More...
 
event< void > Executed
 The Executed event is executed after this program is executed by the Execute operation. More...
 

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 programName)
inline

Constructs an ProgramBase instance.

Parameters
programNameThe full name of the program instance.

◆ ~ProgramBase()

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

Destructs this instance and frees all resouces.

Member Function Documentation

◆ AbortRequest()

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

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
inlineoverridevirtual

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
inlineoverridevirtual

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
inlineoverridevirtual

Determines if this program is requested to abort.

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

◆ SetInitialValues()

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

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 taskNameArg)
inlineoverridevirtual

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 file: