WIP: somethings wrong.. #19
@ -89,11 +89,17 @@ uint32_t FixedSlotSequence::getLengthMs() const {
|
|||||||
|
|
||||||
ReturnValue_t FixedSlotSequence::checkSequence() const {
|
ReturnValue_t FixedSlotSequence::checkSequence() const {
|
||||||
if(slotList.empty()) {
|
if(slotList.empty()) {
|
||||||
|
<<<<<<< HEAD
|
||||||
sif::error << "Fixed Slot Sequence: Slot list is empty!" << std::endl;
|
sif::error << "Fixed Slot Sequence: Slot list is empty!" << std::endl;
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
// Iterate through slotList and check successful creation.
|
// Iterate through slotList and check successful creation.
|
||||||
// Checks if timing is ok (must be ascending) and if all handlers were found.
|
// Checks if timing is ok (must be ascending) and if all handlers were found.
|
||||||
|
=======
|
||||||
|
error << "Fixed Slot Sequence: Slot list is empty!" << std::endl;
|
||||||
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
}
|
||||||
|
>>>>>>> master
|
||||||
auto slotIt = slotList.begin();
|
auto slotIt = slotList.begin();
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
uint32_t time = 0;
|
uint32_t time = 0;
|
||||||
|
@ -13,6 +13,7 @@ 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.
|
||||||
*
|
*
|
||||||
|
<<<<<<< HEAD
|
||||||
* @details The FixedSlotSequence object maintains the dynamic execution of device handler objects.
|
* @details The FixedSlotSequence object maintains the dynamic execution of device handler objects.
|
||||||
* The main idea is to create a list of device handlers, to announce all handlers to the
|
* The main idea is to create a list of device handlers, to announce all handlers to the
|
||||||
* polling sequence and to maintain a list of polling slot objects. This slot list represents the
|
* polling sequence and to maintain a list of polling slot objects. This slot list represents the
|
||||||
@ -20,6 +21,21 @@ using SlotListIter = std::multiset<FixedSequenceSlot>::iterator;
|
|||||||
* 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.
|
||||||
|
=======
|
||||||
|
* @details
|
||||||
|
* The FixedSlotSequence object maintains the dynamic execution of
|
||||||
|
* device handler objects.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* The sequence is then executed by iterating through this slot list.
|
||||||
|
* Handlers are invoking by calling a certain function stored in the handler list.
|
||||||
|
>>>>>>> master
|
||||||
*/
|
*/
|
||||||
class FixedSlotSequence {
|
class FixedSlotSequence {
|
||||||
public:
|
public:
|
||||||
@ -112,7 +128,16 @@ public:
|
|||||||
*/
|
*/
|
||||||
SlotListIter current;
|
SlotListIter current;
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
virtual ReturnValue_t checkSequence() const;
|
virtual ReturnValue_t checkSequence() const;
|
||||||
|
=======
|
||||||
|
/**
|
||||||
|
* 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;
|
||||||
|
>>>>>>> master
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,8 +59,8 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
|||||||
uint32_t slotTimeMs, int8_t executionStep) {
|
uint32_t slotTimeMs, int8_t executionStep) {
|
||||||
if (objectManager->get<ExecutableObjectIF>(componentId) != nullptr) {
|
if (objectManager->get<ExecutableObjectIF>(componentId) != nullptr) {
|
||||||
if(slotTimeMs == 0) {
|
if(slotTimeMs == 0) {
|
||||||
// TODO: FreeRTOS throws errors for zero values.
|
// FreeRTOS throws a sanity error for zero values, so we set
|
||||||
// maybe there is a better solution than this.
|
// the time to one millisecond.
|
||||||
slotTimeMs = 1;
|
slotTimeMs = 1;
|
||||||
}
|
}
|
||||||
pst.addSlot(componentId, slotTimeMs, executionStep, this);
|
pst.addSlot(componentId, slotTimeMs, executionStep, this);
|
||||||
|
Loading…
Reference in New Issue
Block a user