updating code from Flying Laptop
This is the framework of Flying Laptop OBSW version A.13.0.
This commit is contained in:
31
tasks/PeriodicTaskIF.h
Normal file
31
tasks/PeriodicTaskIF.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef PERIODICTASKIF_H_
|
||||
#define PERIODICTASKIF_H_
|
||||
|
||||
#include <framework/objectmanager/SystemObjectIF.h>
|
||||
class ExecutableObjectIF;
|
||||
/**
|
||||
* New version of TaskIF
|
||||
* Follows RAII principles, i.e. there's no create or delete method.
|
||||
* Minimalistic.
|
||||
*/
|
||||
class PeriodicTaskIF {
|
||||
public:
|
||||
static const uint64_t MINIMUM_STACK_SIZE;
|
||||
/**
|
||||
* @brief A virtual destructor as it is mandatory for interfaces.
|
||||
*/
|
||||
virtual ~PeriodicTaskIF() { }
|
||||
/**
|
||||
* @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) {return HasReturnvaluesIF::RETURN_FAILED;};
|
||||
|
||||
virtual ReturnValue_t sleepFor(uint32_t ms) = 0;
|
||||
|
||||
virtual uint32_t getPeriodMs() const = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif /* PERIODICTASKIF_H_ */
|
Reference in New Issue
Block a user