PLCnext API Documentation 25.0.2.69
|
This class implements the base functionality of a program. More...
#include <ProgramBase.hpp>
Public Member Functions | |
ProgramBase (const String &programName) | |
Constructs an ProgramBase instance. More... | |
virtual | ~ProgramBase (void)=default |
Destructs this instance and frees all resouces. | |
const String & | GetFullName (void) const override |
Returns the program name with full namespace. More... | |
const String & | GetTaskName (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... | |
![]() | |
IProgram (void)=default | |
Constructs an IProgram instance. | |
virtual | ~IProgram (void)=default |
Destructs this instance and frees all resouces. | |
virtual const String & | GetFullName (void) const =0 |
Returns the program name with full namespace. More... | |
virtual const String & | GetTaskName () 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 | |
![]() | |
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. | |
![]() | |
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. | |
This class implements the base functionality of a program.
Any (custom or not) program implementation should derive from this class.
Arp::Plc::Commons::Esm::ProgramBase::ProgramBase | ( | const String & | programNameArg | ) |
Constructs an ProgramBase instance.
programName | The full name of the program instance. |
|
overridevirtual |
Request a abort of program execution.
Implements Arp::Plc::Commons::Esm::IProgram.
|
pure virtual |
Executes this program.
This operation should be overridden in any derived implementation.
Implements Arp::Plc::Commons::Esm::IProgram.
|
overridevirtual |
Returns the program name with full namespace.
Implements Arp::Plc::Commons::Esm::IProgram.
|
overridevirtual |
Returns the task name in which is this program will be executed.
Implements Arp::Plc::Commons::Esm::IProgram.
|
overridevirtual |
Determines if this program is requested to abort.
Implements Arp::Plc::Commons::Esm::IProgram.
|
overridevirtual |
Set the initial values of all containing variables of this program.
Implements Arp::Plc::Commons::Esm::IProgram.
|
overridevirtual |
Set the task name in which is this program will be executed.
taskNameArg | The task name in which is this program will be executed. |
Implements Arp::Plc::Commons::Esm::IProgram.