timeout pdn (state: not runnning yet)

This commit is contained in:
Matthias Jung
2014-05-05 23:24:36 +02:00
parent cb16bd3a8a
commit 00f95b1587
24 changed files with 399 additions and 100 deletions

View File

@@ -29,6 +29,23 @@ const ScheduledCommand ControllerState::getLastCommand(Command command)
return max;
}
const ScheduledCommand ControllerState::getLastScheduledCommand()
{
ScheduledCommand lastCommand;
for(Command cmd : getAllCommands())
{
for(Bank bank : Configuration::getInstance().getBanks())
{
ScheduledCommand& current = lastCommandsOnBus[cmd][bank];
if (current.getStart() > lastCommand.getStart())
lastCommand = current;
}
}
return lastCommand;
}
const ScheduledCommand ControllerState::getLastScheduledCommand(Bank bank)
{
ScheduledCommand lastCommand;