diff --git a/src/fsfw/cfdp/CfdpHandler.cpp b/src/fsfw/cfdp/CfdpHandler.cpp index cb13bca6..5db6bed3 100644 --- a/src/fsfw/cfdp/CfdpHandler.cpp +++ b/src/fsfw/cfdp/CfdpHandler.cpp @@ -52,6 +52,6 @@ ReturnValue_t CfdpHandler::performOperation(uint8_t opCode) { return RETURN_OK; } -uint16_t CfdpHandler::getIdentifier() { return 0; } +uint32_t CfdpHandler::getIdentifier() { return 0; } MessageQueueId_t CfdpHandler::getRequestQueue() { return this->requestQueue->getId(); } diff --git a/src/fsfw/cfdp/CfdpHandler.h b/src/fsfw/cfdp/CfdpHandler.h index 03424d64..f55ebf73 100644 --- a/src/fsfw/cfdp/CfdpHandler.h +++ b/src/fsfw/cfdp/CfdpHandler.h @@ -28,7 +28,7 @@ class CfdpHandler : public ExecutableObjectIF, virtual ReturnValue_t handleRequest(store_address_t storeId); virtual ReturnValue_t initialize() override; - virtual uint16_t getIdentifier() override; + virtual uint32_t getIdentifier() override; MessageQueueId_t getRequestQueue() override; ReturnValue_t performOperation(uint8_t opCode) override; diff --git a/src/fsfw/tcdistribution/CMakeLists.txt b/src/fsfw/tcdistribution/CMakeLists.txt index f1762ff4..2d1a74f6 100644 --- a/src/fsfw/tcdistribution/CMakeLists.txt +++ b/src/fsfw/tcdistribution/CMakeLists.txt @@ -6,4 +6,5 @@ target_sources( PusPacketChecker.cpp TcPacketCheckCFDP.cpp CfdpDistributor.cpp - CcsdsPacketChecker.cpp) + CcsdsPacketChecker.cpp + CcsdsUnpacker.cpp) diff --git a/src/fsfw/tcdistribution/CcsdsDistributor.cpp b/src/fsfw/tcdistribution/CcsdsDistributor.cpp index d263d68a..3a6d8729 100644 --- a/src/fsfw/tcdistribution/CcsdsDistributor.cpp +++ b/src/fsfw/tcdistribution/CcsdsDistributor.cpp @@ -80,7 +80,7 @@ ReturnValue_t CcsdsDistributor::registerApplication(uint16_t apid, MessageQueueI return returnValue; } -uint16_t CcsdsDistributor::getIdentifier() { return 0; } +uint32_t CcsdsDistributor::getIdentifier() { return 0; } ReturnValue_t CcsdsDistributor::initialize() { if (packetChecker == nullptr) { diff --git a/src/fsfw/tcdistribution/CcsdsDistributor.h b/src/fsfw/tcdistribution/CcsdsDistributor.h index ea7ad7e2..f3af87e3 100644 --- a/src/fsfw/tcdistribution/CcsdsDistributor.h +++ b/src/fsfw/tcdistribution/CcsdsDistributor.h @@ -38,7 +38,7 @@ class CcsdsDistributor : public TcDistributor, MessageQueueId_t getRequestQueue() override; ReturnValue_t registerApplication(uint16_t apid, MessageQueueId_t id) override; ReturnValue_t registerApplication(AcceptsTelecommandsIF* application) override; - uint16_t getIdentifier() override; + uint32_t getIdentifier() override; ReturnValue_t initialize() override; protected: diff --git a/src/fsfw/tcdistribution/CcsdsUnpacker.cpp b/src/fsfw/tcdistribution/CcsdsUnpacker.cpp new file mode 100644 index 00000000..2f8e9f27 --- /dev/null +++ b/src/fsfw/tcdistribution/CcsdsUnpacker.cpp @@ -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; } diff --git a/src/fsfw/tcdistribution/CcsdsUnpacker.h b/src/fsfw/tcdistribution/CcsdsUnpacker.h new file mode 100644 index 00000000..b9b90d70 --- /dev/null +++ b/src/fsfw/tcdistribution/CcsdsUnpacker.h @@ -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 diff --git a/src/fsfw/tcdistribution/CfdpDistributor.cpp b/src/fsfw/tcdistribution/CfdpDistributor.cpp index 1f380530..26d7948d 100644 --- a/src/fsfw/tcdistribution/CfdpDistributor.cpp +++ b/src/fsfw/tcdistribution/CfdpDistributor.cpp @@ -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() { currentPacket = new CfdpPacketStored(); diff --git a/src/fsfw/tcdistribution/CfdpDistributor.h b/src/fsfw/tcdistribution/CfdpDistributor.h index 181d3613..7a69b3d0 100644 --- a/src/fsfw/tcdistribution/CfdpDistributor.h +++ b/src/fsfw/tcdistribution/CfdpDistributor.h @@ -35,7 +35,7 @@ class CfdpDistributor : public TcDistributor, ReturnValue_t registerHandler(AcceptsTelecommandsIF* handler) override; MessageQueueId_t getRequestQueue() override; ReturnValue_t initialize() override; - uint16_t getIdentifier() override; + uint32_t getIdentifier() override; protected: uint16_t apid; diff --git a/src/fsfw/tcdistribution/PusDistributor.cpp b/src/fsfw/tcdistribution/PusDistributor.cpp index 8a9ebb89..f8c28447 100644 --- a/src/fsfw/tcdistribution/PusDistributor.cpp +++ b/src/fsfw/tcdistribution/PusDistributor.cpp @@ -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() { if (store == nullptr) { diff --git a/src/fsfw/tcdistribution/PusDistributor.h b/src/fsfw/tcdistribution/PusDistributor.h index 6acefd02..f9ade4e2 100644 --- a/src/fsfw/tcdistribution/PusDistributor.h +++ b/src/fsfw/tcdistribution/PusDistributor.h @@ -36,7 +36,7 @@ class PusDistributor : public TcDistributor, public PusDistributorIF, public Acc ReturnValue_t registerService(AcceptsTelecommandsIF* service) override; MessageQueueId_t getRequestQueue() override; ReturnValue_t initialize() override; - uint16_t getIdentifier() override; + uint32_t getIdentifier() override; protected: StorageManagerIF* store; diff --git a/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h b/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h index e18a4f3a..a0fb23d1 100644 --- a/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h +++ b/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h @@ -22,13 +22,13 @@ class AcceptsTelecommandsIF { */ virtual ~AcceptsTelecommandsIF() = default; /** - * @brief Getter for the service id. - * @details Any receiving service (at least any PUS service) shall have a - * service ID. If the receiver can handle Telecommands, but for - * some reason has no service id, it shall return 0. - * @return The service ID or 0. + * @brief Getter for a generic identifier ID. + * @details Any receiving service (at least any PUS service) shall have an identifier. For + * example, this could be the APID for a receiver expecting generic PUS packets, or a PUS + * service for a component expecting specific PUS service packets. + * @return The identifier. */ - virtual uint16_t getIdentifier() = 0; + virtual uint32_t getIdentifier() = 0; /** * @brief This method returns the message queue id of the telecommand * receiving message queue. diff --git a/src/fsfw/tmtcservices/CommandingServiceBase.cpp b/src/fsfw/tmtcservices/CommandingServiceBase.cpp index 37810fca..fc9c0685 100644 --- a/src/fsfw/tmtcservices/CommandingServiceBase.cpp +++ b/src/fsfw/tmtcservices/CommandingServiceBase.cpp @@ -50,7 +50,7 @@ ReturnValue_t CommandingServiceBase::performOperation(uint8_t opCode) { return RETURN_OK; } -uint16_t CommandingServiceBase::getIdentifier() { return service; } +uint32_t CommandingServiceBase::getIdentifier() { return service; } MessageQueueId_t CommandingServiceBase::getRequestQueue() { return requestQueue->getId(); } diff --git a/src/fsfw/tmtcservices/CommandingServiceBase.h b/src/fsfw/tmtcservices/CommandingServiceBase.h index c16d9ded..07f7179a 100644 --- a/src/fsfw/tmtcservices/CommandingServiceBase.h +++ b/src/fsfw/tmtcservices/CommandingServiceBase.h @@ -106,7 +106,7 @@ class CommandingServiceBase : public SystemObject, */ ReturnValue_t performOperation(uint8_t opCode) override; - uint16_t getIdentifier() override; + uint32_t getIdentifier() override; /** * Returns the requestQueue MessageQueueId_t diff --git a/src/fsfw/tmtcservices/PusServiceBase.cpp b/src/fsfw/tmtcservices/PusServiceBase.cpp index aabe2192..d777d03e 100644 --- a/src/fsfw/tmtcservices/PusServiceBase.cpp +++ b/src/fsfw/tmtcservices/PusServiceBase.cpp @@ -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() { if (psbParams.reqQueue == nullptr) { diff --git a/src/fsfw/tmtcservices/PusServiceBase.h b/src/fsfw/tmtcservices/PusServiceBase.h index 829ff03c..34483fe7 100644 --- a/src/fsfw/tmtcservices/PusServiceBase.h +++ b/src/fsfw/tmtcservices/PusServiceBase.h @@ -188,7 +188,7 @@ class PusServiceBase : public ExecutableObjectIF, * @c RETURN_FAILED else. */ ReturnValue_t performOperation(uint8_t opCode) override; - uint16_t getIdentifier() override; + uint32_t getIdentifier() override; MessageQueueId_t getRequestQueue() override; ReturnValue_t initialize() override; diff --git a/src/fsfw/tmtcservices/TmTcBridge.cpp b/src/fsfw/tmtcservices/TmTcBridge.cpp index 6af03600..7190d771 100644 --- a/src/fsfw/tmtcservices/TmTcBridge.cpp +++ b/src/fsfw/tmtcservices/TmTcBridge.cpp @@ -247,7 +247,7 @@ MessageQueueId_t TmTcBridge::getReportReceptionQueue(uint8_t virtualChannel) { 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 return 0; } diff --git a/src/fsfw/tmtcservices/TmTcBridge.h b/src/fsfw/tmtcservices/TmTcBridge.h index 237f1f3e..c4bc4062 100644 --- a/src/fsfw/tmtcservices/TmTcBridge.h +++ b/src/fsfw/tmtcservices/TmTcBridge.h @@ -69,7 +69,7 @@ class TmTcBridge : public AcceptsTelemetryIF, virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override; /** AcceptsTelecommandsIF override */ - virtual uint16_t getIdentifier() override; + virtual uint32_t getIdentifier() override; virtual MessageQueueId_t getRequestQueue() override; protected: