Merge branch 'mueller_framework' of https://egit.irs.uni-stuttgart.de/KSat/fsfw into mueller_framework

This commit is contained in:
Robin Müller 2020-04-16 17:02:10 +02:00
commit 5595b0f3ce
5 changed files with 16 additions and 4 deletions

View File

@ -116,7 +116,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
AcceptsDeviceResponsesIF *rawReceiver = objectManager->get<
AcceptsDeviceResponsesIF>(rawDataReceiverId);
if (rawReceiver == NULL) {
if (rawReceiver == nullptr) {
return RETURN_FAILED;
}

View File

@ -1,5 +1,6 @@
#include <framework/devicehandlers/FixedSlotSequence.h>
#include <framework/serviceinterface/ServiceInterfaceStream.h>
#include <cstdlib>
FixedSlotSequence::FixedSlotSequence(uint32_t setLengthMs) :
slotLengthMs(setLengthMs) {
@ -87,7 +88,15 @@ uint32_t FixedSlotSequence::getLengthMs() const {
}
ReturnValue_t FixedSlotSequence::checkSequence() const {
// Iterate through slotList and check successful creation.
if(slotList.empty()) {
error << "Fixed Slot Sequence: Slot list is empty!" << std::endl;
// does check sequence have to be const?
// if I want to check a class, I need the ability to set
// internal class states.
//isEmpty = true;
std::exit(0);
}
// Iterate through slotList and check successful creation.
// Checks if timing is ok (must be ascending) and if all handlers were found.
auto slotIt = slotList.begin();
uint32_t count = 0;

View File

@ -3,6 +3,7 @@
#include <framework/devicehandlers/FixedSequenceSlot.h>
#include <framework/objectmanager/SystemObject.h>
#include <framework/returnvalues/HasReturnvaluesIF.h>
#include <list>
#include <set>
@ -23,7 +24,6 @@ using SlotListIter = std::multiset<FixedSequenceSlot>::iterator;
class FixedSlotSequence {
public:
/**
* @brief The constructor of the FixedSlotSequence object.
*
@ -127,6 +127,8 @@ protected:
SlotList slotList;
uint32_t slotLengthMs;
bool isEmpty = false;
};
#endif /* FIXEDSLOTSEQUENCE_H_ */

View File

@ -112,7 +112,6 @@ void FixedTimeslotTask::taskFunctionality() {
vTaskDelayUntil(&xLastWakeTime, interval);
//TODO deadline missed check
}
}
}

View File

@ -1,5 +1,7 @@
// Catch Example.
// Does not work yet. Problems with linker without main and config folder.
// propably because global object manager and some config files are not supplied
// but mandatory for full compilation of the framework.
// Let Catch provide main():
#if defined(UNIT_TEST)