Refactor TM handling #450

Merged
muellerr merged 47 commits from refactor_tm_handling into develop 2023-03-11 15:05:22 +01:00
2 changed files with 0 additions and 34 deletions
Showing only changes of commit df3fa17017 - Show all commits

View File

@ -222,39 +222,6 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
return returnvalue::OK; return returnvalue::OK;
} }
// void PersistentTmStore::fileToPackets(const std::filesystem::path& path, uint32_t unixStamp) {
// store_address_t storeId;
// TmTcMessage message;
// size_t size = std::filesystem::file_size(path);
// if (size < 6) {
// // Can't even read the CCSDS header
// return;
// }
// std::ifstream ifile(path, std::ios::binary);
// ifile.read(reinterpret_cast<char*>(fileBuf.data()), static_cast<std::streamsize>(size));
// size_t currentIdx = 0;
// while (currentIdx < size) {
// PusTmReader reader(&timeReader, fileBuf.data(), fileBuf.size());
// // CRC check to fully ensure this is a valid TM
// ReturnValue_t result = reader.parseDataWithCrcCheck();
// if (result == returnvalue::OK) {
// // TODO: Blow the data out to the VC directly. Use IF function to do this.
// // result = tmStore.addData(&storeId, fileBuf.data() + currentIdx,
// // reader.getFullPacketLen()); if (result != returnvalue::OK) {
// // continue;
// // }
// // funnel.sendPacketToLiveDestinations(storeId, message, fileBuf.data() + currentIdx,
// // reader.getFullPacketLen());
// currentIdx += reader.getFullPacketLen();
// } else {
// sif::error << "Parsing of PUS TM failed with code " << result << std::endl;
// triggerEvent(POSSIBLE_FILE_CORRUPTION, result, unixStamp);
// // Stop for now, do not really know where to continue and we do not trust the file anymore.
// break;
// }
// }
// }
ReturnValue_t PersistentTmStore::dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen) { ReturnValue_t PersistentTmStore::dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen) {
if (state == State::IDLE) { if (state == State::IDLE) {
return returnvalue::FAILED; return returnvalue::FAILED;

View File

@ -68,7 +68,6 @@ class PersistentTmStore : public TmStoreFrontendSimpleIF, public SystemObject {
ReturnValue_t startDumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds); ReturnValue_t startDumpFromUpTo(uint32_t fromUnixSeconds, uint32_t upToUnixSeconds);
ReturnValue_t dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen); ReturnValue_t dumpNextPacket(DirectTmSinkIF& tmSink, size_t& dumpedLen);
// ReturnValue_t passPacket(PusTmReader& reader);
ReturnValue_t storePacket(PusTmReader& reader); ReturnValue_t storePacket(PusTmReader& reader);
protected: protected: