I want to gather data about my tasks into a JsonDocument with ArduinoJson.
The problem I'm facing is that vTaskList and vTaskGetRunTimeStats does not provide any struct or usable variables to retrive information.
My thiking would be something like this
Code: Select all
//retrive vTaskList into a struct or something
task_list_struct taskInfos = getTaskList();
// Add info to a JsonDocument
JsonDocument taskInfo;
taskInfo["name"] = taskInfos.name;
This works:
Code: Select all
char taskListBuff[2048] = {0};
char taskRunTimeStatsBuff[2048] = {0};
vTaskList(taskListBuff);
vTaskGetRunTimeStats(taskRunTimeStatsBuff);
printf("vTaskList: %s\n", taskListBuff);
printf("vTaskGetRunTimeStats: %s\n", taskRunTimeStatsBuff);
Does anyone know how to do that? How does vTaskList and vTaskGetRunTimeStats gets the data?