Skip to content

Commit

Permalink
fix: fixed issues with consolodated scheduler.
Browse files Browse the repository at this point in the history
  • Loading branch information
charliekush committed Aug 13, 2024
1 parent f071ea2 commit 04455b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
16 changes: 9 additions & 7 deletions src/abstractScheduler.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
#ifndef __ABSTRACT_SCHEDULER_HPP__
#define __ABSTRACT_SCHEDULER_HPP__
#include <cstdint>
#include "deploymentSchedule.hpp"
#include <cstdint>
#include <cli/flog.hpp>
#include "deploymentSchedule.hpp"

typedef enum error_
{
SCHEDULER_SUCCESS,
TASK_SEARCH_FAIL,
SCHEDULER_DELAY_EXCEEDED
}SCH_error_e;

class AbstractScheduler {
public:
Expand All @@ -30,11 +37,6 @@ class AbstractScheduler {
std::uint32_t current_time) = 0;
};

typedef enum error_
{
SUCCESS,
TASK_SEARCH_FAIL,
FLOG_SCHEDULER_DELAY_EXCEEDED
}SCH_error_e;


#endif // __ABSTRACT_SCHEDULER_HPP__
4 changes: 2 additions & 2 deletions src/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void Scheduler::initializeScheduler()
* TASK_SEARCH_FAIL otherwise.
*/

int Scheduler::getNextTask(DeploymentSchedule_t** p_nextEvent,
SCH_error_e Scheduler::getNextTask(DeploymentSchedule_t** p_nextEvent,
std::uint32_t* p_nextTime,
std::uint32_t currentTime)
{
Expand Down Expand Up @@ -116,7 +116,7 @@ int Scheduler::getNextTask(DeploymentSchedule_t** p_nextEvent,
SF_OSAL_printf("Task %s shifted at time %zu" __NL__ ,
currentEvent.taskName,currentTime);
}
return SUCCESS;
return SCHEDULER_SUCCESS;
}


Expand Down
1 change: 0 additions & 1 deletion tests/examine_behavior.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ class ExamineBehavior


scheduler->initializeScheduler();

while (millis() < input.end)
{
scheduler->getNextTask(&nextEvent, &nextEventTime,
Expand Down

0 comments on commit 04455b8

Please sign in to comment.