Merge remote-tracking branch 'upstream/master' into mueller_binSemaphoreInit

This commit is contained in:
2020-08-27 16:28:50 +02:00
391 changed files with 4372 additions and 2300 deletions

View File

@ -3,7 +3,7 @@
class PeriodicTaskIF;
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include "../returnvalues/HasReturnvaluesIF.h"
#include <cstring>
/**

View File

@ -1,8 +1,8 @@
#ifndef FRAMEWORK_TASKS_FIXEDTIMESLOTTASKIF_H_
#define FRAMEWORK_TASKS_FIXEDTIMESLOTTASKIF_H_
#include <framework/objectmanager/ObjectManagerIF.h>
#include <framework/tasks/PeriodicTaskIF.h>
#include "../objectmanager/ObjectManagerIF.h"
#include "PeriodicTaskIF.h"
/**
* Following the same principle as the base class IF. This is the interface for a Fixed timeslot task

View File

@ -1,9 +1,11 @@
#ifndef PERIODICTASKIF_H_
#define PERIODICTASKIF_H_
#ifndef FRAMEWORK_TASK_PERIODICTASKIF_H_
#define FRAMEWORK_TASK_PERIODICTASKIF_H_
#include <framework/objectmanager/SystemObjectIF.h>
#include "../objectmanager/SystemObjectIF.h"
#include "../timemanager/Clock.h"
#include <cstddef>
class ExecutableObjectIF;
/**
* New version of TaskIF
* Follows RAII principles, i.e. there's no create or delete method.
@ -17,11 +19,26 @@ public:
*/
virtual ~PeriodicTaskIF() { }
/**
* @brief With the startTask method, a created task can be started for the first time.
* @brief With the startTask method, a created task can be started
* for the first time.
*/
virtual ReturnValue_t startTask() = 0;
virtual ReturnValue_t addComponent(object_id_t object) {return HasReturnvaluesIF::RETURN_FAILED;};
/**
* Add a component (object) to a periodic task. The pointer to the
* task can be set optionally
* @param object
* Add an object to the task. The most important case is to add an
* executable object with a function which will be called regularly
* (see ExecutableObjectIF)
* @param setTaskIF
* Can be used to specify whether the task object pointer is passed
* to the component.
* @return
*/
virtual ReturnValue_t addComponent(object_id_t object) {
return HasReturnvaluesIF::RETURN_FAILED;
};
virtual ReturnValue_t sleepFor(uint32_t ms) = 0;

View File

@ -2,8 +2,8 @@
#define FRAMEWORK_TASKS_TASKFACTORY_H_
#include <stdlib.h>
#include <framework/tasks/FixedTimeslotTaskIF.h>
#include <framework/tasks/Typedef.h>
#include "FixedTimeslotTaskIF.h"
#include "Typedef.h"
/**
* Singleton Class that produces Tasks.

View File

@ -1,7 +1,6 @@
#ifndef FRAMEWORK_TASKS_TYPEDEF_H_
#define FRAMEWORK_TASKS_TYPEDEF_H_
//TODO more generic?
typedef const char* TaskName;
typedef uint8_t TaskPriority;
typedef size_t TaskStackSize;