APIs, concepts, guides, and more
rttask.h
1#pragma once
2
3#ifndef RTTASK_H
4#define RTTASK_H
5
6#include <atomic> // for std::atomic
7#include <cstdint> // for int32_t, int64_t
8#include <cstddef> // for size_t
9#include <cstdio> // for std::snprintf
10#include <cstring> // for std::memset
11#include <limits> // for std::numeric_limits
12#include <stdexcept> // for std::invalid_argument
13
14#if defined(WIN32)
15#undef max
16#endif // defined(WIN32)
17
18#if !defined(RSI_INTERNAL)
19#include "rsi.h"
20#endif // defined(RSI_INTERNAL)
21
22#define RSI_GLOBAL(type, name) \
23 static_assert(sizeof(std::atomic<type>) == sizeof(type), "Expected size of "#type" to be equal to std::atomic<"#type">."); \
24 alignas(uint64_t) std::atomic<type> name
25
26#define REGISTER_GLOBAL(name) \
27 { #name, offsetof(GlobalData, name), sizeof(GlobalData::name), RSIDataTypeGet<decltype(GlobalData::name.load())>::type }
28
29namespace RSI
30{
31namespace RapidCode
32{
33namespace RealTimeTasks
34{
35 // Forward declaration of User's custom-defined structure of global data.
36 struct GlobalData;
37
38 class RTTaskImplementation;
39 class RTTaskManagerImplementation;
40
45
47 inline constexpr int32_t RTTaskManagerCountMaximum = 8;
49 inline constexpr int32_t RTTaskCountMaximum = 64;
51 inline constexpr char RTTaskManagerExecutableName[] = "rttaskmanager";
53
56
61 enum class RTTaskState : int32_t
62 {
63 Dead = 0,
64 Disabled = 1,
65 Waiting = 2,
66 Running = 3,
67 };
68
73 enum class RTTaskManagerState : int32_t
74 {
75 Dead = 0,
76 Running = 1,
77 Stopped = 2,
78 };
79
84 enum class PlatformType : int32_t
85 {
86 Native = 0,
87 INtime = 1,
88 Linux = 2,
89 Windows = 3,
90 };
91
99 enum class TaskPriority : int32_t
100 {
101 NonRealTime = 0,
102 Lowest,
103 Low,
104 MediumLow,
105 Medium,
106 MediumHigh,
107 High,
108 Highest
109 };
110
112
115
116 // Function pointer type for real-time task functions.
117 using TaskFunction = int32_t(*)(GlobalData*, char*, const uint32_t);
118
124 {
126 static constexpr int32_t DirectoryLengthMaximum = 256;
127
129 static constexpr int32_t NameLengthMaximum = 64;
130
132 static constexpr const char* const LibraryNameDefault = "RTTaskFunctions";
133
136
138 static constexpr int32_t RepeatForever = -1;
139
141 static constexpr int32_t RepeatNone = 0;
142
144 static constexpr int32_t PeriodDefault = 1;
145
147 static constexpr int32_t PhaseDefault = 0;
148
150 static constexpr bool EnableTimingDefault = false;
151
154
156 char LibraryName[NameLengthMaximum] = "RTTaskFunctions";
157
160
163
166
169
172
177
181
182 // Default constructor.
183 RTTaskCreationParameters() = default;
184
192 RTTaskCreationParameters(const char* const argFunctionName, const char* const argLibraryName = nullptr, const char* const argLibraryDirectory = nullptr)
198 {
199 if (argFunctionName == nullptr)
200 {
201 throw std::invalid_argument("Task function name must not be null.");
202 }
203 std::snprintf(FunctionName, NameLengthMaximum, "%s", argFunctionName);
204
205 if (argLibraryName != nullptr)
206 {
207 std::snprintf(LibraryName, NameLengthMaximum, "%s", argLibraryName);
208 }
209 else
210 {
211 std::snprintf(LibraryName, NameLengthMaximum, "%s", LibraryNameDefault);
212 }
213
214 if (argLibraryDirectory != nullptr)
215 {
216 std::snprintf(LibraryDirectory, DirectoryLengthMaximum, "%s", argLibraryDirectory);
217 }
218 else
219 {
221 }
222 }
223 };
224
232
237 {
240
243
246
248 uint64_t ExecutionTimeMin = std::numeric_limits<uint64_t>::max();
249
252
255
258
261
264
266 RTTaskStatus() = default;
267
269 static constexpr int64_t InvalidExecutionCount = -1;
270
272 static constexpr uint64_t InvalidExecutionTime = 0;
273
274 static constexpr uint64_t ErrorMessageSizeMaximum = 512;
275 char ErrorMessage[ErrorMessageSizeMaximum] = {};
276 };
277
282 {
285
288
290 int64_t CycleCount;
291
293 uint64_t CycleTimeMax;
294
296 uint64_t CycleTimeMin;
297
300
303
305 uint64_t StartTimeDeltaLast = 0;
306
308 uint64_t StartTimeDeltaMax = 0;
309
312 };
313
318 {
320 static constexpr int32_t DirectoryLengthMaximum = 256;
321
323 static constexpr int32_t NameLengthMaximum = 64;
324
327
330
333
335 int32_t CpuCore = -1;
336
339
341 bool NoRmp = false;
342 };
343
355
356 typedef int32_t (*GlobalMemberOffsetGetter)(const char* const name);
357 typedef int32_t (*GlobalNamesGetter)(const char* names[], int32_t capacity);
358 typedef int32_t (*GlobalMemberTypeGetter)(const char* const name);
359
360 inline constexpr int32_t GlobalMaxSize = 2048;
361
362#if !defined(RSI_INTERNAL)
363#if !defined(__INTIME__)
364
365 class RSI_API RapidCodeBehavior : public virtual RapidCodeObject
366 {
367 public:
368 const char* const VersionGet() override;
369 int32_t MpiVersionMajor() override;
370 int32_t MpiVersionMinor() override;
371 int32_t MpiVersionRelease() override;
372 int32_t RSIVersionMajor() override;
373 int32_t RSIVersionMinor() override;
374 int32_t RSIVersionMicro() override;
375 int32_t RSIVersionPatch() override;
376 int32_t NumberGet() override;
377 int32_t ErrorLogCountGet() override;
378 const RsiError* const ErrorLogGet() override;
379 void ErrorLogClear() override;
380 void ThrowExceptions(bool state) override;
381 const char* const RsiErrorMessageGet(RSIErrorMessage msg) override;
382 const char* const ErrorMessageGet(RSIErrorMessage msg) override;
383 bool WarningMsgCheck(RSIErrorMessage msg) override;
384 void Trace(bool state) override;
385 void TraceMaskOnSet(RSITrace maskOn) override;
386 bool TraceMaskOnGet(RSITrace maskOn) override;
387 void TraceMaskOffSet(RSITrace maskOff) override;
388 void TraceMaskClear() override;
389 void TraceFileSet(const char* const fileName) override;
390 void TraceFileClose() override;
391 void TraceInjectMessage(RSITrace traceLevel, const char* const message) override;
392
393 virtual ~RapidCodeBehavior();
394 RapidCodeBehavior(const RapidCodeBehavior&);
395 RapidCodeBehavior& operator=(const RapidCodeBehavior&);
396 RapidCodeBehavior(RapidCodeBehavior&&);
397 RapidCodeBehavior& operator=(RapidCodeBehavior&&);
398
399 class Implementation;
400 protected:
401 Implementation* rapidCodeBehavior = nullptr;
402 RapidCodeBehavior(Implementation*);
403 };
404
405
413 class RSI_API RTTask : public virtual RapidCodeBehavior
414 {
415 public:
420
426 void Stop();
427
437
442
448
459 int64_t ExecutionCountAbsoluteWait(int64_t count = ExecutionCountDefault, int32_t timeoutMs = ExecutionCountWaitTimeoutMillisecondsDefault);
460
471 int64_t ExecutionCountRelativeWait(int64_t count = ExecutionCountDefault, int32_t timeoutMs = ExecutionCountWaitTimeoutMillisecondsDefault);
473
478
483 int32_t IdGet();
484
491
496
498 static constexpr int64_t ExecutionCountWaitFailure = -1;
500 static constexpr int64_t ExecutionCountDefault = 1;
502 static constexpr int32_t ExecutionCountWaitTimeoutMillisecondsDefault = 250;
504
505 ~RTTask();
506 RTTask(const RTTask&);
507 RTTask& operator=(const RTTask&);
508 RTTask(RTTask&&);
509 RTTask& operator=(RTTask&&);
510
511 protected:
512 RTTaskImplementation* pImpl = nullptr;
513 RTTask(RTTaskImplementation*, RapidCodeBehavior::Implementation*);
514 friend class RTTaskBuilder;
515 }; // end class RTTask
516
523 class RSI_API RTTaskManager : public virtual RapidCodeBehavior
524 {
525 public:
530
536 static RapidVector<RTTaskManager> Discover();
537
544 static RTTaskManager Get(const int32_t managerId);
545
554
559
567 virtual RapidVector<const char*> GlobalNamesGet(const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
568
574
581 virtual RSI::RapidCode::FirmwareValue GlobalValueGet(const char* const name, const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
582
590 virtual void GlobalValueSet(const RSI::RapidCode::FirmwareValue& value, const char* const name, const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
591
598 virtual RSI::RapidCode::RSIDataType GlobalTypeGet(const char* const name, const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
599
601
606
613 virtual RTTask TaskSubmit(const RTTaskCreationParameters& parameters);
614
623 virtual RTTask TaskSubmit(const char* const functionName, const char* const libraryName = RTTaskCreationParameters::LibraryNameDefault, const char* const libraryDirectory = nullptr);
624
630 virtual void Shutdown();
632
633
638
643 virtual RapidVector<RTTask> TasksGet();
644
650
652
657
663
668 virtual int32_t IdGet();
670
671 virtual void TaskRemove(const int32_t taskId);
672
673 virtual ~RTTaskManager();
674
676 RTTaskManager& operator=(const RTTaskManager&);
678 RTTaskManager& operator=(RTTaskManager&&);
679
680 class Storage;
681 protected:
682 RTTaskManagerImplementation* pImpl = nullptr;
683 Storage* storage = nullptr;
684 RTTaskManager(RTTaskManagerImplementation*, Storage* storage, RapidCodeBehavior::Implementation*);
685 friend class RTTaskManagerBuilder;
686 // friend RTTaskManager MakeRTTaskManager(RTTaskManagerImplementation*, RapidCodeBehavior::Implementation*);
687 // friend RTTaskManager MakeRTTaskManager(RTTaskManagerImplementation*);
688 }; // end class RTTaskManager
689
690#endif // !defined(__INTIME__)
691
692 template <int32_t Capacity>
693 class GlobalMetadataMap {
694 public:
696 struct Metadata
697 {
699 const char* key;
700
702 int32_t offset;
703
705 int32_t size;
706
707 // const std::type_info* type;
709 };
710
711 constexpr GlobalMetadataMap() : data(), tail(0) {}
712
713 constexpr GlobalMetadataMap(std::initializer_list<Metadata> initData)
714 {
715 for (const auto& item : initData)
716 {
717 data[tail++] = item;
718 }
719 }
720
721 constexpr int32_t Size() const { return tail; }
722
723 constexpr Metadata operator[](int32_t index) const { return data[index]; }
724
725 constexpr Metadata operator[](const char* key) const
726 {
727 for (int32_t index = 0; index < tail; ++index)
728 {
729 auto& metadata = data[index];
730 if (std::strcmp(metadata.key, key)==0)
731 {
732 return metadata;
733 }
734 }
735 constexpr char errorMessageFormat[] = "Key '%s' not found in GlobalMetadata.";
736 constexpr int32_t bufferSize = 256;
737 char buffer[bufferSize] = {0};
738 std::snprintf(buffer, bufferSize, errorMessageFormat, key);
739 throw std::out_of_range(buffer);
740 }
741
742 private:
743 Metadata data[Capacity]{};
744 int32_t tail = 0;
745 };
746
747#if !defined(SWIG)
748 // Primary template for parsing the type of a global variable.
749 template<typename Type, typename = void>
750 struct RSIDataTypeGet { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeINVALID; };
751 template<typename Type>
752 struct RSIDataTypeGet<Type, typename std::enable_if<std::is_integral<Type>::value && std::is_signed<Type>::value , void>::type>
754 template<typename Type>
755 struct RSIDataTypeGet<Type, typename std::enable_if<std::is_integral<Type>::value && std::is_unsigned<Type>::value , void>::type>
757 template<typename Type>
758 struct RSIDataTypeGet<Type, typename std::enable_if<std::is_floating_point<Type>::value, void>::type>
760 template<>
761 struct RSIDataTypeGet<int16_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeINT16; };
762 template<>
763 struct RSIDataTypeGet<uint16_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeUINT16; };
764 template<>
765 struct RSIDataTypeGet<int32_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeINT32; };
766 template<>
767 struct RSIDataTypeGet<uint32_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeUINT32; };
768 template<>
769 struct RSIDataTypeGet<float> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeFLOAT; };
770#endif // !defined(SWIG)
771
772#endif // !defined(RSI_INTERNAL)
773
774
776} // end namespace RealTimeTasks
777} // end namespace RapidCode
778} // end namespace RSI
779
780#endif // !defined(RTTASK_H)
The RapidCode base class. All non-error objects are derived from this class.
Definition rsi.h:184
void Stop()
Stop the task from executing.
int64_t ExecutionCountRelativeWait(int64_t count=ExecutionCountDefault, int32_t timeoutMs=ExecutionCountWaitTimeoutMillisecondsDefault)
Wait for the task to execute a specific number of times relative to current count.
void TimingReset()
Reset the timing statistics for the task.
int32_t IdGet()
Get the ID of the task.
int64_t ExecutionCountAbsoluteWait(int64_t count=ExecutionCountDefault, int32_t timeoutMs=ExecutionCountWaitTimeoutMillisecondsDefault)
Wait for the task to reach a specific execution count.
RTTaskInfo InfoGet()
Get information about the task.
RTTaskStatus StatusGet()
Get the current status of the task.
Interface for controlling and monitoring a single real-time task. See RTTaskManager::TaskSubmit and R...
Definition rttask.h:414
RSI::RapidCode::FirmwareValue GlobalValueGet(int32_t offset)
Read a GlobalTag by its offset. (internal use)
RTTask TaskSubmit(const RTTaskCreationParameters &parameters)
Submit a new task to the manager using creation parameters.
RSI::RapidCode::FirmwareValue GlobalValueGet(const char *const name, const char *const libraryName=nullptr, const char *const libraryDirectory=nullptr)
Read a GlobalTag by its name.
RapidVector< RTTask > TasksGet()
Get all tasks managed by this RTTaskManager.
RapidVector< const char * > GlobalNamesGet(const char *const libraryName=nullptr, const char *const libraryDirectory=nullptr)
Get names of all global variables.
RTTask TaskSubmit(const char *const functionName, const char *const libraryName=RTTaskCreationParameters::LibraryNameDefault, const char *const libraryDirectory=nullptr)
Submit a new task to the manager using function and library names.
RSI::RapidCode::RSIDataType GlobalTypeGet(const char *const name, const char *const libraryName=nullptr, const char *const libraryDirectory=nullptr)
Get the type of a GlobalTag variable.
void GlobalValueSet(const RSI::RapidCode::FirmwareValue &value, const char *const name, const char *const libraryName=nullptr, const char *const libraryDirectory=nullptr)
Set the value of a GlobalTag variable.
int32_t IdGet()
Get the ID of the manager.
static RapidVector< RTTaskManager > Discover()
Discover all active RTTaskManager instances.
RTTaskManagerInfo InfoGet()
Get information about the manager.
void Shutdown()
Shutdown the RTTaskManager firmware.
RTTaskManagerStatus StatusGet()
Get the current status of the manager.
static RTTaskManager Create(const RTTaskManagerCreationParameters &parameters)
Create a new RTTaskManager instance.
static RTTaskManager Get(const int32_t managerId)
Get an existing RTTaskManager by ID.
Interface for managing real-time tasks firmware. See Real-Time Tasks for more information.
Definition rttask.h:524
Represents the error details thrown as an exception by all RapidCode classes. This class contains an ...
Definition rsi.h:111
Tracing allows for low level logs to be generated.
Definition rsi.h:11704
TaskPriority
Enum representing the priority levels for a real-time task.
Definition rttask.h:100
@ MediumLow
A medium-low real-time priority level.
@ Low
A low real-time priority level.
@ Highest
The highest real-time priority level for an RTTask. Is below the priority of the main thread of the R...
@ High
A high real-time priority level.
@ Medium
A medium real-time priority level. This is the default priority for real-time tasks.
@ MediumHigh
A medium-high real-time priority level.
@ Lowest
The lowest real-time priority level for an RTTask. Is above standard thread priorities.
@ NonRealTime
A task without any real-time priority, given the operating system's default.
RTTaskManagerState
Enum representing the possible states of an RTTaskManager.
Definition rttask.h:74
@ Stopped
Manager firmware is initialized but not currently running.
RTTaskState
Enum representing the possible states of a real-time task.
Definition rttask.h:62
@ Dead
Task is not initialized or has been terminated.
@ Waiting
Task is active but waiting for its next scheduled execution time.
@ Running
Task is currently executing.
@ Disabled
Task is initialized but not currently executing.
PlatformType
Enum representing the platform type for an RTTaskManager.
Definition rttask.h:85
@ Native
Native platform (where the library is running, Windows or Linux).
@ Windows
Standard Windows (useful for debugging tasks before running on INtime).
RSITrace
Trace masks.
Definition rsienums.h:539
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:658
@ RSIDataTypeUINT32
uint32 (unsigned 32-bit integer)
@ RSIDataTypeDOUBLE
double (64-bit floating point)
@ RSIDataTypeINT64
int64 (signed 64-bit integer)
@ RSIDataTypeINT16
signed 16-bit integer
@ RSIDataTypeUINT16
unsigned 16-bit integer
@ RSIDataTypeINT32
int32 (signed 32-bit integer)
@ RSIDataTypeUINT64
uint64 (unsigned 64-bit integer)
@ RSIDataTypeFLOAT
float (32-bit floating point, rarely used)
RSIErrorMessage
All possible RSI Error Messages.
Definition rsienums.h:17
int32_t offset
Offset of the global variable within the GlobalData structure.
Definition rttask.h:702
const char * key
Name of the global variable.
Definition rttask.h:699
int32_t size
Size of the global variable in bytes.
Definition rttask.h:705
RTTaskCreationParameters(const char *const argFunctionName, const char *const argLibraryName=nullptr, const char *const argLibraryDirectory=nullptr)
Constructor with function name and library details.
Definition rttask.h:192
RTTaskCreationParameters specifies all the information required to create and configure a real-time t...
Definition rttask.h:124
static constexpr int32_t RepeatForever
Special value to indicate the task should repeat forever.
Definition rttask.h:138
char FunctionName[NameLengthMaximum]
Name of the task function to execute.
Definition rttask.h:153
char LibraryName[NameLengthMaximum]
Name of the library containing the task function.
Definition rttask.h:156
char UserLabel[NameLengthMaximum]
User-defined label for the task.
Definition rttask.h:162
int32_t Repeats
Number of times the task should execute (RepeatForever for infinite, 0 for none (one-shot)).
Definition rttask.h:168
TaskPriority Priority
Priority of the task (coming soon).
Definition rttask.h:165
static constexpr int32_t RepeatNone
Special value to indicate the task should not repeat.
Definition rttask.h:141
static constexpr int32_t PeriodDefault
Default execution period in RMP sample periods.
Definition rttask.h:144
static constexpr int32_t DirectoryLengthMaximum
Maximum length of the library directory path.
Definition rttask.h:126
char LibraryDirectory[DirectoryLengthMaximum]
Path to the directory containing the library with the task function.
Definition rttask.h:159
int32_t Period
Execution period of the task in RMP sample periods.
Definition rttask.h:171
static constexpr int32_t PhaseDefault
Default phase offset for task execution.
Definition rttask.h:147
int32_t Phase
Phase offset for task execution. For example, if you have 4 tasks with a period of 4,...
Definition rttask.h:176
static constexpr bool EnableTimingDefault
Default setting for timing measurements.
Definition rttask.h:150
static constexpr int32_t NameLengthMaximum
Maximum length of name fields (library, function, user label).
Definition rttask.h:129
static constexpr TaskPriority PriorityDefault
Default priority for real-time tasks.
Definition rttask.h:135
static constexpr const char *const LibraryNameDefault
Default library name for the task function.
Definition rttask.h:132
bool EnableTiming
Whether to enable timing measurements for the task. Keep in mind, enabling timing does add a small am...
Definition rttask.h:180
RTTaskInfo provides information about a real-time task, including its creation parameters....
Definition rttask.h:228
RTTaskCreationParameters CreationParameters
Creation parameters used to create the task.
Definition rttask.h:230
RTTaskManagerCreationParameters specifies all the information required to create and configure an RTT...
Definition rttask.h:318
bool NoRmp
Disable the initialization of the RMP and RapidCode objects on task manager startup and their use in ...
Definition rttask.h:341
char UserLabel[NameLengthMaximum]
User-defined label for the manager.
Definition rttask.h:338
int32_t CpuCore
[Linux] CPU core to which the manager should be pinned (-1 for no pinning).
Definition rttask.h:335
static constexpr int32_t DirectoryLengthMaximum
Maximum length of the directory path.
Definition rttask.h:320
char NodeName[NameLengthMaximum]
[INtime] Name of the node on which the manager will run.
Definition rttask.h:332
char RTTaskDirectory[DirectoryLengthMaximum]
Path to the directory containing the real-time task libraries.
Definition rttask.h:326
static constexpr int32_t NameLengthMaximum
Maximum length of name fields (node name, user label).
Definition rttask.h:323
Information about RTTaskManager firmware, including its creation parameters and ID....
Definition rttask.h:348
RTTaskManagerCreationParameters CreationParameters
Creation parameters used to create the manager.
Definition rttask.h:350
RTTaskManagerStatus provides status information for RTTaskManager firmware, including its current sta...
Definition rttask.h:282
uint64_t CycleTimeMax
Maximum execution time of a cycle in nanoseconds.
Definition rttask.h:293
uint64_t TaskSubmissionCount
Number of tasks submitted to the manager.
Definition rttask.h:287
RTTaskManagerState State
Current state of the manager.
Definition rttask.h:284
double StartTimeDeltaMean
Mean difference between the current and previous start of the main task manager loop execution in nan...
Definition rttask.h:311
uint64_t CycleTimeLast
Execution time of the last cycle in nanoseconds.
Definition rttask.h:302
uint64_t StartTimeDeltaLast
Last difference between the current and previous start of the main task manager loop execution in nan...
Definition rttask.h:305
double CycleTimeMean
Mean execution time of cycles in nanoseconds.
Definition rttask.h:299
uint64_t CycleTimeMin
Minimum execution time of a cycle in nanoseconds.
Definition rttask.h:296
int64_t CycleCount
Number of cycles executed by the manager.
Definition rttask.h:290
uint64_t StartTimeDeltaMax
Maximum difference between the current and previous start of the main task manager loop execution in ...
Definition rttask.h:308
RTTaskStatus provides status information for a real-time task, including its current state,...
Definition rttask.h:237
double StartTimeDeltaMean
Mean difference between the current and previous start of the task execution in nanoseconds.
Definition rttask.h:263
RTTaskState State
Current state of the task.
Definition rttask.h:239
uint64_t StartTimeDeltaLast
Last difference between the current and previous start of the task execution in nanoseconds.
Definition rttask.h:257
static constexpr uint64_t InvalidExecutionTime
Invalid value for execution time, indicating timing is not enabled or the task has not executed.
Definition rttask.h:272
uint64_t ExecutionTimeMin
Minimum execution time of the task in nanoseconds.
Definition rttask.h:248
uint64_t ExecutionTimeMax
Maximum execution time of the task in nanoseconds.
Definition rttask.h:245
int64_t ExecutionCount
Number of times the task has executed.
Definition rttask.h:242
uint64_t StartTimeDeltaMax
Maximum difference between the current and previous start of the task execution in nanoseconds.
Definition rttask.h:260
double ExecutionTimeMean
Mean execution time of the task in nanoseconds.
Definition rttask.h:251
uint64_t ExecutionTimeLast
Last execution time of the task in nanoseconds.
Definition rttask.h:254
RTTaskStatus()=default
Default constructor.
static constexpr int64_t InvalidExecutionCount
Invalid value for execution count, indicating the task has not executed.
Definition rttask.h:269
Union representing a generic RMP firmware value with multiple data types, stored in 64-bits.
Definition rsi.h:468