Merge branch 'mueller_empty_pst_check' into luz_FixedTimeslotTask_ExistenceCheck

This commit is contained in:
Robin Müller 2020-05-05 19:00:23 +02:00
commit 8ce0c8facb
2 changed files with 23 additions and 9 deletions

View File

@ -89,7 +89,10 @@ uint32_t FixedSlotSequence::getLengthMs() const {
} }
ReturnValue_t FixedSlotSequence::checkSequence() const { ReturnValue_t FixedSlotSequence::checkSequence() const {
//Iterate through slotList and check successful creation. Checks if timing is ok (must be ascending) and if all handlers were found. if(slotList.empty()) {
error << "Fixed Slot Sequence: Slot list is empty!" << std::endl;
std::exit(0);
}
auto slotIt = slotList.begin(); auto slotIt = slotList.begin();
uint32_t count = 0; uint32_t count = 0;
uint32_t time = 0; uint32_t time = 0;

View File

@ -6,12 +6,18 @@
#include <list> #include <list>
/** /**
* \brief This class is the representation of a Polling Sequence Table in software. * @brief This class is the representation of a Polling Sequence Table in software.
* *
* \details The FixedSlotSequence object maintains the dynamic execution of device handler objects. * @details
* The main idea is to create a list of device handlers, to announce all handlers to the * The FixedSlotSequence object maintains the dynamic execution of
* polling sequence and to maintain a list of polling slot objects. This slot list represents the * device handler objects.
* Polling Sequence Table in software. Each polling slot contains information to indicate when and *
* The main idea is to create a list of device handlers, to announce all
* handlers to thepolling sequence and to maintain a list of
* polling slot objects. This slot list represents the Polling Sequence Table
* in software.
*
* Each polling slot contains information to indicate when and
* which device handler shall be executed within a given polling period. * which device handler shall be executed within a given polling period.
* The sequence is then executed by iterating through this slot list. * The sequence is then executed by iterating through this slot list.
* Handlers are invoking by calling a certain function stored in the handler list. * Handlers are invoking by calling a certain function stored in the handler list.
@ -97,6 +103,11 @@ public:
*/ */
std::list<FixedSequenceSlot*>::iterator current; std::list<FixedSequenceSlot*>::iterator current;
/**
* Iterate through slotList and check successful creation.
* Checks if timing is ok (must be ascending) and if all handlers were found.
* @return
*/
ReturnValue_t checkSequence() const; ReturnValue_t checkSequence() const;
protected: protected: