From 23f264096cb9f3a191617beb562119e838c5c7b1 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 21 Jul 2022 14:05:31 +0200 Subject: [PATCH] delete a few old classes --- src/fsfw/tcdistribution/PusDistributor.cpp | 1 - src/fsfw/tmtcpacket/CMakeLists.txt | 2 - src/fsfw/tmtcpacket/PacketStorageHelper.cpp | 25 -------- src/fsfw/tmtcpacket/PacketStorageHelper.h | 63 ------------------- src/fsfw/tmtcpacket/pus/tc/TcPacketStored.cpp | 1 - src/fsfw/tmtcpacket/pus/tc/TcPacketStored.h | 10 --- 6 files changed, 102 deletions(-) delete mode 100644 src/fsfw/tmtcpacket/PacketStorageHelper.cpp delete mode 100644 src/fsfw/tmtcpacket/PacketStorageHelper.h delete mode 100644 src/fsfw/tmtcpacket/pus/tc/TcPacketStored.cpp delete mode 100644 src/fsfw/tmtcpacket/pus/tc/TcPacketStored.h diff --git a/src/fsfw/tcdistribution/PusDistributor.cpp b/src/fsfw/tcdistribution/PusDistributor.cpp index bac932d5b..3a7fdf34f 100644 --- a/src/fsfw/tcdistribution/PusDistributor.cpp +++ b/src/fsfw/tcdistribution/PusDistributor.cpp @@ -3,7 +3,6 @@ #include "fsfw/objectmanager/ObjectManager.h" #include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/tcdistribution/CCSDSDistributorIF.h" -#include "fsfw/tmtcpacket/PacketStorageHelper.h" #include "fsfw/tmtcservices/PusVerificationReport.h" #define PUS_DISTRIBUTOR_DEBUGGING 0 diff --git a/src/fsfw/tmtcpacket/CMakeLists.txt b/src/fsfw/tmtcpacket/CMakeLists.txt index 8c70d3515..e1b54efe6 100644 --- a/src/fsfw/tmtcpacket/CMakeLists.txt +++ b/src/fsfw/tmtcpacket/CMakeLists.txt @@ -1,5 +1,3 @@ -target_sources(${LIB_FSFW_NAME} PRIVATE PacketStorageHelper.cpp) - add_subdirectory(ccsds) add_subdirectory(pus) add_subdirectory(cfdp) diff --git a/src/fsfw/tmtcpacket/PacketStorageHelper.cpp b/src/fsfw/tmtcpacket/PacketStorageHelper.cpp deleted file mode 100644 index 891842514..000000000 --- a/src/fsfw/tmtcpacket/PacketStorageHelper.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "PacketStorageHelper.h" - -#include - -#include "fsfw/serialize.h" -#include "fsfw/serviceinterface/ServiceInterface.h" -#include "fsfw/storagemanager/StorageManagerIF.h" - -PacketStorageHelper::PacketStorageHelper(StorageManagerIF* store_, - SerializeIF::Endianness endianness_) - : store(store_), endianness(endianness_) {} - -ReturnValue_t PacketStorageHelper::addPacket(SerializeIF* packet, store_address_t& storeId) { - uint8_t* ptr = nullptr; - size_t serLen = 0; - ReturnValue_t result = store->getFreeElement(&storeId, packet->getSerializedSize(), &ptr); - if (result != HasReturnvaluesIF::RETURN_OK) { - return result; - } - return packet->serialize(&ptr, &serLen, packet->getSerializedSize(), endianness); -} - -ReturnValue_t PacketStorageHelper::deletePacket(store_address_t storeId) { - return store->deleteData(storeId); -} diff --git a/src/fsfw/tmtcpacket/PacketStorageHelper.h b/src/fsfw/tmtcpacket/PacketStorageHelper.h deleted file mode 100644 index 1be75b23f..000000000 --- a/src/fsfw/tmtcpacket/PacketStorageHelper.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef FSFW_TMTCPACKET_PUS_TCPACKETSTOREDPUSA_H_ -#define FSFW_TMTCPACKET_PUS_TCPACKETSTOREDPUSA_H_ - -#include "fsfw/returnvalues/HasReturnvaluesIF.h" -#include "fsfw/serialize.h" -#include "fsfw/storagemanager/storeAddress.h" - -class StorageManagerIF; - -class PacketStorageHelper { - public: - explicit PacketStorageHelper(StorageManagerIF* store, SerializeIF::Endianness endianness); - - ReturnValue_t addPacket(SerializeIF* packet, store_address_t& storeId); - ReturnValue_t deletePacket(store_address_t storeId); - - private: - StorageManagerIF* store; - SerializeIF::Endianness endianness; -}; -// class TcPacketStoredPus : public TcPacketStoredBase, public TcPacketPus { -// public: -// /** -// * With this constructor, new space is allocated in the packet store and -// * a new PUS Telecommand Packet is created there. -// * Packet Application Data passed in data is copied into the packet. -// * @param apid Sets the packet's APID field. -// * @param service Sets the packet's Service ID field. -// * This specifies the destination service. -// * @param subservice Sets the packet's Service Subtype field. -// * This specifies the destination sub-service. -// * @param sequence_count Sets the packet's Source Sequence Count field. -// * @param data The data to be copied to the Application Data Field. -// * @param size The amount of data to be copied. -// * @param ack Set's the packet's Ack field, which specifies -// * number of verification packets returned -// * for this command. -// */ -// TcPacketStoredPus(uint16_t apid, uint8_t service, uint8_t subservice, uint8_t sequence_count = -// 0, -// const uint8_t* data = nullptr, size_t size = 0, -// uint8_t ack = TcPacketPusBase::ACK_ALL); -// /** -// * Create stored packet with existing data. -// * @param data -// * @param size -// */ -// TcPacketStoredPus(const uint8_t* data, size_t size); -// /** -// * Create stored packet from existing packet in store -// * @param setAddress -// */ -// TcPacketStoredPus(store_address_t setAddress); -// TcPacketStoredPus(); -// -// ReturnValue_t deletePacket() override; -// TcPacketPusBase* getPacketBase(); -// -// private: -// bool isSizeCorrect() override; -// }; - -#endif /* FSFW_TMTCPACKET_PUS_TCPACKETSTOREDPUSA_H_ */ diff --git a/src/fsfw/tmtcpacket/pus/tc/TcPacketStored.cpp b/src/fsfw/tmtcpacket/pus/tc/TcPacketStored.cpp deleted file mode 100644 index 89ebe75aa..000000000 --- a/src/fsfw/tmtcpacket/pus/tc/TcPacketStored.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "TcPacketStored.h" diff --git a/src/fsfw/tmtcpacket/pus/tc/TcPacketStored.h b/src/fsfw/tmtcpacket/pus/tc/TcPacketStored.h deleted file mode 100644 index ddd513031..000000000 --- a/src/fsfw/tmtcpacket/pus/tc/TcPacketStored.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef FSFW_TMTCPACKET_TCPACKETSTORED_H -#define FSFW_TMTCPACKET_TCPACKETSTORED_H - -#include "fsfw/tmtcpacket/PacketStorageHelper.h" - -class TcPacketStored : public PacketStorageHelper { - TcPacketStored(StorageManagerIF* store); -}; - -#endif // FSFW_TMTCPACKET_TCPACKETSTORED_H