1
0
forked from fsfw/fsfw

Adding Code for Linux

This commit is contained in:
2018-07-13 18:28:26 +02:00
parent db1f93a155
commit fd782b20c0
90 changed files with 2411 additions and 1497 deletions

View File

@ -11,10 +11,11 @@
#ifndef EXECUTABLEOBJECTIF_H_
#define EXECUTABLEOBJECTIF_H_
#include <framework/osal/OperatingSystemIF.h>
class PeriodicTaskIF;
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include <cstring>
/**
* @brief The interface provides a method to execute objects within a task.
* @details The performOperation method, that is required by the interface is
@ -34,7 +35,15 @@ public:
*/
virtual ReturnValue_t performOperation(uint8_t operationCode = 0) = 0;
virtual void setTaskIF(PeriodicTaskIF* interface) {};
/**
* @brief Function called during setup assignment of object to task
* @details Has to be called from the function that assigns the object to a task and
* enables the object implementation to overwrite this function and get a reference to the executing task
* @param task_ Pointer to the taskIF of this task
*/
virtual void setTaskIF(PeriodicTaskIF* task_) {
}
};
#endif /* EXECUTABLEOBJECTIF_H_ */

View File

@ -2,6 +2,7 @@
#define PERIODICTASKIF_H_
#include <framework/objectmanager/SystemObjectIF.h>
#include <cstddef>
class ExecutableObjectIF;
/**
* New version of TaskIF
@ -10,7 +11,7 @@ class ExecutableObjectIF;
*/
class PeriodicTaskIF {
public:
static const uint64_t MINIMUM_STACK_SIZE;
static const size_t MINIMUM_STACK_SIZE;
/**
* @brief A virtual destructor as it is mandatory for interfaces.
*/
@ -20,7 +21,7 @@ public:
*/
virtual ReturnValue_t startTask() = 0;
virtual ReturnValue_t addComponent(object_id_t) {return HasReturnvaluesIF::RETURN_FAILED;};
virtual ReturnValue_t addComponent(object_id_t object) {return HasReturnvaluesIF::RETURN_FAILED;};
virtual ReturnValue_t sleepFor(uint32_t ms) = 0;

View File

@ -4,7 +4,7 @@
//TODO more generic?
typedef const char* TaskName;
typedef uint8_t TaskPriority;
typedef uint16_t TaskStackSize;
typedef size_t TaskStackSize;
typedef double TaskPeriod;
typedef void (*TaskDeadlineMissedFunction)();