diff --git a/src/fsfw/tcdistribution/PusDistributor.cpp b/src/fsfw/tcdistribution/PusDistributor.cpp index bac932d5..3a7fdf34 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 8c70d351..e1b54efe 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 89184251..00000000 --- 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 1be75b23..00000000 --- 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 89ebe75a..00000000 --- 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 ddd51303..00000000 --- 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