fixes for updated FSFW

This commit is contained in:
Robin Müller 2021-06-24 09:36:13 +02:00
parent 967d4964f1
commit 2500a5f4f7
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
3 changed files with 10 additions and 6 deletions

View File

@ -1,6 +1,8 @@
#include "CCSDSDistributorIF.h" #include "CCSDSDistributorIF.h"
#include "CFDPDistributor.h" #include "CFDPDistributor.h"
#include "../objectmanager/ObjectManager.h"
#include "../serviceinterface/ServiceInterface.h" #include "../serviceinterface/ServiceInterface.h"
#define CFDP_DISTRIBUTOR_DEBUGGING 0 #define CFDP_DISTRIBUTOR_DEBUGGING 0
@ -19,7 +21,8 @@ CFDPDistributor::TcMqMapIter CFDPDistributor::selectDestination() {
sif::debug << "CFDPDistributor::handlePacket received: " << storeId.poolIndex << ", " << sif::debug << "CFDPDistributor::handlePacket received: " << storeId.poolIndex << ", " <<
storeId.packetIndex << std::endl; storeId.packetIndex << std::endl;
#else #else
sif::printDebug("CFDPDistributor::handlePacket received: %d, %d\n", storeId.poolIndex, storeId.packetIndex); sif::printDebug("CFDPDistributor::handlePacket received: %d, %d\n", storeId.poolIndex,
storeId.packetIndex);
#endif #endif
#endif #endif
TcMqMapIter queueMapIt = this->queueMap.end(); TcMqMapIter queueMapIt = this->queueMap.end();
@ -120,14 +123,14 @@ uint16_t CFDPDistributor::getIdentifier() {
} }
ReturnValue_t CFDPDistributor::initialize() { ReturnValue_t CFDPDistributor::initialize() {
currentPacket = new TcPacketStored(); currentPacket = new TcPacketStoredPus();
if(currentPacket == nullptr) { if(currentPacket == nullptr) {
// Should not happen, memory allocation failed! // Should not happen, memory allocation failed!
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
} }
CCSDSDistributorIF* ccsdsDistributor = CCSDSDistributorIF* ccsdsDistributor = ObjectManager::instance()->get<CCSDSDistributorIF>(
objectManager->get<CCSDSDistributorIF>(packetSource); packetSource);
if (ccsdsDistributor == nullptr) { if (ccsdsDistributor == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CFDPDistributor::initialize: Packet source invalid" << std::endl; sif::error << "CFDPDistributor::initialize: Packet source invalid" << std::endl;

View File

@ -5,6 +5,7 @@
#include "TcDistributor.h" #include "TcDistributor.h"
#include "TcPacketCheck.h" #include "TcPacketCheck.h"
#include "../tmtcpacket/pus/tc.h"
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include "../tmtcservices/AcceptsTelecommandsIF.h" #include "../tmtcservices/AcceptsTelecommandsIF.h"
#include "../tmtcservices/VerificationReporter.h" #include "../tmtcservices/VerificationReporter.h"
@ -50,7 +51,7 @@ protected:
/** /**
* The currently handled packet is stored here. * The currently handled packet is stored here.
*/ */
TcPacketStored* currentPacket = nullptr; TcPacketStoredPus* currentPacket = nullptr;
/** /**
* With this variable, the current check status is stored to generate * With this variable, the current check status is stored to generate
* acceptance messages later. * acceptance messages later.

View File

@ -3,6 +3,6 @@ target_sources(${LIB_FSFW_NAME} PRIVATE
PUSDistributor.cpp PUSDistributor.cpp
TcDistributor.cpp TcDistributor.cpp
TcPacketCheck.cpp TcPacketCheck.cpp
CCSDSDistributor.cpp CFDPDistributor.cpp
) )