replace std::set by std::multiset
so there can be multiple entries with same pollignTime
This commit is contained in:
parent
5d071a1cf1
commit
93678adc5a
@ -104,11 +104,14 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
|
|||||||
count++;
|
count++;
|
||||||
} else {
|
} else {
|
||||||
// All ok, print slot.
|
// All ok, print slot.
|
||||||
// (*slotIt)->print();
|
//info << "Current slot polling time: " << std::endl;
|
||||||
|
//info << std::dec << slotIt->pollingTimeMs << std::endl;
|
||||||
}
|
}
|
||||||
time = slotIt->pollingTimeMs;
|
time = slotIt->pollingTimeMs;
|
||||||
slotIt++;
|
slotIt++;
|
||||||
}
|
}
|
||||||
|
//info << "Number of elements in slot list: "
|
||||||
|
// << slotList.size() << std::endl;
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
using SlotList = std::set<FixedSequenceSlot>;
|
using SlotList = std::multiset<FixedSequenceSlot>;
|
||||||
using SlotListIter = std::set<FixedSequenceSlot>::iterator;
|
using SlotListIter = std::multiset<FixedSequenceSlot>::iterator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @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.
|
||||||
@ -69,11 +69,14 @@ public:
|
|||||||
/**
|
/**
|
||||||
* \brief This method returns the time until the next software component is invoked.
|
* \brief This method returns the time until the next software component is invoked.
|
||||||
*
|
*
|
||||||
* \details This method is vitally important for the operation of the PST. By fetching the polling time
|
* \details
|
||||||
* of the current slot and that of the next one (or the first one, if the list end is reached)
|
* This method is vitally important for the operation of the PST.
|
||||||
* it calculates and returns the interval in milliseconds within which the handler execution
|
* By fetching the polling time of the current slot and that of the
|
||||||
* shall take place. If the next slot has the same time as the current one, it is ignored until
|
* next one (or the first one, if the list end is reached)
|
||||||
* a slot with different time or the end of the PST is found.
|
* it calculates and returns the interval in milliseconds within
|
||||||
|
* which the handler execution shall take place.
|
||||||
|
* If the next slot has the same time as the current one, it is ignored
|
||||||
|
* until a slot with different time or the end of the PST is found.
|
||||||
*/
|
*/
|
||||||
uint32_t getIntervalToNextSlotMs();
|
uint32_t getIntervalToNextSlotMs();
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@ class FixedTimeslotTaskIF : public PeriodicTaskIF {
|
|||||||
public:
|
public:
|
||||||
virtual ~FixedTimeslotTaskIF() {}
|
virtual ~FixedTimeslotTaskIF() {}
|
||||||
|
|
||||||
virtual ReturnValue_t addSlot(object_id_t componentId, uint32_t slotTimeMs, int8_t executionStep) = 0;
|
virtual ReturnValue_t addSlot(object_id_t componentId,
|
||||||
|
uint32_t slotTimeMs, int8_t executionStep) = 0;
|
||||||
virtual ReturnValue_t checkSequence() const = 0;
|
virtual ReturnValue_t checkSequence() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user