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{
33
36{
37 // Forward declaration of User's custom-defined structure of global data.
38 struct GlobalData;
39
40 class RTTaskImplementation;
41 class RTTaskManagerImplementation;
42
47
49 inline constexpr int32_t RTTaskManagerCountMaximum = 8;
51 inline constexpr int32_t RTTaskCountMaximum = 64;
53 inline constexpr char RTTaskManagerExecutableName[] = "rttaskmanager";
55
58
63 enum class RTTaskState : int32_t
64 {
65 Dead = 0,
67 Waiting = 2,
68 Running = 3,
69 };
70
75 enum class RTTaskManagerState : int32_t
76 {
77 Dead = 0,
78 Running = 1,
79 Stopped = 2,
80 };
81
86 enum class PlatformType : int32_t
87 {
88 Native = 0,
89 INtime = 1,
90 Linux = 2,
91 Windows = 3,
92 };
93
112
114
117
118 // Function pointer type for real-time task functions.
119 using TaskFunction = int32_t(*)(GlobalData*, char*, const uint32_t);
120
125 struct RTTaskCreationParameters
126 {
128 static constexpr int32_t DirectoryLengthMaximum = 256;
129
131 static constexpr int32_t NameLengthMaximum = 64;
132
134 static constexpr const char* const LibraryNameDefault = "RTTaskFunctions";
135
138
140 static constexpr int32_t RepeatForever = -1;
141
143 static constexpr int32_t RepeatNone = 0;
144
146 static constexpr int32_t PeriodDefault = 1;
147
149 static constexpr int32_t PhaseDefault = 0;
150
152 static constexpr bool EnableTimingDefault = false;
153
156
158 char LibraryName[NameLengthMaximum] = "RTTaskFunctions";
159
162
165
168
171
174
179
183
184 // Default constructor.
185 RTTaskCreationParameters() = default;
186
194 RTTaskCreationParameters(const char* const argFunctionName, const char* const argLibraryName = nullptr, const char* const argLibraryDirectory = nullptr)
200 {
201 if (argFunctionName == nullptr)
202 {
203 throw std::invalid_argument("Task function name must not be null.");
204 }
205 std::snprintf(FunctionName, NameLengthMaximum, "%s", argFunctionName);
206
207 if (argLibraryName != nullptr)
208 {
209 std::snprintf(LibraryName, NameLengthMaximum, "%s", argLibraryName);
210 }
211 else
212 {
213 std::snprintf(LibraryName, NameLengthMaximum, "%s", LibraryNameDefault);
214 }
215
216 if (argLibraryDirectory != nullptr)
217 {
218 std::snprintf(LibraryDirectory, DirectoryLengthMaximum, "%s", argLibraryDirectory);
219 }
220 else
221 {
223 }
224 }
225 };
226
234
239 {
242
245
248
250 uint64_t ExecutionTimeMin = std::numeric_limits<uint64_t>::max();
251
254
257
260
263
266
268 RTTaskStatus() = default;
269
271 static constexpr int64_t InvalidExecutionCount = -1;
272
274 static constexpr uint64_t InvalidExecutionTime = 0;
275
276 static constexpr uint64_t ErrorMessageSizeMaximum = 512;
277 char ErrorMessage[ErrorMessageSizeMaximum] = {};
278 };
279
284 {
287
290
292 int64_t CycleCount;
293
295 uint64_t CycleTimeMax;
296
298 uint64_t CycleTimeMin;
299
302
305
307 uint64_t StartTimeDeltaLast = 0;
308
310 uint64_t StartTimeDeltaMax = 0;
311
314 };
315
320 {
322 static constexpr int32_t DirectoryLengthMaximum = 256;
323
325 static constexpr int32_t NameLengthMaximum = 64;
326
333 static constexpr char UserLabelDefault[] = "RTTaskManager";
334
336 static constexpr char NodeNameDefault[] = "NodeA";
337
340
343
347
349 int32_t CpuCore = -1;
350
359 char UserLabel[NameLengthMaximum] = "RTTaskManager";
360
362 bool NoRmp = false;
363 };
364
376
377 typedef int32_t (*GlobalMemberOffsetGetter)(const char* const name);
378 typedef int32_t (*GlobalNamesGetter)(const char* names[], int32_t capacity);
379 typedef int32_t (*GlobalMemberTypeGetter)(const char* const name);
380
381 inline constexpr int32_t GlobalMaxSize = 2048;
382
383#if !defined(RSI_INTERNAL)
384#if !defined(__INTIME__)
385
386 class RSI_API RapidCodeBehavior : public virtual RapidCodeObject
387 {
388 public:
389 const char* const VersionGet() override;
390 int32_t MpiVersionMajor() override;
391 int32_t MpiVersionMinor() override;
392 int32_t MpiVersionRelease() override;
393 int32_t RSIVersionMajor() override;
394 int32_t RSIVersionMinor() override;
395 int32_t RSIVersionMicro() override;
396 int32_t RSIVersionPatch() override;
397 int32_t NumberGet() override;
398 int32_t ErrorLogCountGet() override;
399 const RsiError* const ErrorLogGet() override;
400 void ErrorLogClear() override;
401 void ThrowExceptions(bool state) override;
402 const char* const RsiErrorMessageGet(RSIErrorMessage msg) override;
403 const char* const ErrorMessageGet(RSIErrorMessage msg) override;
404 bool WarningMsgCheck(RSIErrorMessage msg) override;
405 void Trace(bool state) override;
406 void TraceMaskOnSet(RSITrace maskOn) override;
407 bool TraceMaskOnGet(RSITrace maskOn) override;
408 void TraceMaskOffSet(RSITrace maskOff) override;
409 void TraceMaskClear() override;
410 void TraceFileSet(const char* const fileName) override;
411 void TraceFileClose() override;
412 void TraceInjectMessage(RSITrace traceLevel, const char* const message) override;
413
414 virtual ~RapidCodeBehavior();
415 RapidCodeBehavior(const RapidCodeBehavior&);
416 RapidCodeBehavior& operator=(const RapidCodeBehavior&);
417 RapidCodeBehavior(RapidCodeBehavior&&);
418 RapidCodeBehavior& operator=(RapidCodeBehavior&&);
419
420 class Implementation;
421 protected:
422 Implementation* rapidCodeBehavior = nullptr;
423 RapidCodeBehavior(Implementation*);
424 };
425
426
434 class RSI_API RTTask : public virtual RapidCodeBehavior
435 {
436 public:
441
449 void Stop();
450
459
470 void Remove();
472
477
483
495
508
513
518 int32_t IdGet();
519
526
531
533 static constexpr int64_t ExecutionCountWaitFailure = -1;
535 static constexpr int64_t ExecutionCountDefault = 1;
537 static constexpr int32_t ExecutionCountWaitTimeoutMillisecondsDefault = 250;
539
540 ~RTTask();
541 RTTask(const RTTask&);
542 RTTask& operator=(const RTTask&);
543 RTTask(RTTask&&);
544 RTTask& operator=(RTTask&&);
545
546 protected:
547 RTTaskImplementation* pImpl = nullptr;
548 RTTask(RTTaskImplementation*, RapidCodeBehavior::Implementation*);
549 friend class RTTaskBuilder;
550 }; // end class RTTask
551
558 class RSI_API RTTaskManager : public virtual RapidCodeBehavior
559 {
560 public:
565
573
580 static RTTaskManager Get(const int32_t managerId);
581
592 static RTTaskManager Create(const RTTaskManagerCreationParameters& parameters);
594
599
609 RapidVector<const char*> GlobalNamesGet(const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
610
616
625 RSI::RapidCode::FirmwareValue GlobalValueGet(const char* const name, const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
626
636 void GlobalValueSet(const RSI::RapidCode::FirmwareValue& value, const char* const name, const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
637
646 RSI::RapidCode::RSIDataType GlobalTypeGet(const char* const name, const char* const libraryName = nullptr, const char* const libraryDirectory = nullptr);
647
649
654
667
681 RTTask TaskSubmit(const char* const functionName, const char* const libraryName = RTTaskCreationParameters::LibraryNameDefault, const char* const libraryDirectory = nullptr);
682
688 void Shutdown();
690
691
696
702
708
710
715
721
726 int32_t IdGet();
728
729 void TaskRemove(const int32_t taskId);
730
731 ~RTTaskManager();
732
733 RTTaskManager(const RTTaskManager&);
734 RTTaskManager& operator=(const RTTaskManager&);
735 RTTaskManager(RTTaskManager&&);
736 RTTaskManager& operator=(RTTaskManager&&);
737
738 class Storage;
739 protected:
740 RTTaskManagerImplementation* pImpl = nullptr;
741 Storage* storage = nullptr;
742 RTTaskManager(RTTaskManagerImplementation*, Storage* storage, RapidCodeBehavior::Implementation*);
743 friend class RTTaskManagerBuilder;
744 // friend RTTaskManager MakeRTTaskManager(RTTaskManagerImplementation*, RapidCodeBehavior::Implementation*);
745 // friend RTTaskManager MakeRTTaskManager(RTTaskManagerImplementation*);
746 }; // end class RTTaskManager
747
748#endif // !defined(__INTIME__)
749
750 template <int32_t Capacity>
751 class GlobalMetadataMap {
752 public:
754 struct Metadata
755 {
757 const char* key;
758
760 int32_t offset;
761
763 int32_t size;
764
765 // const std::type_info* type;
767 };
768
769 constexpr GlobalMetadataMap() : data(), tail(0) {}
770
771 constexpr GlobalMetadataMap(std::initializer_list<Metadata> initData)
772 {
773 for (const auto& item : initData)
774 {
775 data[tail++] = item;
776 }
777 }
778
779 constexpr int32_t Size() const { return tail; }
780
781 constexpr Metadata operator[](int32_t index) const { return data[index]; }
782
783 constexpr Metadata operator[](const char* key) const
784 {
785 for (int32_t index = 0; index < tail; ++index)
786 {
787 auto& metadata = data[index];
788 if (std::strcmp(metadata.key, key)==0)
789 {
790 return metadata;
791 }
792 }
793 constexpr char errorMessageFormat[] = "Key '%s' not found in GlobalMetadata.";
794 constexpr int32_t bufferSize = 256;
795 char buffer[bufferSize] = {0};
796 std::snprintf(buffer, bufferSize, errorMessageFormat, key);
797 throw std::out_of_range(buffer);
798 }
799
800 private:
801 Metadata data[Capacity]{};
802 int32_t tail = 0;
803 };
804
805#if !defined(SWIG)
806 // Primary template for parsing the type of a global variable.
807 template<typename Type, typename = void>
808 struct RSIDataTypeGet { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeINVALID; };
809 template<typename Type>
810 struct RSIDataTypeGet<Type, typename std::enable_if<std::is_integral<Type>::value && std::is_signed<Type>::value , void>::type>
812 template<typename Type>
813 struct RSIDataTypeGet<Type, typename std::enable_if<std::is_integral<Type>::value && std::is_unsigned<Type>::value , void>::type>
815 template<typename Type>
816 struct RSIDataTypeGet<Type, typename std::enable_if<std::is_floating_point<Type>::value, void>::type>
818 template<>
819 struct RSIDataTypeGet<int16_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeINT16; };
820 template<>
821 struct RSIDataTypeGet<uint16_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeUINT16; };
822 template<>
823 struct RSIDataTypeGet<int32_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeINT32; };
824 template<>
825 struct RSIDataTypeGet<uint32_t> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeUINT32; };
826 template<>
827 struct RSIDataTypeGet<float> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeFLOAT; };
828 template<>
829 struct RSIDataTypeGet<bool> { static constexpr RSI::RapidCode::RSIDataType type = RSIDataType::RSIDataTypeBOOL; };
830#endif // !defined(SWIG)
831
832#endif // !defined(RSI_INTERNAL)
833
834
836} // end namespace RealTimeTasks
837} // end namespace RapidCode
838} // end namespace RSI
839
840#endif // !defined(RTTASK_H)
The RapidCode base class. All non-error objects are derived from this class.
Definition rsi.h:184
A wrapper class for the C++ STL vector class that aims to maintain application binary interface....
Definition rsi.h:12412
void Remove()
Remove the task from its RTTaskManager.
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:435
static constexpr int64_t ExecutionCountWaitFailure
Value returned when waiting for an execution count fails.
Definition rttask.h:533
static constexpr int32_t ExecutionCountWaitTimeoutMillisecondsDefault
Default timeout for waiting for execution count in milliseconds.
Definition rttask.h:537
static constexpr int64_t ExecutionCountDefault
Default number of executions to wait for.
Definition rttask.h:535
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.
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:11895
TaskPriority
Enum representing the priority levels for a real-time task.
Definition rttask.h:102
@ MediumLow
A medium-low real-time priority level.
Definition rttask.h:106
@ Low
A low real-time priority level.
Definition rttask.h:105
@ Highest
The highest real-time priority level for an RTTask. Is below the priority of the main thread of the R...
Definition rttask.h:110
@ High
A high real-time priority level.
Definition rttask.h:109
@ Medium
A medium real-time priority level. This is the default priority for real-time tasks.
Definition rttask.h:107
@ MediumHigh
A medium-high real-time priority level.
Definition rttask.h:108
@ Lowest
The lowest real-time priority level for an RTTask. Is above standard thread priorities.
Definition rttask.h:104
@ NonRealTime
A task without any real-time priority, given the operating system's default.
Definition rttask.h:103
RTTaskManagerState
Enum representing the possible states of an RTTaskManager.
Definition rttask.h:76
@ Stopped
Manager firmware is initialized but not currently running.
Definition rttask.h:79
RTTaskState
Enum representing the possible states of a real-time task.
Definition rttask.h:64
@ Dead
Task is not initialized or has been terminated.
Definition rttask.h:65
@ Waiting
Task is active but waiting for its next scheduled execution time.
Definition rttask.h:67
@ Running
Task is currently executing.
Definition rttask.h:68
@ Disabled
Task is initialized but not currently executing.
Definition rttask.h:66
PlatformType
Enum representing the platform type for an RTTaskManager.
Definition rttask.h:87
@ Native
Native platform (where the library is running, Windows or Linux).
Definition rttask.h:88
@ Windows
Standard Windows (useful for debugging tasks before running on INtime).
Definition rttask.h:91
RSITrace
Trace masks.
Definition rsienums.h:540
RSIDataType
Data types for User Limits and other triggers.
Definition rsienums.h:659
@ RSIDataTypeUINT32
uint32 (unsigned 32-bit integer)
Definition rsienums.h:666
@ RSIDataTypeDOUBLE
double (64-bit floating point)
Definition rsienums.h:668
@ RSIDataTypeINT64
int64 (signed 64-bit integer)
Definition rsienums.h:669
@ RSIDataTypeINT16
signed 16-bit integer
Definition rsienums.h:663
@ RSIDataTypeBOOL
bool (boolean) support for Real-Time Tasks
Definition rsienums.h:673
@ RSIDataTypeUINT16
unsigned 16-bit integer
Definition rsienums.h:664
@ RSIDataTypeINT32
int32 (signed 32-bit integer)
Definition rsienums.h:665
@ RSIDataTypeUINT64
uint64 (unsigned 64-bit integer)
Definition rsienums.h:670
@ RSIDataTypeFLOAT
float (32-bit floating point, rarely used)
Definition rsienums.h:667
RSIErrorMessage
All possible RSI Error Messages.
Definition rsienums.h:17
The RealTimeTasks namespace.
Definition rttask.h:36
constexpr int32_t RTTaskManagerCountMaximum
Maximum number of RTTaskManager instances that can be created.
Definition rttask.h:49
constexpr char RTTaskManagerExecutableName[]
Name of the executable for the RTTaskManager firmware.
Definition rttask.h:53
constexpr int32_t RTTaskCountMaximum
Maximum number of RTTask instances that can be created per manager.
Definition rttask.h:51
int32_t offset
Offset of the global variable within the GlobalData structure.
Definition rttask.h:760
const char * key
Name of the global variable.
Definition rttask.h:757
int32_t size
Size of the global variable in bytes.
Definition rttask.h:763
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:194
RTTaskCreationParameters specifies all the information required to create and configure a real-time t...
Definition rttask.h:126
static constexpr int32_t RepeatForever
Special value to indicate the task should repeat forever.
Definition rttask.h:140
char FunctionName[NameLengthMaximum]
Name of the task function to execute.
Definition rttask.h:155
char LibraryName[NameLengthMaximum]
Name of the library containing the task function.
Definition rttask.h:158
char UserLabel[NameLengthMaximum]
User-defined label for the task. Empty UserLabels will default to the FunctionName....
Definition rttask.h:164
int32_t Repeats
Number of times the task should execute (RepeatForever for infinite, 0 for none (one-shot)).
Definition rttask.h:170
TaskPriority Priority
Priority of the task (coming soon).
Definition rttask.h:167
static constexpr int32_t RepeatNone
Special value to indicate the task should not repeat.
Definition rttask.h:143
static constexpr int32_t PeriodDefault
Default execution period in RMP sample periods.
Definition rttask.h:146
static constexpr int32_t DirectoryLengthMaximum
Maximum length of the library directory path.
Definition rttask.h:128
char LibraryDirectory[DirectoryLengthMaximum]
Path to the directory containing the library with the task function.
Definition rttask.h:161
int32_t Period
Execution period of the task in RMP sample periods.
Definition rttask.h:173
static constexpr int32_t PhaseDefault
Default phase offset for task execution.
Definition rttask.h:149
int32_t Phase
Phase offset for task execution. For example, if you have 4 tasks with a period of 4,...
Definition rttask.h:178
static constexpr bool EnableTimingDefault
Default setting for timing measurements.
Definition rttask.h:152
static constexpr int32_t NameLengthMaximum
Maximum length of name fields (library, function, user label).
Definition rttask.h:131
static constexpr TaskPriority PriorityDefault
Default priority for real-time tasks.
Definition rttask.h:137
static constexpr const char *const LibraryNameDefault
Default library name for the task function.
Definition rttask.h:134
bool EnableTiming
Whether to enable timing measurements for the task. Keep in mind, enabling timing does add a small am...
Definition rttask.h:182
RTTaskInfo provides information about a real-time task, including its creation parameters....
Definition rttask.h:230
RTTaskCreationParameters CreationParameters
Creation parameters used to create the task.
Definition rttask.h:232
char UserLabel[NameLengthMaximum]
User-defined label for the manager.
Definition rttask.h:359
static constexpr char UserLabelDefault[]
Default user label for a task manager.
Definition rttask.h:333
RTTaskManagerCreationParameters specifies all the information required to create and configure an RTT...
Definition rttask.h:320
bool NoRmp
Disable the initialization of the RMP and RapidCode objects on task manager startup and their use in ...
Definition rttask.h:362
static constexpr char NodeNameDefault[]
Default INtime Node name (only needed if PlatformType is INtime).
Definition rttask.h:336
int32_t CpuCore
[Linux] CPU core to which the manager should be pinned (-1 for no pinning).
Definition rttask.h:349
PlatformType Platform
Platform on which the manager firmware will run.
Definition rttask.h:342
static constexpr int32_t DirectoryLengthMaximum
Maximum length of the directory path.
Definition rttask.h:322
char NodeName[NameLengthMaximum]
[INtime] Name of the node on which the manager will run. By default, this is set to (and verified as)...
Definition rttask.h:346
char RTTaskDirectory[DirectoryLengthMaximum]
Path to the directory containing the real-time task libraries.
Definition rttask.h:339
static constexpr int32_t NameLengthMaximum
Maximum length of name fields (node name, user label).
Definition rttask.h:325
Information about RTTaskManager firmware, including its creation parameters and ID....
Definition rttask.h:369
RTTaskManagerCreationParameters CreationParameters
Creation parameters used to create the manager.
Definition rttask.h:371
RTTaskManagerStatus provides status information for RTTaskManager firmware, including its current sta...
Definition rttask.h:284
uint64_t CycleTimeMax
Maximum execution time of a cycle in nanoseconds.
Definition rttask.h:295
uint64_t TaskSubmissionCount
Number of tasks submitted to the manager.
Definition rttask.h:289
RTTaskManagerState State
Current state of the manager.
Definition rttask.h:286
double StartTimeDeltaMean
Mean difference between the current and previous start of the main task manager loop execution in nan...
Definition rttask.h:313
uint64_t CycleTimeLast
Execution time of the last cycle in nanoseconds.
Definition rttask.h:304
uint64_t StartTimeDeltaLast
Last difference between the current and previous start of the main task manager loop execution in nan...
Definition rttask.h:307
double CycleTimeMean
Mean execution time of cycles in nanoseconds.
Definition rttask.h:301
uint64_t CycleTimeMin
Minimum execution time of a cycle in nanoseconds.
Definition rttask.h:298
int64_t CycleCount
Number of cycles executed by the manager.
Definition rttask.h:292
uint64_t StartTimeDeltaMax
Maximum difference between the current and previous start of the main task manager loop execution in ...
Definition rttask.h:310
RTTaskStatus provides status information for a real-time task, including its current state,...
Definition rttask.h:239
double StartTimeDeltaMean
Mean difference between the current and previous start of the task execution in nanoseconds.
Definition rttask.h:265
RTTaskState State
Current state of the task.
Definition rttask.h:241
uint64_t StartTimeDeltaLast
Last difference between the current and previous start of the task execution in nanoseconds.
Definition rttask.h:259
static constexpr uint64_t InvalidExecutionTime
Invalid value for execution time, indicating timing is not enabled or the task has not executed.
Definition rttask.h:274
uint64_t ExecutionTimeMin
Minimum execution time of the task in nanoseconds.
Definition rttask.h:250
uint64_t ExecutionTimeMax
Maximum execution time of the task in nanoseconds.
Definition rttask.h:247
int64_t ExecutionCount
Number of times the task has executed.
Definition rttask.h:244
uint64_t StartTimeDeltaMax
Maximum difference between the current and previous start of the task execution in nanoseconds.
Definition rttask.h:262
double ExecutionTimeMean
Mean execution time of the task in nanoseconds.
Definition rttask.h:253
uint64_t ExecutionTimeLast
Last execution time of the task in nanoseconds.
Definition rttask.h:256
RTTaskStatus()=default
Default constructor.
static constexpr int64_t InvalidExecutionCount
Invalid value for execution count, indicating the task has not executed.
Definition rttask.h:271
Union representing a generic RMP firmware value with multiple data types, stored in 64-bits.
Definition rsi.h:468