#ifndef RT_TASKS_HELPERS
#define RT_TASKS_HELPERS
#include "rttask.h"
#include <iostream>
#include <memory>
using namespace RSI::RapidCode::RealTimeTasks;
namespace RTTaskHelper
{
#if defined(WIN32) && defined(NDEBUG)
{
std::snprintf(
RTTaskManagerCreationParameters::DirectoryLengthMaximum,
RMP_DEFAULT_PATH
);
parameters.
Platform = PlatformType::INtime;
std::snprintf(
RTTaskManagerCreationParameters::NameLengthMaximum,
"NodeA"
);
return parameters;
}
#else
{
std::snprintf(
RTTaskManagerCreationParameters::DirectoryLengthMaximum,
RMP_DEFAULT_PATH
);
return parameters;
}
#endif
{
std::cout << "Running initialization task..." << std::endl;
initParams.
Repeats = RTTaskCreationParameters::RepeatNone;
constexpr int timeoutMs = 5000;
}
}
#endif
int64_t ExecutionCountAbsoluteWait(int64_t count=ExecutionCountDefault, int32_t timeoutMs=ExecutionCountWaitTimeoutMillisecondsDefault)
Wait for the task to reach a specific execution count.
Interface for controlling and monitoring a single real-time task. See RTTaskManager::TaskSubmit and R...
RTTask TaskSubmit(const RTTaskCreationParameters ¶meters)
Submit a new task to the manager using creation parameters.
Interface for managing real-time tasks firmware. See Real-Time Tasks for more information.
RTTaskCreationParameters specifies all the information required to create and configure a real-time t...
int32_t Repeats
Number of times the task should execute (RepeatForever for infinite, 0 for none (one-shot)).
RTTaskManagerCreationParameters specifies all the information required to create and configure an RTT...
PlatformType Platform
Platform on which the manager firmware will run.
char NodeName[NameLengthMaximum]
[INtime] Name of the node on which the manager will run.
char RTTaskDirectory[DirectoryLengthMaximum]
Path to the directory containing the real-time task libraries.