diff --git a/devicehandlers/DeviceHandlerBase.cpp b/devicehandlers/DeviceHandlerBase.cpp index a371b413..41acf277 100644 --- a/devicehandlers/DeviceHandlerBase.cpp +++ b/devicehandlers/DeviceHandlerBase.cpp @@ -116,7 +116,7 @@ ReturnValue_t DeviceHandlerBase::initialize() { AcceptsDeviceResponsesIF *rawReceiver = objectManager->get< AcceptsDeviceResponsesIF>(rawDataReceiverId); - if (rawReceiver == NULL) { + if (rawReceiver == nullptr) { return RETURN_FAILED; } diff --git a/devicehandlers/FixedSlotSequence.cpp b/devicehandlers/FixedSlotSequence.cpp index 23bb0e78..f11de94b 100644 --- a/devicehandlers/FixedSlotSequence.cpp +++ b/devicehandlers/FixedSlotSequence.cpp @@ -1,5 +1,6 @@ #include #include +#include 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; diff --git a/devicehandlers/FixedSlotSequence.h b/devicehandlers/FixedSlotSequence.h index 813d2fce..cad7ee87 100644 --- a/devicehandlers/FixedSlotSequence.h +++ b/devicehandlers/FixedSlotSequence.h @@ -3,6 +3,7 @@ #include #include +#include #include #include @@ -23,7 +24,6 @@ using SlotListIter = std::multiset::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_ */ diff --git a/osal/FreeRTOS/FixedTimeslotTask.cpp b/osal/FreeRTOS/FixedTimeslotTask.cpp index b1c97420..db0247a4 100644 --- a/osal/FreeRTOS/FixedTimeslotTask.cpp +++ b/osal/FreeRTOS/FixedTimeslotTask.cpp @@ -112,7 +112,6 @@ void FixedTimeslotTask::taskFunctionality() { vTaskDelayUntil(&xLastWakeTime, interval); //TODO deadline missed check } - } } diff --git a/test/CatchExample.cpp b/test/CatchExample.cpp index 4db6a5c2..90fd1ed5 100644 --- a/test/CatchExample.cpp +++ b/test/CatchExample.cpp @@ -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)