some renaming
fsfw/fsfw/pipeline/head This commit looks good Details

This commit is contained in:
Robin Müller 2022-07-29 12:03:14 +02:00
parent da106fd96f
commit 6c5bbfa080
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
17 changed files with 71 additions and 71 deletions

View File

@ -10,7 +10,7 @@
object_id_t CfdpHandler::packetSource = 0;
object_id_t CfdpHandler::packetDestination = 0;
CfdpHandler::CfdpHandler(object_id_t setObjectId, CFDPDistributor* dist)
CfdpHandler::CfdpHandler(object_id_t setObjectId, CfdpDistributor* dist)
: SystemObject(setObjectId) {
requestQueue = QueueFactory::instance()->createMessageQueue(CFDP_HANDLER_MAX_RECEPTION);
distributor = dist;

View File

@ -5,7 +5,7 @@
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tcdistribution/CFDPDistributor.h"
#include "fsfw/tcdistribution/CfdpDistributor.h"
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
namespace Factory {
@ -19,7 +19,7 @@ class CfdpHandler : public ExecutableObjectIF,
friend void(Factory::setStaticFrameworkObjectIds)();
public:
CfdpHandler(object_id_t setObjectId, CFDPDistributor* distributor);
CfdpHandler(object_id_t setObjectId, CfdpDistributor* distributor);
/**
* The destructor is empty.
*/
@ -39,7 +39,7 @@ class CfdpHandler : public ExecutableObjectIF,
*/
MessageQueueIF* requestQueue = nullptr;
CFDPDistributor* distributor = nullptr;
CfdpDistributor* distributor = nullptr;
/**
* The current CFDP packet to be processed.

View File

@ -1,9 +1,9 @@
target_sources(
${LIB_FSFW_NAME}
PRIVATE CCSDSDistributor.cpp
PRIVATE CcsdsDistributor.cpp
PusDistributor.cpp
TcDistributor.cpp
PusPacketChecker.cpp
TcPacketCheckCFDP.cpp
CFDPDistributor.cpp
CfdpDistributor.cpp
CcsdsPacketChecker.cpp)

View File

@ -1,4 +1,4 @@
#include "fsfw/tcdistribution/CCSDSDistributor.h"
#include "fsfw/tcdistribution/CcsdsDistributor.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
@ -6,13 +6,13 @@
#define CCSDS_DISTRIBUTOR_DEBUGGING 0
CCSDSDistributor::CCSDSDistributor(uint16_t setDefaultApid, object_id_t setObjectId,
CcsdsDistributor::CcsdsDistributor(uint16_t setDefaultApid, object_id_t setObjectId,
CcsdsPacketCheckIF* packetChecker)
: TcDistributor(setObjectId), defaultApid(setDefaultApid), packetChecker(packetChecker) {}
CCSDSDistributor::~CCSDSDistributor() = default;
CcsdsDistributor::~CcsdsDistributor() = default;
TcDistributor::TcMqMapIter CCSDSDistributor::selectDestination() {
TcDistributor::TcMqMapIter CcsdsDistributor::selectDestination() {
#if CCSDS_DISTRIBUTOR_DEBUGGING == 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "CCSDSDistributor::selectDestination received: "
@ -59,9 +59,9 @@ TcDistributor::TcMqMapIter CCSDSDistributor::selectDestination() {
}
}
MessageQueueId_t CCSDSDistributor::getRequestQueue() { return tcQueue->getId(); }
MessageQueueId_t CcsdsDistributor::getRequestQueue() { return tcQueue->getId(); }
ReturnValue_t CCSDSDistributor::registerApplication(AcceptsTelecommandsIF* application) {
ReturnValue_t CcsdsDistributor::registerApplication(AcceptsTelecommandsIF* application) {
ReturnValue_t returnValue = RETURN_OK;
auto insertPair =
this->queueMap.emplace(application->getIdentifier(), application->getRequestQueue());
@ -71,7 +71,7 @@ ReturnValue_t CCSDSDistributor::registerApplication(AcceptsTelecommandsIF* appli
return returnValue;
}
ReturnValue_t CCSDSDistributor::registerApplication(uint16_t apid, MessageQueueId_t id) {
ReturnValue_t CcsdsDistributor::registerApplication(uint16_t apid, MessageQueueId_t id) {
ReturnValue_t returnValue = RETURN_OK;
auto insertPair = this->queueMap.emplace(apid, id);
if (not insertPair.second) {
@ -80,9 +80,9 @@ ReturnValue_t CCSDSDistributor::registerApplication(uint16_t apid, MessageQueueI
return returnValue;
}
uint16_t CCSDSDistributor::getIdentifier() { return 0; }
uint16_t CcsdsDistributor::getIdentifier() { return 0; }
ReturnValue_t CCSDSDistributor::initialize() {
ReturnValue_t CcsdsDistributor::initialize() {
if (packetChecker == nullptr) {
packetChecker = new CcsdsPacketChecker(ccsds::PacketType::TC);
}
@ -105,7 +105,7 @@ ReturnValue_t CCSDSDistributor::initialize() {
return status;
}
ReturnValue_t CCSDSDistributor::callbackAfterSending(ReturnValue_t queueStatus) {
ReturnValue_t CcsdsDistributor::callbackAfterSending(ReturnValue_t queueStatus) {
if (queueStatus != RETURN_OK) {
tcStore->deleteData(currentMessage.getStorageId());
}

View File

@ -3,21 +3,21 @@
#include "fsfw/objectmanager/ObjectManagerIF.h"
#include "fsfw/storagemanager/StorageManagerIF.h"
#include "fsfw/tcdistribution/CCSDSDistributorIF.h"
#include "fsfw/tcdistribution/CcsdsDistributorIF.h"
#include "fsfw/tcdistribution/CcsdsPacketChecker.h"
#include "fsfw/tcdistribution/TcDistributor.h"
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
/**
* @brief An instantiation of the CCSDSDistributorIF.
* @brief An instantiation of the CcsdsDistributorIF.
* @details
* It receives Space Packets, and selects a destination depending on the
* APID of the telecommands.
* The Secondary Header (with Service/Subservice) is ignored.
* @ingroup tc_distribution
*/
class CCSDSDistributor : public TcDistributor,
public CCSDSDistributorIF,
class CcsdsDistributor : public TcDistributor,
public CcsdsDistributorIF,
public AcceptsTelecommandsIF {
public:
/**
@ -28,12 +28,12 @@ class CCSDSDistributor : public TcDistributor,
* @param unknownApid The default APID, where packets with unknown
* destination are sent to.
*/
CCSDSDistributor(uint16_t unknownApid, object_id_t setObjectId,
CcsdsDistributor(uint16_t unknownApid, object_id_t setObjectId,
CcsdsPacketCheckIF* packetChecker = nullptr);
/**
* The destructor is empty.
*/
~CCSDSDistributor() override;
~CcsdsDistributor() override;
MessageQueueId_t getRequestQueue() override;
ReturnValue_t registerApplication(uint16_t apid, MessageQueueId_t id) override;

View File

@ -11,7 +11,7 @@
* to route the TC's to.
* @ingroup tc_distribution
*/
class CCSDSDistributorIF {
class CcsdsDistributorIF {
public:
/**
* With this call, a class implementing the CCSDSApplicationIF can register
@ -34,7 +34,7 @@ class CCSDSDistributorIF {
/**
* The empty virtual destructor.
*/
virtual ~CCSDSDistributorIF() = default;
virtual ~CcsdsDistributorIF() = default;
};
#endif /* FSFW_TCDISTRIBUTION_CCSDSDISTRIBUTORIF_H_ */

View File

@ -1,14 +1,14 @@
#include "fsfw/tcdistribution/CFDPDistributor.h"
#include "fsfw/tcdistribution/CfdpDistributor.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/tcdistribution/CCSDSDistributorIF.h"
#include "fsfw/tcdistribution/CcsdsDistributorIF.h"
#include "fsfw/tmtcpacket/cfdp/CfdpPacketStored.h"
#ifndef FSFW_CFDP_DISTRIBUTOR_DEBUGGING
#define FSFW_CFDP_DISTRIBUTOR_DEBUGGING 1
#endif
CFDPDistributor::CFDPDistributor(uint16_t setApid, object_id_t setObjectId,
CfdpDistributor::CfdpDistributor(uint16_t setApid, object_id_t setObjectId,
object_id_t setPacketSource)
: TcDistributor(setObjectId),
apid(setApid),
@ -16,9 +16,9 @@ CFDPDistributor::CFDPDistributor(uint16_t setApid, object_id_t setObjectId,
tcStatus(RETURN_FAILED),
packetSource(setPacketSource) {}
CFDPDistributor::~CFDPDistributor() = default;
CfdpDistributor::~CfdpDistributor() = default;
CFDPDistributor::TcMqMapIter CFDPDistributor::selectDestination() {
CfdpDistributor::TcMqMapIter CfdpDistributor::selectDestination() {
#if FSFW_CFDP_DISTRIBUTOR_DEBUGGING == 1
store_address_t storeId = this->currentMessage.getStorageId();
#if FSFW_CPP_OSTREAM_ENABLED == 1
@ -70,7 +70,7 @@ CFDPDistributor::TcMqMapIter CFDPDistributor::selectDestination() {
}
}
ReturnValue_t CFDPDistributor::registerHandler(AcceptsTelecommandsIF* handler) {
ReturnValue_t CfdpDistributor::registerHandler(AcceptsTelecommandsIF* handler) {
uint16_t handlerId =
handler->getIdentifier(); // should be 0, because CfdpHandler does not set a set a service-ID
#if FSFW_CFDP_DISTRIBUTOR_DEBUGGING == 1
@ -98,7 +98,7 @@ ReturnValue_t CFDPDistributor::registerHandler(AcceptsTelecommandsIF* handler) {
return HasReturnvaluesIF::RETURN_OK;
}
MessageQueueId_t CFDPDistributor::getRequestQueue() { return tcQueue->getId(); }
MessageQueueId_t CfdpDistributor::getRequestQueue() { return tcQueue->getId(); }
// ReturnValue_t CFDPDistributor::callbackAfterSending(ReturnValue_t queueStatus) {
// if (queueStatus != RETURN_OK) {
@ -118,23 +118,23 @@ MessageQueueId_t CFDPDistributor::getRequestQueue() { return tcQueue->getId(); }
// }
// }
uint16_t CFDPDistributor::getIdentifier() { return this->apid; }
uint16_t CfdpDistributor::getIdentifier() { return this->apid; }
ReturnValue_t CFDPDistributor::initialize() {
ReturnValue_t CfdpDistributor::initialize() {
currentPacket = new CfdpPacketStored();
if (currentPacket == nullptr) {
// Should not happen, memory allocation failed!
return ObjectManagerIF::CHILD_INIT_FAILED;
}
auto* ccsdsDistributor = ObjectManager::instance()->get<CCSDSDistributorIF>(packetSource);
auto* ccsdsDistributor = ObjectManager::instance()->get<CcsdsDistributorIF>(packetSource);
if (ccsdsDistributor == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CFDPDistributor::initialize: Packet source invalid" << std::endl;
sif::error << " Make sure it exists and implements CCSDSDistributorIF!" << std::endl;
#else
sif::printError("CFDPDistributor::initialize: Packet source invalid\n");
sif::printError("Make sure it exists and implements CCSDSDistributorIF\n");
sif::printError("Make sure it exists and implements CcsdsDistributorIF\n");
#endif
return RETURN_FAILED;
}

View File

@ -7,7 +7,7 @@
#include "../tmtcpacket/cfdp/CfdpPacketStored.h"
#include "../tmtcservices/AcceptsTelecommandsIF.h"
#include "../tmtcservices/VerificationReporter.h"
#include "CFDPDistributorIF.h"
#include "CfdpDistributorIF.h"
#include "TcDistributor.h"
/**
@ -15,8 +15,8 @@
* services.
* @ingroup tc_distribution
*/
class CFDPDistributor : public TcDistributor,
public CFDPDistributorIF,
class CfdpDistributor : public TcDistributor,
public CfdpDistributorIF,
public AcceptsTelecommandsIF {
public:
/**
@ -25,13 +25,13 @@ class CFDPDistributor : public TcDistributor,
* @param setApid The APID of this receiving Application.
* @param setObjectId Object ID of the distributor itself
* @param setPacketSource Object ID of the source of TC packets.
* Must implement CCSDSDistributorIF.
* Must implement CcsdsDistributorIF.
*/
CFDPDistributor(uint16_t setApid, object_id_t setObjectId, object_id_t setPacketSource);
CfdpDistributor(uint16_t setApid, object_id_t setObjectId, object_id_t setPacketSource);
/**
* The destructor is empty.
*/
~CFDPDistributor() override;
~CfdpDistributor() override;
ReturnValue_t registerHandler(AcceptsTelecommandsIF* handler) override;
MessageQueueId_t getRequestQueue() override;
ReturnValue_t initialize() override;

View File

@ -8,12 +8,12 @@
* This interface allows CFDP Services to register themselves at a CFDP Distributor.
* @ingroup tc_distribution
*/
class CFDPDistributorIF {
class CfdpDistributorIF {
public:
/**
* The empty virtual destructor.
*/
virtual ~CFDPDistributorIF() = default;
virtual ~CfdpDistributorIF() = default;
/**
* With this method, Handlers can register themselves at the CFDP Distributor.
* @param handler A pointer to the registering Handler.

View File

@ -3,13 +3,13 @@
#include "definitions.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/tcdistribution/CCSDSDistributorIF.h"
#include "fsfw/tcdistribution/CcsdsDistributorIF.h"
#include "fsfw/tmtcservices/PusVerificationReport.h"
#define PUS_DISTRIBUTOR_DEBUGGING 0
PusDistributor::PusDistributor(uint16_t setApid, object_id_t setObjectId,
CCSDSDistributorIF* distributor, StorageManagerIF* store_)
CcsdsDistributorIF* distributor, StorageManagerIF* store_)
: TcDistributor(setObjectId),
store(store_),
checker(setApid, ccsds::PacketType::TC),
@ -132,7 +132,7 @@ ReturnValue_t PusDistributor::initialize() {
sif::error << " Make sure it exists and implements CCSDSDistributorIF!" << std::endl;
#else
sif::printError("PusDistributor::initialize: Packet source invalid\n");
sif::printError("Make sure it exists and implements CCSDSDistributorIF\n");
sif::printError("Make sure it exists and implements CcsdsDistributorIF\n");
#endif
return ObjectManagerIF::CHILD_INIT_FAILED;
}

View File

@ -1,7 +1,7 @@
#ifndef FSFW_TCDISTRIBUTION_PUSDISTRIBUTOR_H_
#define FSFW_TCDISTRIBUTION_PUSDISTRIBUTOR_H_
#include "PUSDistributorIF.h"
#include "PusDistributorIF.h"
#include "PusPacketChecker.h"
#include "TcDistributor.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
@ -9,7 +9,7 @@
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
#include "fsfw/tmtcservices/VerificationReporter.h"
class CCSDSDistributorIF;
class CcsdsDistributorIF;
/**
* This class accepts PUS Telecommands and forwards them to Application
@ -17,7 +17,7 @@ class CCSDSDistributorIF;
* sends acceptance success or failure messages.
* @ingroup tc_distribution
*/
class PusDistributor : public TcDistributor, public PUSDistributorIF, public AcceptsTelecommandsIF {
class PusDistributor : public TcDistributor, public PusDistributorIF, public AcceptsTelecommandsIF {
public:
/**
* The ctor passes @c set_apid to the checker class and calls the
@ -25,9 +25,9 @@ class PusDistributor : public TcDistributor, public PUSDistributorIF, public Acc
* @param setApid The APID of this receiving Application.
* @param setObjectId Object ID of the distributor itself
* @param setPacketSource Object ID of the source of TC packets.
* Must implement CCSDSDistributorIF.
* Must implement CcsdsDistributorIF.
*/
PusDistributor(uint16_t setApid, object_id_t setObjectId, CCSDSDistributorIF* packetSource,
PusDistributor(uint16_t setApid, object_id_t setObjectId, CcsdsDistributorIF* packetSource,
StorageManagerIF* store = nullptr);
/**
* The destructor is empty.
@ -50,7 +50,7 @@ class PusDistributor : public TcDistributor, public PUSDistributorIF, public Acc
*/
VerificationReporterIF* verifyChannel = nullptr;
//! Cached for initialization
CCSDSDistributorIF* ccsdsDistributor = nullptr;
CcsdsDistributorIF* ccsdsDistributor = nullptr;
PusTcReader reader;
/**

View File

@ -8,12 +8,12 @@
* This interface allows PUS Services to register themselves at a PUS Distributor.
* @ingroup tc_distribution
*/
class PUSDistributorIF {
class PusDistributorIF {
public:
/**
* The empty virtual destructor.
*/
virtual ~PUSDistributorIF() {}
virtual ~PusDistributorIF() = default;
/**
* With this method, Services can register themselves at the PUS Distributor.
* @param service A pointer to the registering Service.

View File

@ -18,11 +18,11 @@
*/
/**
* This is the base class to implement distributors for Space Packets.
* Typically, the distribution is required to forward Telecommand packets
* This is the base class to implement distributors for telecommands.
* Typically, the distribution is required to forward telecommand packets
* over the satellite applications and services. The class receives
* Space Packets over a message queue and holds a map that links other
* message queue ids to some identifier. The process of unpacking the
* TC packets over a message queue and holds a map that links other
* message queue IDs to some identifier. The process of unpacking the
* destination information from the packet is handled by the child class
* implementations.
* @ingroup tc_distribution
@ -43,12 +43,12 @@ class TcDistributor : public SystemObject, public ExecutableObjectIF, public Has
* @param set_object_id This id is assigned to the distributor
* implementation.
*/
TcDistributor(object_id_t objectId);
explicit TcDistributor(object_id_t objectId);
/**
* The destructor is empty, the message queues are not in the vicinity of
* this class.
*/
virtual ~TcDistributor();
~TcDistributor() override;
/**
* The method is called cyclically and fetches new incoming packets from
* the message queue.
@ -56,7 +56,7 @@ class TcDistributor : public SystemObject, public ExecutableObjectIF, public Has
* with distribution.
* @return The error code of the message queue call.
*/
ReturnValue_t performOperation(uint8_t opCode);
ReturnValue_t performOperation(uint8_t opCode) override;
/**
* A simple debug print, that prints all distribution information stored in
* queueMap.

View File

@ -3,7 +3,7 @@
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/tcdistribution/PUSDistributorIF.h"
#include "fsfw/tcdistribution/PusDistributorIF.h"
#include "fsfw/tmtcpacket/pus/tc.h"
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
#include "fsfw/tmtcservices/TmTcMessage.h"
@ -68,7 +68,7 @@ ReturnValue_t CommandingServiceBase::initialize() {
if (packetSource == objects::NO_OBJECT) {
packetSource = defaultPacketSource;
}
auto* distributor = ObjectManager::instance()->get<PUSDistributorIF>(packetSource);
auto* distributor = ObjectManager::instance()->get<PusDistributorIF>(packetSource);
if (packetForwarding == nullptr or distributor == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1

View File

@ -3,7 +3,7 @@
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/tcdistribution/PUSDistributorIF.h"
#include "fsfw/tcdistribution/PusDistributorIF.h"
#include "fsfw/timemanager/CdsShortTimeStamper.h"
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
#include "fsfw/tmtcservices/PusVerificationReport.h"
@ -111,7 +111,7 @@ ReturnValue_t PusServiceBase::initialize() {
}
if (psbParams.pusDistributor == nullptr) {
psbParams.pusDistributor = ObjectManager::instance()->get<PUSDistributorIF>(PUS_DISTRIBUTOR);
psbParams.pusDistributor = ObjectManager::instance()->get<PusDistributorIF>(PUS_DISTRIBUTOR);
if (psbParams.pusDistributor != nullptr) {
registerService(*psbParams.pusDistributor);
}
@ -193,7 +193,7 @@ void PusServiceBase::setVerificationReporter(VerificationReporterIF& reporter) {
psbParams.verifReporter = &reporter;
}
ReturnValue_t PusServiceBase::registerService(PUSDistributorIF& distributor) {
ReturnValue_t PusServiceBase::registerService(PusDistributorIF& distributor) {
return distributor.registerService(this);
}

View File

@ -12,7 +12,7 @@
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tcdistribution/PUSDistributorIF.h"
#include "fsfw/tcdistribution/PusDistributorIF.h"
class StorageManagerIF;
@ -64,7 +64,7 @@ struct PsbParams {
* a suitable global distributor with the static ID @PusServiceBase::pusDistributor and
* register itself at that object.
*/
PUSDistributorIF* pusDistributor = nullptr;
PusDistributorIF* pusDistributor = nullptr;
TimeStamperIF* timeStamper = nullptr;
};
@ -116,7 +116,7 @@ class PusServiceBase : public ExecutableObjectIF,
*/
~PusServiceBase() override;
ReturnValue_t registerService(PUSDistributorIF& distributor);
ReturnValue_t registerService(PusDistributorIF& distributor);
/**
* Set the request queue which is used to receive requests. If none is set, the initialize
* function will create one

View File

@ -2,9 +2,9 @@
#define FSFW_TESTS_PUSDISTRIBUTORMOCK_H
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/tcdistribution/PUSDistributorIF.h"
#include "fsfw/tcdistribution/PusDistributorIF.h"
class PusDistributorMock : public SystemObject, public PUSDistributorIF {
class PusDistributorMock : public SystemObject, public PusDistributorIF {
public:
PusDistributorMock();
explicit PusDistributorMock(object_id_t registeredId);