8 #include "Arp/System/Core/event.hxx"
10 namespace Arp {
namespace Plc {
namespace Commons {
namespace Esm
22 using Ptr = std::shared_ptr<IProgram>;
Interface to implement PLC program to be executed in realtime context.
Definition: IProgram.hpp:19
virtual const String & GetFullName(void) const =0
Returns the program name with full namespace.
virtual ~IProgram(void)=default
Destructs this instance and frees all resouces.
virtual void SetInitialValues(void)=0
Sets all variables of this program to its initial values.
virtual bool IsAbortRequested(void) const =0
Determines if this program is requested to abort.
virtual void SetTaskName(const String &value)=0
Set the task name in which is this program will be executed.
virtual void Execute(void)=0
Executes this program.
IProgram(void)=default
Constructs an IProgram instance.
virtual const String & GetTaskName() const =0
Returns the task name in which is this program will be executed.
delegate< void(void)> EventHandler
The Event handler type is executed by the events Executing and Executed.
Definition: IProgram.hpp:24
event< void > Executed
The Executed event is executed after this program is executed by the Execute operation.
Definition: IProgram.hpp:36
virtual void AbortRequest(void)=0
Requests an abort of program execution.
std::shared_ptr< IProgram > Ptr
Shared pointer type of IProgram.
Definition: IProgram.hpp:22
event< void > Executing
The Executing event is invoked before this program is executed by the Execute operation.
Definition: IProgram.hpp:34
Use this class to register and invoke several delegates (function pointer in OOP design).
Definition: event.hxx:193
Root namespace for the PLCnext API