only process on TC request per cycle
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Robin Müller 2023-02-20 15:17:31 +01:00
parent 7d8cf0cbfe
commit fd0da7379a
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
3 changed files with 10 additions and 10 deletions

View File

@ -1,8 +1,8 @@
#ifndef MISSION_CORE_GENERICFACTORY_H_
#define MISSION_CORE_GENERICFACTORY_H_
#include <mission/memory/SdCardMountedIF.h>
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <mission/memory/SdCardMountedIF.h>
#include "fsfw/objectmanager/SystemObjectIF.h"
#include "fsfw/power/PowerSwitchIF.h"

View File

@ -54,8 +54,7 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) {
}
size_t packetLen = 0;
uint8_t* serPtr = newPacketData;
result =
spacePacketHeader.serializeBe(&serPtr, &packetLen, spacePacketHeader.getFullPacketLen());
result = spacePacketHeader.serializeBe(&serPtr, &packetLen, spacePacketHeader.getFullPacketLen());
if (result != returnvalue::OK) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CfdpTmFunnel::handlePacket: Error serializing packet" << std::endl;
@ -82,7 +81,8 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) {
} else {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PusTmFunnel::handlePacket: Store too full to create data copy or store "
"error" << std::endl;
"error"
<< std::endl;
break;
#endif
}

View File

@ -52,7 +52,7 @@ PusTmFunnel::~PusTmFunnel() = default;
ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
CommandMessage cmdMessage;
ReturnValue_t status = tcQueue->receiveMessage(&cmdMessage);
while (status == returnvalue::OK) {
if (status == returnvalue::OK) {
if (cmdMessage.getMessageType() == messagetypes::TM_STORE) {
Command_t cmd = cmdMessage.getCommand();
object_id_t objectId = TmStoreMessage::getObjectId(&cmdMessage);
@ -103,15 +103,15 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
}
}
}
TmTcMessage currentMessage;
status = tmQueue->receiveMessage(&currentMessage);
TmTcMessage tmMessage;
status = tmQueue->receiveMessage(&tmMessage);
while (status == returnvalue::OK) {
status = handleTmPacket(currentMessage);
status = handleTmPacket(tmMessage);
if (status != returnvalue::OK) {
sif::warning << "TmFunnel packet handling failed" << std::endl;
break;
}
status = tmQueue->receiveMessage(&currentMessage);
status = tmQueue->receiveMessage(&tmMessage);
}
if (status == MessageQueueIF::EMPTY) {
@ -140,7 +140,7 @@ ReturnValue_t PusTmFunnel::handleTmPacket(TmTcMessage &message) {
sourceSequenceCount = sourceSequenceCount % ccsds::LIMIT_SEQUENCE_COUNT;
packet.updateErrorControl();
timeval currentUptime;
timeval currentUptime{};
Clock::getUptime(&currentUptime);
if (currentUptime.tv_sec - lastTvUpdate.tv_sec >
static_cast<signed int>(TV_UPDATE_INTERVAL_SECS)) {