Skip to content

Identifikation_of_Tasks_and_Channels

Olaf Maibaum edited this page Apr 21, 2023 · 3 revisions

Identification of Tasks and Channels

Each task and each channel contain as first variable an identification as a 32-bit integer. This identification should be unique and will not be used by the Tasking Framework. The purpose of the identification is software debugging. However, the identifications are also used by extensions of the Tasking Framework.

The identifications can be set by the constructors to an unsigned integer value or character array. There are also getter and setter functions. Getter is only a request of the identification as integer value. Conversion to a character array needs a buffer, e.g. a channel identification conversion is as follows:

#include "taskUtils.h"
static const size_t bufferSize = 5u;
char name[bufferSize];
Tasking::convertChannelIdToString(channel.getChannelId(), name, bufferSize);

An alternative way will be the conversion of task or channel names with the ID converter class

#include "taskUtils.h"
std::cout << "Channel name is " << Tasking::IdConverter(channel).name << std::endl;

Clone this wiki locally