using uint32_t for getIdentifier of AcceptsTcIF

This commit is contained in:
Robin Müller 2022-07-29 15:53:39 +02:00
parent f75379fceb
commit c7b4dc349a
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
18 changed files with 45 additions and 21 deletions

View File

@ -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(); }

View File

@ -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;

View File

@ -6,4 +6,5 @@ target_sources(
PusPacketChecker.cpp
TcPacketCheckCFDP.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;
}
uint16_t CcsdsDistributor::getIdentifier() { return 0; }
uint32_t CcsdsDistributor::getIdentifier() { return 0; }
ReturnValue_t CcsdsDistributor::initialize() {
if (packetChecker == nullptr) {

View File

@ -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:

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() {
currentPacket = new CfdpPacketStored();

View File

@ -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;

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() {
if (store == nullptr) {

View File

@ -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;

View File

@ -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.

View File

@ -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(); }

View File

@ -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

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() {
if (psbParams.reqQueue == nullptr) {

View File

@ -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;

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); }
uint16_t TmTcBridge::getIdentifier() {
uint32_t TmTcBridge::getIdentifier() {
// This is no PUS service, so we just return 0
return 0;
}

View File

@ -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: