PLCnext API Documentation
22.9.0.33
|
Interface to implement PLC program to be executed in realtime context. More...
#include <IProgram.hpp>
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 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... | |
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... | |
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.
using Arp::Plc::Commons::Esm::IProgram::EventHandler = delegate<void(void)> |
The Event handler type is executed by the events Executing and Executed.
using Arp::Plc::Commons::Esm::IProgram::Ptr = std::shared_ptr<IProgram> |
Shared pointer type of IProgram.
|
default |
Constructs an IProgram instance.
|
virtualdefault |
Destructs this instance and frees all resouces.
|
pure virtual |
Requests an abort of program execution.
Implemented in Arp::Plc::Commons::Esm::ProgramBase.
|
pure virtual |
Executes this program.
This operation should be overridden in any derived implementation.
Implemented in Arp::Plc::Commons::Esm::ProgramBase.
|
pure virtual |
Returns the program name with full namespace.
Implemented in Arp::Plc::Commons::Esm::ProgramBase.
|
pure virtual |
Returns the task name in which is this program will be executed.
Implemented in Arp::Plc::Commons::Esm::ProgramBase.
|
pure virtual |
Determines if this program is requested to abort.
Implemented in Arp::Plc::Commons::Esm::ProgramBase.
|
pure virtual |
Sets all variables of this program to its initial values.
Implemented in Arp::Plc::Commons::Esm::ProgramBase.
|
pure virtual |
Set the task name in which is this program will be executed.
value | The task name in which is this program will be executed. |
Implemented in Arp::Plc::Commons::Esm::ProgramBase.
event<void> Arp::Plc::Commons::Esm::IProgram::Executed |
The Executed event is executed after this program is executed by the Execute operation.
event<void> Arp::Plc::Commons::Esm::IProgram::Executing |
The Executing event is invoked before this program is executed by the Execute operation.