EIVE upstream #29
@ -1,6 +1,7 @@
|
|||||||
#include "fsfw/osal/linux/PeriodicPosixTask.h"
|
#include "fsfw/osal/linux/PeriodicPosixTask.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <set>
|
||||||
|
#include <cerrno>
|
||||||
|
|
||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
@ -23,7 +24,7 @@ void* PeriodicPosixTask::taskEntryPoint(void* arg) {
|
|||||||
PeriodicPosixTask* originalTask(reinterpret_cast<PeriodicPosixTask*>(arg));
|
PeriodicPosixTask* originalTask(reinterpret_cast<PeriodicPosixTask*>(arg));
|
||||||
// The task's functionality is called.
|
// The task's functionality is called.
|
||||||
originalTask->taskFunctionality();
|
originalTask->taskFunctionality();
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object, uint8_t opCode) {
|
ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object, uint8_t opCode) {
|
||||||
@ -43,7 +44,7 @@ ReturnValue_t PeriodicPosixTask::addComponent(ExecutableObjectIF* object, uint8_
|
|||||||
#endif
|
#endif
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
objectList.emplace(object, opCode);
|
objectList.push_back({object, opCode});
|
||||||
object->setTaskIF(this);
|
object->setTaskIF(this);
|
||||||
|
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef FRAMEWORK_OSAL_LINUX_PERIODICPOSIXTASK_H_
|
#ifndef FRAMEWORK_OSAL_LINUX_PERIODICPOSIXTASK_H_
|
||||||
#define FRAMEWORK_OSAL_LINUX_PERIODICPOSIXTASK_H_
|
#define FRAMEWORK_OSAL_LINUX_PERIODICPOSIXTASK_H_
|
||||||
|
|
||||||
#include <set>
|
#include <vector>
|
||||||
|
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManagerIF.h"
|
||||||
#include "../../tasks/ExecutableObjectIF.h"
|
#include "../../tasks/ExecutableObjectIF.h"
|
||||||
@ -61,7 +61,7 @@ class PeriodicPosixTask : public PosixThread, public PeriodicTaskIF {
|
|||||||
private:
|
private:
|
||||||
//! Typedef for the List of objects. Will contain the objects to execute and their respective
|
//! Typedef for the List of objects. Will contain the objects to execute and their respective
|
||||||
//! op codes
|
//! op codes
|
||||||
using ObjectList = std::multiset<std::pair<ExecutableObjectIF*, uint8_t>>;
|
using ObjectList = std::vector<std::pair<ExecutableObjectIF*, uint8_t>>;
|
||||||
/**
|
/**
|
||||||
* @brief This attribute holds a list of objects to be executed.
|
* @brief This attribute holds a list of objects to be executed.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user