eive-obsw/mission/tmtc/LiveTmTask.cpp

17 lines
465 B
C++
Raw Normal View History

2023-03-09 17:44:05 +01:00
#include "LiveTmTask.h"
#include <fsfw/tasks/TaskFactory.h>
LiveTmTask::LiveTmTask(object_id_t objectId, VirtualChannelWithQueue& channel)
: SystemObject(objectId), channel(channel) {}
ReturnValue_t LiveTmTask::performOperation(uint8_t opCode) {
while (true) {
ReturnValue_t result = channel.sendNextTm();
if (result == MessageQueueIF::EMPTY) {
// 5 ms IDLE delay. Might tweak this in the future.
TaskFactory::delayTask(5);
}
}
}