PLCnext API Documentation 25.0.2.69
|
This class shall be used for fieldbus threads. More...
#include <IoThread.hpp>
Public Types | |
using | ThreadLoopBodyDelegate = delegate< void(void)> |
Public Member Functions | |
IoThread (const IoThread &arg)=delete | |
IoThread (IoThread &&arg) noexcept | |
The default move constructor. | |
IoThread & | operator= (const IoThread &arg)=delete |
IoThread & | operator= (IoThread &&arg) noexcept |
The default move-assignment operator. | |
~IoThread (void) | |
The default destructor. | |
IoThread (const String &name, size_t priority, Duration cycleTime, size_t cpuAffinityMask, ThreadLoopBodyDelegate threadLoopBodyDelegate) | |
Constructs a IoThread instance. More... | |
const String & | GetName (void) const |
Gets the name of this thread. More... | |
size_t | GetPriority (void) const |
Gets the priority of this thread. More... | |
Duration | GetCycleTime (void) const |
Gets the cycle time of this thread in milliseconds. More... | |
size_t | GetCpuAffinityMask (void) const |
Gets the CPU affinity mask of this thread. More... | |
void | Start (void) |
This operation starts this thread. | |
void | Join (bool interrupt=true) |
This operation joins this thread. | |
void | Abort (void) |
This operation aborts this thread. | |
Impl & | GetImpl (void) |
For internal use only. | |
const Impl & | GetImpl (void) const |
This class shall be used for fieldbus threads.
This class uses internal the class Thread. For further details on parameters see that class.
Additional to the standard Thread this class puts an internal configured offset to the wake up time of the cycle time, so that it will not wake up at the exactly same time point with the Esm tasks und will reduce displacements. Therefore this thread class should be used for cyclic high priority real time threads used in Io components.
Arp::Io::Commons::IoThread::IoThread | ( | const String & | name, |
size_t | priority, | ||
Duration | cycleTime, | ||
size_t | cpuAffinityMask, | ||
ThreadLoopBodyDelegate | threadLoopBodyDelegate | ||
) |
Constructs a IoThread instance.
name | The name of this thread. |
priority | The priority of this thread in range [0..98] . |
cycleTime | The cycle time of this thread. |
cpuAffinityMask | The CPU affinity mask of this thread as bitmask. |
threadLoopBodyDelegate | The thread loop body to execute in every cycle. |
size_t Arp::Io::Commons::IoThread::GetCpuAffinityMask | ( | void | ) | const |
Gets the CPU affinity mask of this thread.
Duration Arp::Io::Commons::IoThread::GetCycleTime | ( | void | ) | const |
Gets the cycle time of this thread in milliseconds.
const String & Arp::Io::Commons::IoThread::GetName | ( | void | ) | const |
Gets the name of this thread.
size_t Arp::Io::Commons::IoThread::GetPriority | ( | void | ) | const |
Gets the priority of this thread.