8#include "Arp/System/Core/event.hxx"
9#include "Arp/System/Commons/Logging.h"
12namespace Arp {
namespace System {
namespace Ve
17namespace Arp {
namespace System {
namespace Commons {
namespace Chrono
20using namespace Arp::System::Ve;
71 Timer(
size_t interval,
const String& name,
size_t priority,
size_t cpuAffinity = 0);
145 static void TimerServiceCallback(
void* pThis);
152 ITimerService* pTimerService;
153 bool isRunning =
false;
161 return this->isRunning;
High resolution timer for interval based executions.
Definition: Timer.hpp:54
size_t GetInterval(void) const
Returns the interval value in microseconds.
void SetPriority(size_t value)
Sets a new scheduling priority for the timer.
size_t GetCpuAffinity(void) const
Returns the current used CPU affinity mask.
void SetInterval(size_t interval)
Changes the interval in which the assigned methods are called.
void Start(void)
Starts the execution of the timer.
void Stop(void)
Stops the execution of the timer.
void SetCpuAffinity(size_t affinity)
Pins the timer to a specific CPUs inside a multiprocessor system.
NotifyEvent Notify
List of class methods and classes that are called periodically whenever the predefined interval is ex...
Definition: Timer.hpp:79
Timer(size_t interval, const String &name, size_t priority, size_t cpuAffinity=0)
Constructs an Timer instance.
~Timer(void)
Destructs this instance and frees all resources.
event< void > NotifyEvent
Definition of list of delegates to be called when timer expires.
Definition: Timer.hpp:58
const String & GetName(void) const
Returns the current name of the timer.
size_t GetPriority(void) const
Returns the current scheduling priority of the timer.
bool IsRunning(void) const
Checks if the timer is running, i.e. Start was already invoked.
Definition: Timer.hpp:159
void SetName(const String &value)
Sets a new name for the timer.
Definition: Loggable.hxx:20
Use this class to register and invoke several delegates (function pointer in OOP design).
Definition: event.hxx:193
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API