CFDP FSFW Integration #111

Merged
muellerr merged 170 commits from cfdp-integration into develop 2022-09-16 11:11:22 +02:00
18 changed files with 45 additions and 21 deletions
Showing only changes of commit c7b4dc349a - Show all commits

View File

@ -52,6 +52,6 @@ ReturnValue_t CfdpHandler::performOperation(uint8_t opCode) {
return RETURN_OK; return RETURN_OK;
} }
uint16_t CfdpHandler::getIdentifier() { return 0; } uint32_t CfdpHandler::getIdentifier() { return 0; }
MessageQueueId_t CfdpHandler::getRequestQueue() { return this->requestQueue->getId(); } MessageQueueId_t CfdpHandler::getRequestQueue() { return this->requestQueue->getId(); }

View File

@ -28,7 +28,7 @@ class CfdpHandler : public ExecutableObjectIF,
virtual ReturnValue_t handleRequest(store_address_t storeId); virtual ReturnValue_t handleRequest(store_address_t storeId);
virtual ReturnValue_t initialize() override; virtual ReturnValue_t initialize() override;
virtual uint16_t getIdentifier() override; virtual uint32_t getIdentifier() override;
MessageQueueId_t getRequestQueue() override; MessageQueueId_t getRequestQueue() override;
ReturnValue_t performOperation(uint8_t opCode) override; ReturnValue_t performOperation(uint8_t opCode) override;

View File

@ -6,4 +6,5 @@ target_sources(
PusPacketChecker.cpp PusPacketChecker.cpp
TcPacketCheckCFDP.cpp TcPacketCheckCFDP.cpp
CfdpDistributor.cpp CfdpDistributor.cpp
CcsdsPacketChecker.cpp) CcsdsPacketChecker.cpp
CcsdsUnpacker.cpp)

View File

@ -80,7 +80,7 @@ ReturnValue_t CcsdsDistributor::registerApplication(uint16_t apid, MessageQueueI
return returnValue; return returnValue;
} }
uint16_t CcsdsDistributor::getIdentifier() { return 0; } uint32_t CcsdsDistributor::getIdentifier() { return 0; }
ReturnValue_t CcsdsDistributor::initialize() { ReturnValue_t CcsdsDistributor::initialize() {
if (packetChecker == nullptr) { if (packetChecker == nullptr) {

View File

@ -38,7 +38,7 @@ class CcsdsDistributor : public TcDistributor,
MessageQueueId_t getRequestQueue() override; MessageQueueId_t getRequestQueue() override;
ReturnValue_t registerApplication(uint16_t apid, MessageQueueId_t id) override; ReturnValue_t registerApplication(uint16_t apid, MessageQueueId_t id) override;
ReturnValue_t registerApplication(AcceptsTelecommandsIF* application) override; ReturnValue_t registerApplication(AcceptsTelecommandsIF* application) override;
uint16_t getIdentifier() override; uint32_t getIdentifier() override;
ReturnValue_t initialize() override; ReturnValue_t initialize() override;
protected: protected:

View File

@ -0,0 +1,7 @@
#include "CcsdsUnpacker.h"
CcsdsUnpacker::CcsdsUnpacker() {}
ReturnValue_t CcsdsUnpacker::performOperation(uint8_t operationCode) { return 0; }
uint32_t CcsdsUnpacker::getIdentifier() { return 0; }
MessageQueueId_t CcsdsUnpacker::getRequestQueue() { return 0; }

View File

@ -0,0 +1,16 @@
#ifndef FSFW_TCDISTRIBUTION_CCSDSUNPACKER_H
#define FSFW_TCDISTRIBUTION_CCSDSUNPACKER_H
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tmtcservices/AcceptsTelecommandsIF.h"
class CcsdsUnpacker: public ExecutableObjectIF, public AcceptsTelecommandsIF {
public:
CcsdsUnpacker();
ReturnValue_t performOperation(uint8_t operationCode) override;
uint32_t getIdentifier() override;
MessageQueueId_t getRequestQueue() override;
private:
};
#endif // FSFW_TCDISTRIBUTION_CCSDSUNPACKER_H

View File

@ -118,7 +118,7 @@ MessageQueueId_t CfdpDistributor::getRequestQueue() { return tcQueue->getId(); }
// } // }
// } // }
uint16_t CfdpDistributor::getIdentifier() { return this->apid; } uint32_t CfdpDistributor::getIdentifier() { return this->apid; }
ReturnValue_t CfdpDistributor::initialize() { ReturnValue_t CfdpDistributor::initialize() {
currentPacket = new CfdpPacketStored(); currentPacket = new CfdpPacketStored();

View File

@ -35,7 +35,7 @@ class CfdpDistributor : public TcDistributor,
ReturnValue_t registerHandler(AcceptsTelecommandsIF* handler) override; ReturnValue_t registerHandler(AcceptsTelecommandsIF* handler) override;
MessageQueueId_t getRequestQueue() override; MessageQueueId_t getRequestQueue() override;
ReturnValue_t initialize() override; ReturnValue_t initialize() override;
uint16_t getIdentifier() override; uint32_t getIdentifier() override;
protected: protected:
uint16_t apid; uint16_t apid;

View File

@ -117,7 +117,7 @@ ReturnValue_t PusDistributor::callbackAfterSending(ReturnValue_t queueStatus) {
} }
} }
uint16_t PusDistributor::getIdentifier() { return checker.getApid(); } uint32_t PusDistributor::getIdentifier() { return checker.getApid(); }
ReturnValue_t PusDistributor::initialize() { ReturnValue_t PusDistributor::initialize() {
if (store == nullptr) { if (store == nullptr) {

View File

@ -36,7 +36,7 @@ class PusDistributor : public TcDistributor, public PusDistributorIF, public Acc
ReturnValue_t registerService(AcceptsTelecommandsIF* service) override; ReturnValue_t registerService(AcceptsTelecommandsIF* service) override;
MessageQueueId_t getRequestQueue() override; MessageQueueId_t getRequestQueue() override;
ReturnValue_t initialize() override; ReturnValue_t initialize() override;
uint16_t getIdentifier() override; uint32_t getIdentifier() override;
protected: protected:
StorageManagerIF* store; StorageManagerIF* store;

View File

@ -22,13 +22,13 @@ class AcceptsTelecommandsIF {
*/ */
virtual ~AcceptsTelecommandsIF() = default; virtual ~AcceptsTelecommandsIF() = default;
/** /**
* @brief Getter for the service id. * @brief Getter for a generic identifier ID.
* @details Any receiving service (at least any PUS service) shall have a * @details Any receiving service (at least any PUS service) shall have an identifier. For
* service ID. If the receiver can handle Telecommands, but for * example, this could be the APID for a receiver expecting generic PUS packets, or a PUS
* some reason has no service id, it shall return 0. * service for a component expecting specific PUS service packets.
* @return The service ID or 0. * @return The identifier.
*/ */
virtual uint16_t getIdentifier() = 0; virtual uint32_t getIdentifier() = 0;
/** /**
* @brief This method returns the message queue id of the telecommand * @brief This method returns the message queue id of the telecommand
* receiving message queue. * receiving message queue.

View File

@ -50,7 +50,7 @@ ReturnValue_t CommandingServiceBase::performOperation(uint8_t opCode) {
return RETURN_OK; return RETURN_OK;
} }
uint16_t CommandingServiceBase::getIdentifier() { return service; } uint32_t CommandingServiceBase::getIdentifier() { return service; }
MessageQueueId_t CommandingServiceBase::getRequestQueue() { return requestQueue->getId(); } MessageQueueId_t CommandingServiceBase::getRequestQueue() { return requestQueue->getId(); }

View File

@ -106,7 +106,7 @@ class CommandingServiceBase : public SystemObject,
*/ */
ReturnValue_t performOperation(uint8_t opCode) override; ReturnValue_t performOperation(uint8_t opCode) override;
uint16_t getIdentifier() override; uint32_t getIdentifier() override;
/** /**
* Returns the requestQueue MessageQueueId_t * Returns the requestQueue MessageQueueId_t

View File

@ -82,7 +82,7 @@ void PusServiceBase::handleRequestQueue() {
} }
} }
uint16_t PusServiceBase::getIdentifier() { return psbParams.serviceId; } uint32_t PusServiceBase::getIdentifier() { return psbParams.serviceId; }
MessageQueueId_t PusServiceBase::getRequestQueue() { MessageQueueId_t PusServiceBase::getRequestQueue() {
if (psbParams.reqQueue == nullptr) { if (psbParams.reqQueue == nullptr) {

View File

@ -188,7 +188,7 @@ class PusServiceBase : public ExecutableObjectIF,
* @c RETURN_FAILED else. * @c RETURN_FAILED else.
*/ */
ReturnValue_t performOperation(uint8_t opCode) override; ReturnValue_t performOperation(uint8_t opCode) override;
uint16_t getIdentifier() override; uint32_t getIdentifier() override;
MessageQueueId_t getRequestQueue() override; MessageQueueId_t getRequestQueue() override;
ReturnValue_t initialize() override; ReturnValue_t initialize() override;

View File

@ -247,7 +247,7 @@ MessageQueueId_t TmTcBridge::getReportReceptionQueue(uint8_t virtualChannel) {
void TmTcBridge::printData(uint8_t* data, size_t dataLen) { arrayprinter::print(data, dataLen); } void TmTcBridge::printData(uint8_t* data, size_t dataLen) { arrayprinter::print(data, dataLen); }
uint16_t TmTcBridge::getIdentifier() { uint32_t TmTcBridge::getIdentifier() {
// This is no PUS service, so we just return 0 // This is no PUS service, so we just return 0
return 0; return 0;
} }

View File

@ -69,7 +69,7 @@ class TmTcBridge : public AcceptsTelemetryIF,
virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override; virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override;
/** AcceptsTelecommandsIF override */ /** AcceptsTelecommandsIF override */
virtual uint16_t getIdentifier() override; virtual uint32_t getIdentifier() override;
virtual MessageQueueId_t getRequestQueue() override; virtual MessageQueueId_t getRequestQueue() override;
protected: protected: